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..0f27fc0a 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-cbb433962c75b95b0c00c453c3a2e39a88f4291a92c093f27a3f52d1b52785a2.yml +openapi_spec_hash: 46b3934a43850209dad40e883aa5d1bd config_hash: c01c1191b1cd696c7ca855ff6d28a8df diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d804c26..48c0c5f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Changelog +## 1.15.0 (2026-05-19) + +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 ([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/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..cac56e3e 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::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,355 @@ 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::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::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package } + variant :package, -> { Orb::NewPlanPackagePrice } - variant :matrix, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix } + variant :matrix, -> { Orb::NewPlanMatrixPrice } - variant :threshold_total_amount, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount } + variant :threshold_total_amount, -> { Orb::NewPlanThresholdTotalAmountPrice } - variant :tiered_package, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage } + variant :tiered_package, -> { Orb::NewPlanTieredPackagePrice } - variant :tiered_with_minimum, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum } + variant :tiered_with_minimum, -> { Orb::NewPlanTieredWithMinimumPrice } - variant :grouped_tiered, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered } + variant :grouped_tiered, -> { Orb::NewPlanGroupedTieredPrice } - variant :tiered_package_with_minimum, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum } + variant :tiered_package_with_minimum, -> { Orb::NewPlanTieredPackageWithMinimumPrice } - variant :package_with_allocation, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation } + variant :package_with_allocation, -> { Orb::NewPlanPackageWithAllocationPrice } - variant :unit_with_percent, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent } + variant :unit_with_percent, -> { Orb::NewPlanUnitWithPercentPrice } - variant :matrix_with_allocation, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation } + variant :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice } variant :tiered_with_proration, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration } + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration } - variant :unit_with_proration, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration } + variant :unit_with_proration, -> { Orb::NewPlanUnitWithProrationPrice } - variant :grouped_allocation, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation } + variant :grouped_allocation, -> { Orb::NewPlanGroupedAllocationPrice } - variant :bulk_with_proration, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration } + variant :bulk_with_proration, -> { Orb::NewPlanBulkWithProrationPrice } - variant :grouped_with_prorated_minimum, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum } + variant :grouped_with_prorated_minimum, -> { Orb::NewPlanGroupedWithProratedMinimumPrice } - variant :grouped_with_metered_minimum, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum } + variant :grouped_with_metered_minimum, -> { Orb::NewPlanGroupedWithMeteredMinimumPrice } variant :grouped_with_min_max_thresholds, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds } + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds } - variant :matrix_with_display_name, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName } + variant :matrix_with_display_name, -> { Orb::NewPlanMatrixWithDisplayNamePrice } - variant :grouped_tiered_package, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage } + variant :grouped_tiered_package, -> { Orb::NewPlanGroupedTieredPackagePrice } - variant :max_group_tiered_package, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage } + variant :max_group_tiered_package, -> { Orb::NewPlanMaxGroupTieredPackagePrice } - variant :scalable_matrix_with_unit_pricing, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing } + variant :scalable_matrix_with_unit_pricing, -> { Orb::NewPlanScalableMatrixWithUnitPricingPrice } - variant :scalable_matrix_with_tiered_pricing, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing } + variant :scalable_matrix_with_tiered_pricing, -> { Orb::NewPlanScalableMatrixWithTieredPricingPrice } - variant :cumulative_grouped_bulk, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk } + variant :cumulative_grouped_bulk, -> { Orb::NewPlanCumulativeGroupedBulkPrice } variant :cumulative_grouped_allocation, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation } + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation } + + variant :daily_credit_allowance, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance } - variant :minimum_composite, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite } + variant :metered_allowance, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance } - variant :percent, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent } + 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 +536,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 +548,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 +581,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 +649,19 @@ class Unit < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit) + # @!method initialize(bulk_with_filters_config:, cadence:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_filters) # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters} # for more details. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence] The cadence to bill for this price on. + # @param bulk_with_filters_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing + # + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # - # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing - # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b # # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi @@ -478,11 +690,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 +782,15 @@ module Cadence # @!method self.values # @return [Array] end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end end - class Tiered < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -539,24 +798,11 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation - ] - end - # @!attribute model_type # The pricing model type # - # @return [Symbol, :tiered] - required :model_type, const: :tiered + # @return [Symbol, :tiered_with_proration] + required :model_type, const: :tiered_with_proration # @!attribute name # The name of the price. @@ -564,11 +810,12 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute tiered_config - # Configuration for tiered pricing + # @!attribute tiered_with_proration_config + # Configuration for tiered_with_proration pricing # - # @return [Orb::Models::TieredConfig] - required :tiered_config, -> { Orb::TieredConfig } + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig] + required :tiered_with_proration_config, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig } # @!attribute billable_metric_id # The id of the billable metric for the price. Only needed if the price is @@ -603,7 +850,7 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::ConversionRateConfig }, nil?: true @@ -671,20 +918,18 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered) + # @!method initialize(cadence:, item_id:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration) # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration} # for more details. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # - # @param tiered_config [Orb::Models::TieredConfig] Configuration for tiered pricing + # @param tiered_with_proration_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b # @@ -714,11 +959,11 @@ class Tiered < Orb::Internal::Type::BaseModel # # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments # - # @param model_type [Symbol, :tiered] The pricing model type + # @param model_type [Symbol, :tiered_with_proration] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration#cadence module Cadence extend Orb::Internal::Type::Enum @@ -733,47 +978,66 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration#tiered_with_proration_config + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + # @!attribute tiers + # Tiers for rating based on total usage quantities into the specified tier with + # proration # - # @return [String] - required :amount, String + # @return [Array] + required :tiers, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] + end - # @!attribute currency - # The currency of the license allocation. + # @!method initialize(tiers:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig} + # for more details. # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. + # Configuration for tiered_with_proration pricing # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + class Tier < Orb::Internal::Type::BaseModel + # @!attribute tier_lower_bound + # Inclusive tier starting value + # + # @return [String] + required :tier_lower_bound, String + + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String + + # @!method initialize(tier_lower_bound:, unit_amount:) + # Configuration for a single tiered with proration tier + # + # @param tier_lower_bound [String] Inclusive tier starting value + # + # @param unit_amount [String] Amount per unit + end end end - class Bulk < Orb::Internal::Type::BaseModel - # @!attribute bulk_config - # Configuration for bulk pricing - # - # @return [Orb::Models::BulkConfig] - required :bulk_config, -> { Orb::BulkConfig } - + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence } + + # @!attribute grouped_with_min_max_thresholds_config + # Configuration for grouped_with_min_max_thresholds pricing + # + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] + required :grouped_with_min_max_thresholds_config, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -781,24 +1045,11 @@ class Bulk < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ] - end - # @!attribute model_type # The pricing model type # - # @return [Symbol, :bulk] - required :model_type, const: :bulk + # @return [Symbol, :grouped_with_min_max_thresholds] + required :model_type, const: :grouped_with_min_max_thresholds # @!attribute name # The name of the price. @@ -839,7 +1090,7 @@ class Bulk < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::ConversionRateConfig }, nil?: true @@ -907,19 +1158,17 @@ class Bulk < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(bulk_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk) + # @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds) # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds} # for more details. # - # @param bulk_config [Orb::Models::BulkConfig] Configuration for bulk pricing + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence] The cadence to bill for this price on. + # @param grouped_with_min_max_thresholds_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b @@ -950,11 +1199,11 @@ class Bulk < Orb::Internal::Type::BaseModel # # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments # - # @param model_type [Symbol, :bulk] The pricing model type + # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds#cadence module Cadence extend Orb::Internal::Type::Enum @@ -969,48 +1218,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 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 CumulativeGroupedAllocation < 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::CumulativeGroupedAllocation::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::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. @@ -1018,24 +1278,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, :cumulative_grouped_allocation] + required :model_type, const: :cumulative_grouped_allocation # @!attribute name # The name of the price. @@ -1076,7 +1323,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::CumulativeGroupedAllocation::ConversionRateConfig }, nil?: true @@ -1144,19 +1391,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:, 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::BulkWithFilters} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation} # 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::CumulativeGroupedAllocation::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 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 license_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 +1432,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, :cumulative_grouped_allocation] 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::CumulativeGroupedAllocation#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1280,41 +1451,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 Package < 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::Package::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::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. @@ -1322,24 +1511,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, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance # @!attribute name # The name of the price. @@ -1347,12 +1523,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 +1556,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::DailyCreditAllowance::ConversionRateConfig }, nil?: true @@ -1454,21 +1624,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:, 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::Package} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance} # 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::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 daily_credit_allowance_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance 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 +1665,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, :daily_credit_allowance] 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::DailyCreditAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1516,41 +1684,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 :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, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::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::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 currency [String] The currency of the license allocation. + # @param dimensions [Array] One or two event property values to evaluate matrix groups by # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + # @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 Matrix < 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::AddPrice::LicenseAllocationPrice::Matrix::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -1558,30 +1784,18 @@ 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 + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing # - # @return [Orb::Models::MatrixConfig] - required :matrix_config, -> { Orb::MatrixConfig } + # @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, :matrix] - required :model_type, const: :matrix + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance # @!attribute name # The name of the price. @@ -1622,7 +1836,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::MeteredAllowance::ConversionRateConfig }, nil?: true @@ -1690,18 +1904,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:, 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::Matrix} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance} # for more details. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::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 matrix_config [Orb::Models::MatrixConfig] Configuration for matrix pricing + # @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. # @@ -1733,11 +1945,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, :metered_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::MeteredAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1752,41 +1964,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 [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 [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @return [String, nil] + optional :consumption_display_name, String - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig} + # for more details. # - # @param currency [String] The currency of the license allocation. + # Configuration for metered_allowance pricing # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + # @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 ThresholdTotalAmount < 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::ThresholdTotalAmount::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -1794,24 +2042,11 @@ 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. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ] - end - # @!attribute model_type # The pricing model type # - # @return [Symbol, :threshold_total_amount] - required :model_type, const: :threshold_total_amount + # @return [Symbol, :percent] + required :model_type, const: :percent # @!attribute name # The name of the price. @@ -1819,12 +2054,12 @@ class ThresholdTotalAmount < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute threshold_total_amount_config - # Configuration for threshold_total_amount pricing + # @!attribute percent_config + # Configuration for percent pricing # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig] - required :threshold_total_amount_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig } + # @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 @@ -1859,7 +2094,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::Percent::ConversionRateConfig }, nil?: true @@ -1927,20 +2162,18 @@ 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:, 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::ThresholdTotalAmount} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent} # 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::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 threshold_total_amount_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig] Configuration for threshold_total_amount 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 # @@ -1970,11 +2203,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, :percent] 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::Percent#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1989,93 +2222,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. + # @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 [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @return [Float] + required :percent, Float - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. + # @!method initialize(percent:) + # Configuration for percent pricing # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + # @param percent [Float] What percent of the component subtotals to charge end + end - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount#threshold_total_amount_config - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - # @!attribute consumption_table - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - # - # @return [Array] - required :consumption_table, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ] - end - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(consumption_table:, prorate: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig} - # for more details. - # - # Configuration for threshold_total_amount pricing - # - # @param consumption_table [Array] When the quantity consumed passes a provided threshold, the configured total wil - # - # @param prorate [Boolean, nil] If true, the unit price will be prorated to the billing period - - class ConsumptionTable < Orb::Internal::Type::BaseModel - # @!attribute threshold - # - # @return [String] - required :threshold, String - - # @!attribute total_amount - # Total amount for this threshold - # - # @return [String] - required :total_amount, String - - # @!method initialize(threshold:, total_amount:) - # Configuration for a single threshold - # - # @param threshold [String] - # - # @param total_amount [String] Total amount for this threshold - end - end - end - - class TieredPackage < Orb::Internal::Type::BaseModel + class EventOutput < 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::EventOutput::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::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. @@ -2083,24 +2258,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, :event_output] + required :model_type, const: :event_output # @!attribute name # The name of the price. @@ -2108,13 +2270,6 @@ class TieredPackage < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute tiered_package_config - # Configuration for tiered_package pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig] - required :tiered_package_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig } - # @!attribute billable_metric_id # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -2148,7 +2303,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::EventOutput::ConversionRateConfig }, nil?: true @@ -2216,21 +2371,19 @@ 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:, 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::TieredPackage} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput} # 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::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 license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # - # @param tiered_package_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig] Configuration for tiered_package pricing - # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b # # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi @@ -2259,11 +2412,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, :event_output] 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::EventOutput#cadence module Cadence extend Orb::Internal::Type::Enum @@ -2278,405 +2431,528 @@ 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 + required :unit_rating_key, String - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage#tiered_package_config - class TieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute package_size + # @!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] - required :package_size, String + # @return [String, nil] + optional :default_unit_rate, String, nil?: true - # @!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. + # @!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 [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - end + # @return [String, nil] + optional :grouping_key, String, nil?: true - # @!method initialize(package_size:, tiers:) + # @!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::TieredPackage::TieredPackageConfig} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig} # for more details. # - # Configuration for tiered_package pricing + # Configuration for event_output pricing # - # @param package_size [String] + # @param unit_rating_key [String] The key in the event data to extract the unit rate from. # - # @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 default_unit_rate [String, nil] If provided, this amount will be used as the unit rate when an event does not ha + # + # @param grouping_key [String, nil] An optional key in the event data to group by (e.g., event ID). All events will end end - class TieredWithMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence } + # @!method self.variants + # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput)] + end + end - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String + class RemoveAdjustment < Orb::Internal::Type::BaseModel + # @!attribute adjustment_id + # The id of the adjustment to remove from on the plan. + # + # @return [String] + required :adjustment_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted 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 plan_phase_order + # The phase to remove this adjustment from. + # + # @return [Integer, nil] + optional :plan_phase_order, Integer, nil?: true - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_with_minimum] - required :model_type, const: :tiered_with_minimum + # @!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 name - # The name of the price. - # - # @return [String] - required :name, String + 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 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 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::Beta::ExternalPlanIDCreatePlanVersionParams::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 replaces_adjustment_id + # The id of the adjustment on the plan to replace in the plan. + # + # @return [String] + required :replaces_adjustment_id, String - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true + # @!attribute plan_phase_order + # The phase to replace this adjustment from. + # + # @return [Integer, nil] + optional :plan_phase_order, Integer, nil?: true - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::ConversionRateConfig - }, - nil?: true + # @!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 currency - # 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 plan. + # + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::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 + variant :percentage_discount, -> { Orb::NewPercentageDiscount } - # @!attribute fixed_price_quantity - # 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 :usage_discount, -> { Orb::NewUsageDiscount } - # @!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 :amount_discount, -> { Orb::NewAmountDiscount } - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are 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 :minimum, -> { Orb::NewMinimum } - # @!attribute 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 :maximum, -> { Orb::NewMaximum } - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can 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 self.variants + # @return [Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum)] + end + end - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, 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 - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_with_minimum_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_with_minimum_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig] Configuration for tiered_with_minimum pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # @!attribute allocation_price + # The allocation price to add to the plan. + # + # @return [Orb::Models::NewAllocationPrice, nil] + optional :allocation_price, -> { Orb::NewAllocationPrice }, nil?: true + + # @!attribute license_allocation_price + # The license allocation price to add to the plan. + # + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice, nil] + optional :license_allocation_price, + -> { + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice + }, + nil?: true + + # @!attribute plan_phase_order + # The phase to replace this price from. + # + # @return [Integer, nil] + optional :plan_phase_order, Integer, nil?: true + + # @!attribute price + # New plan price request body params. + # + # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::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 + + # @!method initialize(replaces_price_id:, allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil) + # @param replaces_price_id [String] The id of the price on the plan to replace in the plan. + # + # @param allocation_price [Orb::Models::NewAllocationPrice, nil] The allocation price to add to the plan. + # + # @param license_allocation_price [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice, nil] The license allocation price to add to the plan. + # + # @param plan_phase_order [Integer, nil] The phase to replace this price from. + # + # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] New plan price request body params. + + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice#license_allocation_price + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence] + required :cadence, + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute license_allocations + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + # + # @return [Array] + required :license_allocations, + -> { Orb::Internal::Type::ArrayOf[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation] } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType] + required :model_type, + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType } + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute unit_config + # Configuration for unit pricing + # + # @return [Orb::Models::UnitConfig] + required :unit_config, -> { Orb::UnitConfig } + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, license_allocations:, model_type:, name:, unit_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice} + # for more details. + # + # The license allocation price to add to the plan. + # + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # + # @param model_type [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType] The pricing model type + # + # @param name [String] The name of the price. + # + # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + + # The cadence to bill for this price on. + # + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + class LicenseAllocation < Orb::Internal::Type::BaseModel + # @!attribute amount + # The amount of credits granted per active license per cadence. # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # @return [String] + required :amount, String + + # @!attribute currency + # The currency of the license allocation. # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # @return [String] + required :currency, String + + # @!attribute write_off_overage + # When True, overage beyond the allocation is written off. # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # @return [Boolean, nil] + optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + + # @!method initialize(amount:, currency:, write_off_overage: nil) + # @param amount [String] The amount of credits granted per active license per cadence. # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # @param currency [String] The currency of the license allocation. # - # @param model_type [Symbol, :tiered_with_minimum] The pricing model type + # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + end - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum + # The pricing model type + # + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice#model_type + module ModelType + extend Orb::Internal::Type::Enum - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom + UNIT = :unit - # @!method self.values - # @return [Array] - end + # @!method self.values + # @return [Array] + 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 + # New plan price request body params. + # + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice#price + module Price + extend Orb::Internal::Type::Union - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String + discriminator :model_type - # @!attribute write_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 :unit, -> { Orb::NewPlanUnitPrice } - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param 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 :tiered, -> { Orb::NewPlanTieredPrice } - # @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 + variant :bulk, -> { Orb::NewPlanBulkPrice } - # @!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 + variant :bulk_with_filters, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters } - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean + variant :package, -> { Orb::NewPlanPackagePrice } - # @!method initialize(tiers:, hide_zero_amount_tiers: nil, prorate: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig} - # for more details. - # - # Configuration for tiered_with_minimum pricing - # - # @param tiers [Array] Tiered pricing with a minimum amount dependent on the volume tier. Tiers are def - # - # @param hide_zero_amount_tiers [Boolean] If true, tiers with an accrued amount of 0 will not be included in the rating. - # - # @param prorate [Boolean] If true, the unit price will be prorated to the billing period + variant :matrix, -> { Orb::NewPlanMatrixPrice } - class Tier < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # - # @return [String] - required :minimum_amount, String + variant :threshold_total_amount, -> { Orb::NewPlanThresholdTotalAmountPrice } - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String + variant :tiered_package, -> { Orb::NewPlanTieredPackagePrice } - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String + variant :tiered_with_minimum, -> { Orb::NewPlanTieredWithMinimumPrice } - # @!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 + 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::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::Beta::ExternalPlanIDCreatePlanVersionParams::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::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation } + + variant :daily_credit_allowance, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance } + + variant :metered_allowance, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance } + + variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } + + variant :percent, -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent } + + 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 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] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence } - - # @!attribute grouped_tiered_config - # Configuration for grouped_tiered pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig] - required :grouped_tiered_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -2684,24 +2960,11 @@ class GroupedTiered < 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::GroupedTiered::LicenseAllocation - ] - end - # @!attribute model_type # The pricing model type # - # @return [Symbol, :grouped_tiered] - required :model_type, const: :grouped_tiered + # @return [Symbol, :bulk_with_filters] + required :model_type, const: :bulk_with_filters # @!attribute name # The name of the price. @@ -2742,7 +3005,7 @@ class GroupedTiered < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::ConversionRateConfig }, nil?: true @@ -2810,19 +3073,17 @@ class GroupedTiered < Orb::Internal::Type::BaseModel # @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) + # @!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::GroupedTiered} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters} # for more details. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::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 grouped_tiered_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig] Configuration for grouped_tiered 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 billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b @@ -2853,112 +3114,107 @@ class GroupedTiered < 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_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 + # @param model_type [Symbol, :bulk_with_filters] The pricing model type - 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 + # @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 [String] - required :grouping_key, String + # @return [Array] + required :filters, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] + end # @!attribute tiers - # Apply tiered pricing to each segment generated after grouping with the provided - # key + # Bulk tiers for rating based on total usage volume # - # @return [Array] + # @return [Array] required :tiers, -> do Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::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 + # @!method initialize(filters:, tiers:) + # Configuration for bulk_with_filters pricing # - # @param grouping_key [String] The billable metric property used to group before tiering + # @param filters [Array] Property filters to apply (all must match) # - # @param tiers [Array] Apply tiered pricing to each segment generated after grouping with the provided + # @param tiers [Array] Bulk tiers for rating based on total usage volume - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound + class Filter < Orb::Internal::Type::BaseModel + # @!attribute property_key + # Event property key to filter on # # @return [String] - required :tier_lower_bound, 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 - # Per unit amount + # Amount per unit # # @return [String] required :unit_amount, String - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier + # @!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 tier_lower_bound [String] + # @param unit_amount [String] Amount per unit # - # @param unit_amount [String] Per unit amount + # @param tier_lower_bound [String, nil] The lower bound for this tier 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 + # The cadence to bill for this price on. + # + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters#cadence + module Cadence + extend Orb::Internal::Type::Enum - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @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 self.values + # @return [Array] end end - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -2966,24 +3222,11 @@ class TieredPackageWithMinimum < 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::TieredPackageWithMinimum::LicenseAllocation - ] - end - # @!attribute model_type # The pricing model type # - # @return [Symbol, :tiered_package_with_minimum] - required :model_type, const: :tiered_package_with_minimum + # @return [Symbol, :tiered_with_proration] + required :model_type, const: :tiered_with_proration # @!attribute name # The name of the price. @@ -2991,12 +3234,12 @@ class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute tiered_package_with_minimum_config - # Configuration for tiered_package_with_minimum pricing + # @!attribute tiered_with_proration_config + # Configuration for tiered_with_proration pricing # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig] - required :tiered_package_with_minimum_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig } + # @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 @@ -3031,7 +3274,7 @@ class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::ConversionRateConfig }, nil?: true @@ -3099,20 +3342,18 @@ class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel # @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) + # @!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::TieredPackageWithMinimum} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration} # for more details. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence] The cadence to bill for this price on. + # @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 license_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 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 # @@ -3142,11 +3383,11 @@ class TieredPackageWithMinimum < 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_with_minimum] 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::TieredPackageWithMinimum#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration#cadence module Cadence extend Orb::Internal::Type::Enum @@ -3161,96 +3402,66 @@ 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::TieredPackageWithMinimum#tiered_package_with_minimum_config - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute package_size - # - # @return [Float] - required :package_size, Float - + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration#tiered_with_proration_config + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. + # Tiers for rating based on total usage quantities into the specified tier with + # proration # - # @return [Array] + # @return [Array] required :tiers, -> do Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier ] end - # @!method initialize(package_size:, tiers:) + # @!method initialize(tiers:) # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig} # for more details. # - # Configuration for tiered_package_with_minimum pricing - # - # @param package_size [Float] + # Configuration for tiered_with_proration pricing # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a + # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr class Tier < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount + # @!attribute tier_lower_bound + # Inclusive tier starting value # # @return [String] - required :minimum_amount, String + required :tier_lower_bound, String - # @!attribute per_unit + # @!attribute unit_amount + # Amount per unit # # @return [String] - required :per_unit, String + required :unit_amount, String - # @!attribute tier_lower_bound + # @!method initialize(tier_lower_bound:, unit_amount:) + # Configuration for a single tiered with proration tier # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(minimum_amount:, per_unit:, tier_lower_bound:) - # Configuration for a single tier + # @param tier_lower_bound [String] Inclusive tier starting value # - # @param minimum_amount [String] - # @param per_unit [String] - # @param tier_lower_bound [String] + # @param unit_amount [String] Amount per unit end end end - class PackageWithAllocation < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::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. @@ -3258,24 +3469,11 @@ class PackageWithAllocation < 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::PackageWithAllocation::LicenseAllocation - ] - end - # @!attribute model_type # The pricing model type # - # @return [Symbol, :package_with_allocation] - required :model_type, const: :package_with_allocation + # @return [Symbol, :grouped_with_min_max_thresholds] + required :model_type, const: :grouped_with_min_max_thresholds # @!attribute name # The name of the price. @@ -3283,13 +3481,6 @@ class PackageWithAllocation < Orb::Internal::Type::BaseModel # @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. @@ -3323,7 +3514,7 @@ class PackageWithAllocation < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::ConversionRateConfig }, nil?: true @@ -3391,21 +3582,19 @@ class PackageWithAllocation < Orb::Internal::Type::BaseModel # @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) + # @!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::PackageWithAllocation} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds} # for more details. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::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. # - # @param license_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 @@ -3434,16045 +3623,11 @@ class PackageWithAllocation < 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_with_allocation] The pricing model type + # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation#package_with_allocation_config - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute allocation - # - # @return [String] - required :allocation, String - - # @!attribute package_amount - # - # @return [String] - required :package_amount, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!method initialize(allocation:, package_amount:, package_size:) - # Configuration for package_with_allocation pricing - # - # @param allocation [String] - # @param package_amount [String] - # @param package_size [String] - end - end - - class UnitWithPercent < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :unit_with_percent] - required :model_type, const: :unit_with_percent - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_with_percent_config - # Configuration for unit_with_percent pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig] - required :unit_with_percent_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_with_percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit_with_percent) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param unit_with_percent_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig] Configuration for unit_with_percent pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :unit_with_percent] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent#unit_with_percent_config - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - # @!attribute percent - # What percent, out of 100, of the calculated total to charge - # - # @return [String] - required :percent, String - - # @!attribute unit_amount - # Rate per unit of usage - # - # @return [String] - required :unit_amount, String - - # @!method initialize(percent:, unit_amount:) - # Configuration for unit_with_percent pricing - # - # @param percent [String] What percent, out of 100, of the calculated total to charge - # - # @param unit_amount [String] Rate per unit of usage - end - end - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ] - end - - # @!attribute matrix_with_allocation_config - # Configuration for matrix_with_allocation pricing - # - # @return [Orb::Models::MatrixWithAllocationConfig] - required :matrix_with_allocation_config, -> { Orb::MatrixWithAllocationConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix_with_allocation] - required :model_type, const: :matrix_with_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_with_allocation_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_with_allocation_config [Orb::Models::MatrixWithAllocationConfig] Configuration for matrix_with_allocation pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix_with_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_with_proration] - required :model_type, const: :tiered_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_proration_config - # Configuration for tiered_with_proration pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig] - required :tiered_with_proration_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_with_proration_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_with_proration] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration#tiered_with_proration_config - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Tiers for rating based on total usage quantities into the specified tier with - # proration - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - end - - # @!method initialize(tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig} - # for more details. - # - # Configuration for tiered_with_proration pricing - # - # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # Inclusive tier starting value - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tiered with proration tier - # - # @param tier_lower_bound [String] Inclusive tier starting value - # - # @param unit_amount [String] Amount per unit - end - end - end - - class UnitWithProration < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :unit_with_proration] - required :model_type, const: :unit_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_with_proration_config - # Configuration for unit_with_proration pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig] - required :unit_with_proration_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param unit_with_proration_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig] Configuration for unit_with_proration pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :unit_with_proration] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration#unit_with_proration_config - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Rate per unit of usage - # - # @return [String] - required :unit_amount, String - - # @!method initialize(unit_amount:) - # Configuration for unit_with_proration pricing - # - # @param unit_amount [String] Rate per unit of usage - end - end - - class GroupedAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence } - - # @!attribute grouped_allocation_config - # Configuration for grouped_allocation pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig] - required :grouped_allocation_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_allocation] - required :model_type, const: :grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_allocation_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param grouped_allocation_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig] Configuration for grouped_allocation pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation#grouped_allocation_config - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute allocation - # Usage allocation per group - # - # @return [String] - required :allocation, String - - # @!attribute grouping_key - # How to determine the groups that should each be allocated some quantity - # - # @return [String] - required :grouping_key, String - - # @!attribute overage_unit_rate - # Unit rate for post-allocation - # - # @return [String] - required :overage_unit_rate, String - - # @!method initialize(allocation:, grouping_key:, overage_unit_rate:) - # Configuration for grouped_allocation pricing - # - # @param allocation [String] Usage allocation per group - # - # @param grouping_key [String] How to determine the groups that should each be allocated some quantity - # - # @param overage_unit_rate [String] Unit rate for post-allocation - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class BulkWithProration < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_proration_config - # Configuration for bulk_with_proration pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig] - required :bulk_with_proration_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk_with_proration] - required :model_type, const: :bulk_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_with_proration_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration} - # for more details. - # - # @param bulk_with_proration_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig] Configuration for bulk_with_proration pricing - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk_with_proration] The pricing model type - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration#bulk_with_proration_config - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Bulk tiers for rating based on total usage volume - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - end - - # @!method initialize(tiers:) - # Configuration for bulk_with_proration pricing - # - # @param tiers [Array] Bulk tiers for rating based on total usage volume - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Cost per unit - # - # @return [String] - required :unit_amount, String - - # @!attribute tier_lower_bound - # The lower bound for this tier - # - # @return [String, nil] - optional :tier_lower_bound, String, nil?: true - - # @!method initialize(unit_amount:, tier_lower_bound: nil) - # Configuration for a single bulk pricing tier with proration - # - # @param unit_amount [String] Cost per unit - # - # @param tier_lower_bound [String, nil] The lower bound for this tier - end - end - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence } - - # @!attribute grouped_with_prorated_minimum_config - # Configuration for grouped_with_prorated_minimum pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig] - required :grouped_with_prorated_minimum_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_prorated_minimum] - required :model_type, const: :grouped_with_prorated_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_prorated_minimum_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_prorated_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_prorated_minimum_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig] Configuration for grouped_with_prorated_minimum pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_prorated_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum#grouped_with_prorated_minimum_config - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # How to determine the groups that should each have a minimum - # - # @return [String] - required :grouping_key, String - - # @!attribute minimum - # The minimum amount to charge per group - # - # @return [String] - required :minimum, String - - # @!attribute unit_rate - # The amount to charge per unit - # - # @return [String] - required :unit_rate, String - - # @!method initialize(grouping_key:, minimum:, unit_rate:) - # Configuration for grouped_with_prorated_minimum pricing - # - # @param grouping_key [String] How to determine the groups that should each have a minimum - # - # @param minimum [String] The minimum amount to charge per group - # - # @param unit_rate [String] The amount to charge per unit - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence } - - # @!attribute grouped_with_metered_minimum_config - # Configuration for grouped_with_metered_minimum pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig] - required :grouped_with_metered_minimum_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_metered_minimum] - required :model_type, const: :grouped_with_metered_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_metered_minimum_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_metered_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_metered_minimum_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig] Configuration for grouped_with_metered_minimum pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_metered_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum#grouped_with_metered_minimum_config - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - # - # @return [String] - required :grouping_key, String - - # @!attribute minimum_unit_amount - # The minimum amount to charge per group per unit - # - # @return [String] - required :minimum_unit_amount, String - - # @!attribute pricing_key - # Used to determine the unit rate - # - # @return [String] - required :pricing_key, String - - # @!attribute scaling_factors - # Scale the unit rates by the scaling factor. - # - # @return [Array] - required :scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ] - end - - # @!attribute scaling_key - # Used to determine the unit rate scaling factor - # - # @return [String] - required :scaling_key, String - - # @!attribute unit_amounts - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - # - # @return [Array] - required :unit_amounts, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - end - - # @!method initialize(grouping_key:, minimum_unit_amount:, pricing_key:, scaling_factors:, scaling_key:, unit_amounts:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig} - # for more details. - # - # Configuration for grouped_with_metered_minimum pricing - # - # @param grouping_key [String] Used to partition the usage into groups. The minimum amount is applied to each g - # - # @param minimum_unit_amount [String] The minimum amount to charge per group per unit - # - # @param pricing_key [String] Used to determine the unit rate - # - # @param scaling_factors [Array] Scale the unit rates by the scaling factor. - # - # @param scaling_key [String] Used to determine the unit rate scaling factor - # - # @param unit_amounts [Array] Apply per unit pricing to each pricing value. The minimum amount is applied any - - class ScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute scaling_value - # - # @return [String] - required :scaling_value, String - - # @!method initialize(scaling_factor:, scaling_value:) - # Configuration for a scaling factor - # - # @param scaling_factor [String] - # @param scaling_value [String] - end - - class UnitAmount < Orb::Internal::Type::BaseModel - # @!attribute pricing_value - # - # @return [String] - required :pricing_value, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(pricing_value:, unit_amount:) - # Configuration for a unit amount - # - # @param pricing_value [String] - # - # @param unit_amount [String] Per unit amount - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence } - - # @!attribute grouped_with_min_max_thresholds_config - # Configuration for grouped_with_min_max_thresholds pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] - required :grouped_with_min_max_thresholds_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_min_max_thresholds] - required :model_type, const: :grouped_with_min_max_thresholds - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_min_max_thresholds_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before applying thresholds - # - # @return [String] - required :grouping_key, String - - # @!attribute maximum_charge - # The maximum amount to charge each group - # - # @return [String] - required :maximum_charge, String - - # @!attribute minimum_charge - # The minimum amount to charge each group, regardless of usage - # - # @return [String] - required :minimum_charge, String - - # @!attribute per_unit_rate - # The base price charged per group - # - # @return [String] - required :per_unit_rate, String - - # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) - # Configuration for grouped_with_min_max_thresholds pricing - # - # @param grouping_key [String] The event property used to group before applying thresholds - # - # @param maximum_charge [String] The maximum amount to charge each group - # - # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage - # - # @param per_unit_rate [String] The base price charged per group - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ] - end - - # @!attribute matrix_with_display_name_config - # Configuration for matrix_with_display_name pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig] - required :matrix_with_display_name_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix_with_display_name] - required :model_type, const: :matrix_with_display_name - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_with_display_name_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_display_name) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_with_display_name_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig] Configuration for matrix_with_display_name pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix_with_display_name] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName#matrix_with_display_name_config - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - # @!attribute dimension - # Used to determine the unit rate - # - # @return [String] - required :dimension, String - - # @!attribute unit_amounts - # Apply per unit pricing to each dimension value - # - # @return [Array] - required :unit_amounts, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - end - - # @!method initialize(dimension:, unit_amounts:) - # Configuration for matrix_with_display_name pricing - # - # @param dimension [String] Used to determine the unit rate - # - # @param unit_amounts [Array] Apply per unit pricing to each dimension value - - class UnitAmount < Orb::Internal::Type::BaseModel - # @!attribute dimension_value - # The dimension value - # - # @return [String] - required :dimension_value, String - - # @!attribute display_name - # Display name for this dimension value - # - # @return [String] - required :display_name, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(dimension_value:, display_name:, unit_amount:) - # Configuration for a unit amount item - # - # @param dimension_value [String] The dimension value - # - # @param display_name [String] Display name for this dimension value - # - # @param unit_amount [String] Per unit amount - end - end - end - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence } - - # @!attribute grouped_tiered_package_config - # Configuration for grouped_tiered_package pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig] - required :grouped_tiered_package_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_tiered_package] - required :model_type, const: :grouped_tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_tiered_package_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence] The cadence to bill for this price on. - # - # @param grouped_tiered_package_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig] Configuration for grouped_tiered_package pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage#grouped_tiered_package_config - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before tiering - # - # @return [String] - required :grouping_key, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - end - - # @!method initialize(grouping_key:, package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig} - # for more details. - # - # Configuration for grouped_tiered_package pricing - # - # @param grouping_key [String] The event property used to group before tiering - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute per_unit - # Per package - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(per_unit:, tier_lower_bound:) - # Configuration for a single tier - # - # @param per_unit [String] Per package - # - # @param tier_lower_bound [String] - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ] - end - - # @!attribute max_group_tiered_package_config - # Configuration for max_group_tiered_package pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig] - required :max_group_tiered_package_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :max_group_tiered_package] - required :model_type, const: :max_group_tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, max_group_tiered_package_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :max_group_tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param max_group_tiered_package_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig] Configuration for max_group_tiered_package pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :max_group_tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage#max_group_tiered_package_config - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before tiering the group with the highest value - # - # @return [String] - required :grouping_key, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing to the largest group after grouping with the provided key. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - end - - # @!method initialize(grouping_key:, package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig} - # for more details. - # - # Configuration for max_group_tiered_package pricing - # - # @param grouping_key [String] The event property used to group before tiering the group with the highest value - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing to the largest group after grouping with the provided key. - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - end - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :scalable_matrix_with_unit_pricing] - required :model_type, const: :scalable_matrix_with_unit_pricing - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute scalable_matrix_with_unit_pricing_config - # Configuration for scalable_matrix_with_unit_pricing pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig] - required :scalable_matrix_with_unit_pricing_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, scalable_matrix_with_unit_pricing_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :scalable_matrix_with_unit_pricing) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param scalable_matrix_with_unit_pricing_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig] Configuration for scalable_matrix_with_unit_pricing pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :scalable_matrix_with_unit_pricing] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing#scalable_matrix_with_unit_pricing_config - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - # @!attribute first_dimension - # Used to determine the unit rate - # - # @return [String] - required :first_dimension, String - - # @!attribute matrix_scaling_factors - # Apply a scaling factor to each dimension - # - # @return [Array] - required :matrix_scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ] - end - - # @!attribute unit_price - # The final unit price to rate against the output of the matrix - # - # @return [String] - required :unit_price, String - - # @!attribute grouping_key - # The property used to group this price - # - # @return [String, nil] - optional :grouping_key, String, nil?: true - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute second_dimension - # Used to determine the unit rate (optional) - # - # @return [String, nil] - optional :second_dimension, String, nil?: true - - # @!method initialize(first_dimension:, matrix_scaling_factors:, unit_price:, grouping_key: nil, prorate: nil, second_dimension: nil) - # Configuration for scalable_matrix_with_unit_pricing pricing - # - # @param first_dimension [String] Used to determine the unit rate - # - # @param matrix_scaling_factors [Array] Apply a scaling factor to each dimension - # - # @param unit_price [String] The final unit price to rate against the output of the matrix - # - # @param grouping_key [String, nil] The property used to group this price - # - # @param prorate [Boolean, nil] If true, the unit price will be prorated to the billing period - # - # @param second_dimension [String, nil] Used to determine the unit rate (optional) - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute first_dimension_value - # - # @return [String] - required :first_dimension_value, String - - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute second_dimension_value - # - # @return [String, nil] - optional :second_dimension_value, String, nil?: true - - # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil) - # Configuration for a single matrix scaling factor - # - # @param first_dimension_value [String] - # @param scaling_factor [String] - # @param second_dimension_value [String, nil] - end - end - end - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :scalable_matrix_with_tiered_pricing] - required :model_type, const: :scalable_matrix_with_tiered_pricing - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute scalable_matrix_with_tiered_pricing_config - # Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig] - required :scalable_matrix_with_tiered_pricing_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, scalable_matrix_with_tiered_pricing_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :scalable_matrix_with_tiered_pricing) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param scalable_matrix_with_tiered_pricing_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig] Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :scalable_matrix_with_tiered_pricing] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing#scalable_matrix_with_tiered_pricing_config - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - # @!attribute first_dimension - # Used for the scalable matrix first dimension - # - # @return [String] - required :first_dimension, String - - # @!attribute matrix_scaling_factors - # Apply a scaling factor to each dimension - # - # @return [Array] - required :matrix_scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ] - end - - # @!attribute tiers - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ] - end - - # @!attribute second_dimension - # Used for the scalable matrix second dimension (optional) - # - # @return [String, nil] - optional :second_dimension, String, nil?: true - - # @!method initialize(first_dimension:, matrix_scaling_factors:, tiers:, second_dimension: nil) - # Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @param first_dimension [String] Used for the scalable matrix first dimension - # - # @param matrix_scaling_factors [Array] Apply a scaling factor to each dimension - # - # @param tiers [Array] - # - # @param second_dimension [String, nil] Used for the scalable matrix second dimension (optional) - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute first_dimension_value - # - # @return [String] - required :first_dimension_value, String - - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute second_dimension_value - # - # @return [String, nil] - optional :second_dimension_value, String, nil?: true - - # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil) - # Configuration for a single matrix scaling factor - # - # @param first_dimension_value [String] - # @param scaling_factor [String] - # @param second_dimension_value [String, nil] - end - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier entry with business logic - # - # @param tier_lower_bound [String] - # @param unit_amount [String] - end - end - end - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence } - - # @!attribute cumulative_grouped_bulk_config - # Configuration for cumulative_grouped_bulk pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig] - required :cumulative_grouped_bulk_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :cumulative_grouped_bulk] - required :model_type, const: :cumulative_grouped_bulk - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, cumulative_grouped_bulk_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_bulk) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_bulk_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig] Configuration for cumulative_grouped_bulk pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :cumulative_grouped_bulk] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk#cumulative_grouped_bulk_config - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - # @!attribute dimension_values - # Each tier lower bound must have the same group of values. - # - # @return [Array] - required :dimension_values, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ] - end - - # @!attribute group - # - # @return [String] - required :group, String - - # @!method initialize(dimension_values:, group:) - # Configuration for cumulative_grouped_bulk pricing - # - # @param dimension_values [Array] Each tier lower bound must have the same group of values. - # - # @param group [String] - - class DimensionValue < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # Grouping key value - # - # @return [String] - required :grouping_key, String - - # @!attribute tier_lower_bound - # Tier lower bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Unit amount for this combination - # - # @return [String] - required :unit_amount, String - - # @!method initialize(grouping_key:, tier_lower_bound:, unit_amount:) - # Configuration for a dimension value entry - # - # @param grouping_key [String] Grouping key value - # - # @param tier_lower_bound [String] Tier lower bound - # - # @param unit_amount [String] Unit amount for this combination - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence } - - # @!attribute cumulative_grouped_allocation_config - # Configuration for cumulative_grouped_allocation pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] - required :cumulative_grouped_allocation_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :cumulative_grouped_allocation] - required :model_type, const: :cumulative_grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, cumulative_grouped_allocation_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_allocation_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation#cumulative_grouped_allocation_config - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute cumulative_allocation - # The overall allocation across all groups - # - # @return [String] - required :cumulative_allocation, String - - # @!attribute group_allocation - # The allocation per individual group - # - # @return [String] - required :group_allocation, String - - # @!attribute grouping_key - # The event property used to group usage before applying allocations - # - # @return [String] - required :grouping_key, String - - # @!attribute unit_amount - # The amount to charge for each unit outside of the allocation - # - # @return [String] - required :unit_amount, String - - # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:) - # Configuration for cumulative_grouped_allocation pricing - # - # @param cumulative_allocation [String] The overall allocation across all groups - # - # @param group_allocation [String] The allocation per individual group - # - # @param grouping_key [String] The event property used to group usage before applying allocations - # - # @param unit_amount [String] The amount to charge for each unit outside of the allocation - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MinimumComposite < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ] - end - - # @!attribute minimum_composite_config - # Configuration for minimum_composite pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig] - required :minimum_composite_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :minimum_composite] - required :model_type, const: :minimum_composite - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, minimum_composite_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :minimum_composite) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param minimum_composite_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig] Configuration for minimum_composite pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :minimum_composite] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite#minimum_composite_config - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # The minimum amount to apply - # - # @return [String] - required :minimum_amount, String - - # @!attribute prorated - # If true, subtotals from this price are prorated based on the service period - # - # @return [Boolean, nil] - optional :prorated, Orb::Internal::Type::Boolean - - # @!method initialize(minimum_amount:, prorated: nil) - # Configuration for minimum_composite pricing - # - # @param minimum_amount [String] The minimum amount to apply - # - # @param prorated [Boolean] If true, subtotals from this price are prorated based on the service period - end - end - - class Percent < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :percent] - required :model_type, const: :percent - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute percent_config - # Configuration for percent pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig] - required :percent_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :percent) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param percent_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig] Configuration for percent pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :percent] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent#percent_config - class PercentConfig < Orb::Internal::Type::BaseModel - # @!attribute percent - # What percent of the component subtotals to charge - # - # @return [Float] - required :percent, Float - - # @!method initialize(percent:) - # Configuration for percent pricing - # - # @param percent [Float] What percent of the component subtotals to charge - end - end - - class EventOutput < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence } - - # @!attribute event_output_config - # Configuration for event_output pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig] - required :event_output_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :event_output] - required :model_type, const: :event_output - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, event_output_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :event_output) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence] The cadence to bill for this price on. - # - # @param event_output_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig] Configuration for event_output pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :event_output] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput#event_output_config - class EventOutputConfig < Orb::Internal::Type::BaseModel - # @!attribute unit_rating_key - # The key in the event data to extract the unit rate from. - # - # @return [String] - required :unit_rating_key, String - - # @!attribute default_unit_rate - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - # - # @return [String, nil] - optional :default_unit_rate, String, nil?: true - - # @!attribute grouping_key - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - # - # @return [String, nil] - optional :grouping_key, String, nil?: true - - # @!method initialize(unit_rating_key:, default_unit_rate: nil, grouping_key: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig} - # for more details. - # - # Configuration for event_output pricing - # - # @param unit_rating_key [String] The key in the event data to extract the unit rate from. - # - # @param default_unit_rate [String, nil] If provided, this amount will be used as the unit rate when an event does not ha - # - # @param grouping_key [String, nil] An optional key in the event data to group by (e.g., event ID). All events will - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - # @!method self.variants - # @return [Array(Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput)] - end - - # New plan price request body params. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice#price - module Price - extend Orb::Internal::Type::Union - - discriminator :model_type - - variant :unit, -> { Orb::NewPlanUnitPrice } - - variant :tiered, -> { Orb::NewPlanTieredPrice } - - variant :bulk, -> { Orb::NewPlanBulkPrice } - - variant :bulk_with_filters, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters } - - variant :package, -> { Orb::NewPlanPackagePrice } - - variant :matrix, -> { Orb::NewPlanMatrixPrice } - - variant :threshold_total_amount, -> { Orb::NewPlanThresholdTotalAmountPrice } - - variant :tiered_package, -> { Orb::NewPlanTieredPackagePrice } - - variant :tiered_with_minimum, -> { Orb::NewPlanTieredWithMinimumPrice } - - variant :grouped_tiered, -> { Orb::NewPlanGroupedTieredPrice } - - variant :tiered_package_with_minimum, -> { Orb::NewPlanTieredPackageWithMinimumPrice } - - variant :package_with_allocation, -> { Orb::NewPlanPackageWithAllocationPrice } - - variant :unit_with_percent, -> { Orb::NewPlanUnitWithPercentPrice } - - variant :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice } - - variant :tiered_with_proration, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration } - - variant :unit_with_proration, -> { Orb::NewPlanUnitWithProrationPrice } - - variant :grouped_allocation, -> { Orb::NewPlanGroupedAllocationPrice } - - variant :bulk_with_proration, -> { Orb::NewPlanBulkWithProrationPrice } - - variant :grouped_with_prorated_minimum, -> { Orb::NewPlanGroupedWithProratedMinimumPrice } - - variant :grouped_with_metered_minimum, -> { Orb::NewPlanGroupedWithMeteredMinimumPrice } - - variant :grouped_with_min_max_thresholds, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds } - - variant :matrix_with_display_name, -> { Orb::NewPlanMatrixWithDisplayNamePrice } - - variant :grouped_tiered_package, -> { Orb::NewPlanGroupedTieredPackagePrice } - - variant :max_group_tiered_package, -> { Orb::NewPlanMaxGroupTieredPackagePrice } - - variant :scalable_matrix_with_unit_pricing, -> { Orb::NewPlanScalableMatrixWithUnitPricingPrice } - - variant :scalable_matrix_with_tiered_pricing, -> { Orb::NewPlanScalableMatrixWithTieredPricingPrice } - - variant :cumulative_grouped_bulk, -> { Orb::NewPlanCumulativeGroupedBulkPrice } - - variant :cumulative_grouped_allocation, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation } - - variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } - - variant :percent, -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent } - - variant :event_output, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput } - - class BulkWithFilters < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_filters_config - # Configuration for bulk_with_filters pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig] - required :bulk_with_filters_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk_with_filters] - required :model_type, const: :bulk_with_filters - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_with_filters_config:, cadence:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_filters) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters} - # for more details. - # - # @param bulk_with_filters_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk_with_filters] The pricing model type - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters#bulk_with_filters_config - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - # @!attribute filters - # Property filters to apply (all must match) - # - # @return [Array] - required :filters, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - end - - # @!attribute tiers - # Bulk tiers for rating based on total usage volume - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - end - - # @!method initialize(filters:, tiers:) - # Configuration for bulk_with_filters pricing - # - # @param filters [Array] Property filters to apply (all must match) - # - # @param tiers [Array] Bulk tiers for rating based on total usage volume - - class Filter < Orb::Internal::Type::BaseModel - # @!attribute property_key - # Event property key to filter on - # - # @return [String] - required :property_key, String - - # @!attribute property_value - # Event property value to match - # - # @return [String] - required :property_value, String - - # @!method initialize(property_key:, property_value:) - # Configuration for a single property filter - # - # @param property_key [String] Event property key to filter on - # - # @param property_value [String] Event property value to match - end - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!attribute tier_lower_bound - # The lower bound for this tier - # - # @return [String, nil] - optional :tier_lower_bound, String, nil?: true - - # @!method initialize(unit_amount:, tier_lower_bound: nil) - # Configuration for a single bulk pricing tier - # - # @param unit_amount [String] Amount per unit - # - # @param tier_lower_bound [String, nil] The lower bound for this tier - end - end - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_with_proration] - required :model_type, const: :tiered_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_proration_config - # Configuration for tiered_with_proration pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig] - required :tiered_with_proration_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param name [String] The name of the price. - # - # @param tiered_with_proration_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_with_proration] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration#tiered_with_proration_config - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Tiers for rating based on total usage quantities into the specified tier with - # proration - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - end - - # @!method initialize(tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig} - # for more details. - # - # Configuration for tiered_with_proration pricing - # - # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # Inclusive tier starting value - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tiered with proration tier - # - # @param tier_lower_bound [String] Inclusive tier starting value - # - # @param unit_amount [String] Amount per unit - end - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence } - - # @!attribute grouped_with_min_max_thresholds_config - # Configuration for grouped_with_min_max_thresholds pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] - required :grouped_with_min_max_thresholds_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_min_max_thresholds] - required :model_type, const: :grouped_with_min_max_thresholds - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_min_max_thresholds_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before applying thresholds - # - # @return [String] - required :grouping_key, String - - # @!attribute maximum_charge - # The maximum amount to charge each group - # - # @return [String] - required :maximum_charge, String - - # @!attribute minimum_charge - # The minimum amount to charge each group, regardless of usage - # - # @return [String] - required :minimum_charge, String - - # @!attribute per_unit_rate - # The base price charged per group - # - # @return [String] - required :per_unit_rate, String - - # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) - # Configuration for grouped_with_min_max_thresholds pricing - # - # @param grouping_key [String] The event property used to group before applying thresholds - # - # @param maximum_charge [String] The maximum amount to charge each group - # - # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage - # - # @param per_unit_rate [String] The base price charged per group - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence } - - # @!attribute cumulative_grouped_allocation_config - # Configuration for cumulative_grouped_allocation pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] - required :cumulative_grouped_allocation_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :cumulative_grouped_allocation] - required :model_type, const: :cumulative_grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, cumulative_grouped_allocation_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_allocation_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute cumulative_allocation - # The overall allocation across all groups - # - # @return [String] - required :cumulative_allocation, String - - # @!attribute group_allocation - # The allocation per individual group - # - # @return [String] - required :group_allocation, String - - # @!attribute grouping_key - # The event property used to group usage before applying allocations - # - # @return [String] - required :grouping_key, String - - # @!attribute unit_amount - # The amount to charge for each unit outside of the allocation - # - # @return [String] - required :unit_amount, String - - # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:) - # Configuration for cumulative_grouped_allocation pricing - # - # @param cumulative_allocation [String] The overall allocation across all groups - # - # @param group_allocation [String] The allocation per individual group - # - # @param grouping_key [String] The event property used to group usage before applying allocations - # - # @param unit_amount [String] The amount to charge for each unit outside of the allocation - end - end - - class Percent < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :percent] - required :model_type, const: :percent - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute percent_config - # Configuration for percent pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig] - required :percent_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, name:, percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :percent) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param name [String] The name of the price. - # - # @param percent_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig] Configuration for percent pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :percent] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent#percent_config - class PercentConfig < Orb::Internal::Type::BaseModel - # @!attribute percent - # What percent of the component subtotals to charge - # - # @return [Float] - required :percent, Float - - # @!method initialize(percent:) - # Configuration for percent pricing - # - # @param percent [Float] What percent of the component subtotals to charge - end - end - - class EventOutput < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence } - - # @!attribute event_output_config - # Configuration for event_output pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig] - required :event_output_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :event_output] - required :model_type, const: :event_output - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, event_output_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :event_output) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence] The cadence to bill for this price on. - # - # @param event_output_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig] Configuration for event_output pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :event_output] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput#event_output_config - class EventOutputConfig < Orb::Internal::Type::BaseModel - # @!attribute unit_rating_key - # The key in the event data to extract the unit rate from. - # - # @return [String] - required :unit_rating_key, String - - # @!attribute default_unit_rate - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - # - # @return [String, nil] - optional :default_unit_rate, String, nil?: true - - # @!attribute grouping_key - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - # - # @return [String, nil] - optional :grouping_key, String, nil?: true - - # @!method initialize(unit_rating_key:, default_unit_rate: nil, grouping_key: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig} - # for more details. - # - # Configuration for event_output pricing - # - # @param unit_rating_key [String] The key in the event data to extract the unit rate from. - # - # @param default_unit_rate [String, nil] If provided, this amount will be used as the unit rate when an event does not ha - # - # @param grouping_key [String, nil] An optional key in the event data to group by (e.g., event ID). All events will - end - end - - # @!method self.variants - # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput)] - end - end - - class RemoveAdjustment < Orb::Internal::Type::BaseModel - # @!attribute adjustment_id - # The id of the adjustment to remove from on the plan. - # - # @return [String] - required :adjustment_id, String - - # @!attribute plan_phase_order - # The phase to remove this adjustment from. - # - # @return [Integer, nil] - optional :plan_phase_order, Integer, nil?: true - - # @!method initialize(adjustment_id:, plan_phase_order: nil) - # @param adjustment_id [String] The id of the adjustment to remove from on the plan. - # - # @param plan_phase_order [Integer, nil] The phase to remove this adjustment from. - end - - class RemovePrice < Orb::Internal::Type::BaseModel - # @!attribute price_id - # The id of the price to remove from the plan. - # - # @return [String] - required :price_id, String - - # @!attribute plan_phase_order - # The phase to remove this price from. - # - # @return [Integer, nil] - optional :plan_phase_order, Integer, nil?: true - - # @!method initialize(price_id:, plan_phase_order: nil) - # @param price_id [String] The id of the price to remove from the plan. - # - # @param plan_phase_order [Integer, nil] The phase to remove this price from. - end - - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - # @!attribute adjustment - # The definition of a new adjustment to create and add to the plan. - # - # @return [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum] - required :adjustment, - union: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment } - - # @!attribute replaces_adjustment_id - # The id of the adjustment on the plan to replace in the plan. - # - # @return [String] - required :replaces_adjustment_id, String - - # @!attribute plan_phase_order - # The phase to replace this adjustment from. - # - # @return [Integer, nil] - optional :plan_phase_order, Integer, nil?: true - - # @!method initialize(adjustment:, replaces_adjustment_id:, plan_phase_order: nil) - # @param adjustment [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum] The definition of a new adjustment to create and add to the plan. - # - # @param replaces_adjustment_id [String] The id of the adjustment on the plan to replace in the plan. - # - # @param plan_phase_order [Integer, nil] The phase to replace this adjustment from. - - # The definition of a new adjustment to create and add to the plan. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment#adjustment - module Adjustment - extend Orb::Internal::Type::Union - - discriminator :adjustment_type - - variant :percentage_discount, -> { Orb::NewPercentageDiscount } - - variant :usage_discount, -> { Orb::NewUsageDiscount } - - variant :amount_discount, -> { Orb::NewAmountDiscount } - - variant :minimum, -> { Orb::NewMinimum } - - variant :maximum, -> { Orb::NewMaximum } - - # @!method self.variants - # @return [Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum)] - end - end - - class ReplacePrice < Orb::Internal::Type::BaseModel - # @!attribute replaces_price_id - # The id of the price on the plan to replace in the plan. - # - # @return [String] - required :replaces_price_id, String - - # @!attribute allocation_price - # The allocation price to add to the plan. - # - # @return [Orb::Models::NewAllocationPrice, nil] - optional :allocation_price, -> { Orb::NewAllocationPrice }, nil?: true - - # @!attribute license_allocation_price - # The license allocation price to add to the plan. - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput, nil] - optional :license_allocation_price, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice - }, - nil?: true - - # @!attribute plan_phase_order - # The phase to replace this price from. - # - # @return [Integer, nil] - optional :plan_phase_order, Integer, nil?: true - - # @!attribute price - # New plan price request body params. - # - # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] - optional :price, - union: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price }, - nil?: true - - # @!method initialize(replaces_price_id:, allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil) - # @param replaces_price_id [String] The id of the price on the plan to replace in the plan. - # - # @param allocation_price [Orb::Models::NewAllocationPrice, nil] The allocation price to add to the plan. - # - # @param license_allocation_price [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput, nil] The license allocation price to add to the plan. - # - # @param plan_phase_order [Integer, nil] The phase to replace this price from. - # - # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] New plan price request body params. - - # The license allocation price to add to the plan. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice#license_allocation_price - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - discriminator :model_type - - variant :unit, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit } - - variant :tiered, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered } - - variant :bulk, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk } - - variant :bulk_with_filters, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters } - - variant :package, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package } - - variant :matrix, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix } - - variant :threshold_total_amount, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount } - - variant :tiered_package, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage } - - variant :tiered_with_minimum, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum } - - variant :grouped_tiered, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered } - - variant :tiered_package_with_minimum, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum } - - variant :package_with_allocation, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation } - - variant :unit_with_percent, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent } - - variant :matrix_with_allocation, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation } - - variant :tiered_with_proration, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration } - - variant :unit_with_proration, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration } - - variant :grouped_allocation, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation } - - variant :bulk_with_proration, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration } - - variant :grouped_with_prorated_minimum, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum } - - variant :grouped_with_metered_minimum, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum } - - variant :grouped_with_min_max_thresholds, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds } - - variant :matrix_with_display_name, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName } - - variant :grouped_tiered_package, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage } - - variant :max_group_tiered_package, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage } - - variant :scalable_matrix_with_unit_pricing, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing } - - variant :scalable_matrix_with_tiered_pricing, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing } - - variant :cumulative_grouped_bulk, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk } - - variant :cumulative_grouped_allocation, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation } - - variant :minimum_composite, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite } - - variant :percent, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent } - - variant :event_output, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput } - - class Unit < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :unit] - required :model_type, const: :unit - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_config - # Configuration for unit pricing - # - # @return [Orb::Models::UnitConfig] - required :unit_config, -> { Orb::UnitConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :unit] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Tiered < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered] - required :model_type, const: :tiered - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_config - # Configuration for tiered pricing - # - # @return [Orb::Models::TieredConfig] - required :tiered_config, -> { Orb::TieredConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_config [Orb::Models::TieredConfig] Configuration for tiered pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Bulk < Orb::Internal::Type::BaseModel - # @!attribute bulk_config - # Configuration for bulk pricing - # - # @return [Orb::Models::BulkConfig] - required :bulk_config, -> { Orb::BulkConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk] - required :model_type, const: :bulk - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk} - # for more details. - # - # @param bulk_config [Orb::Models::BulkConfig] Configuration for bulk pricing - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class BulkWithFilters < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_filters_config - # Configuration for bulk_with_filters pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig] - required :bulk_with_filters_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk_with_filters] - required :model_type, const: :bulk_with_filters - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_with_filters_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_filters) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters} - # for more details. - # - # @param bulk_with_filters_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk_with_filters] The pricing model type - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters#bulk_with_filters_config - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - # @!attribute filters - # Property filters to apply (all must match) - # - # @return [Array] - required :filters, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - end - - # @!attribute tiers - # Bulk tiers for rating based on total usage volume - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - end - - # @!method initialize(filters:, tiers:) - # Configuration for bulk_with_filters pricing - # - # @param filters [Array] Property filters to apply (all must match) - # - # @param tiers [Array] Bulk tiers for rating based on total usage volume - - class Filter < Orb::Internal::Type::BaseModel - # @!attribute property_key - # Event property key to filter on - # - # @return [String] - required :property_key, String - - # @!attribute property_value - # Event property value to match - # - # @return [String] - required :property_value, String - - # @!method initialize(property_key:, property_value:) - # Configuration for a single property filter - # - # @param property_key [String] Event property key to filter on - # - # @param property_value [String] Event property value to match - end - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!attribute tier_lower_bound - # The lower bound for this tier - # - # @return [String, nil] - optional :tier_lower_bound, String, nil?: true - - # @!method initialize(unit_amount:, tier_lower_bound: nil) - # Configuration for a single bulk pricing tier - # - # @param unit_amount [String] Amount per unit - # - # @param tier_lower_bound [String, nil] The lower bound for this tier - end - end - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Package < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :package] - required :model_type, const: :package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute package_config - # Configuration for package pricing - # - # @return [Orb::Models::PackageConfig] - required :package_config, -> { Orb::PackageConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, package_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :package) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param package_config [Orb::Models::PackageConfig] Configuration for package pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Matrix < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation - ] - end - - # @!attribute matrix_config - # Configuration for matrix pricing - # - # @return [Orb::Models::MatrixConfig] - required :matrix_config, -> { Orb::MatrixConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix] - required :model_type, const: :matrix - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_config [Orb::Models::MatrixConfig] Configuration for matrix pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :threshold_total_amount] - required :model_type, const: :threshold_total_amount - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute threshold_total_amount_config - # Configuration for threshold_total_amount pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig] - required :threshold_total_amount_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, threshold_total_amount_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :threshold_total_amount) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param threshold_total_amount_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig] Configuration for threshold_total_amount pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :threshold_total_amount] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount#threshold_total_amount_config - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - # @!attribute consumption_table - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - # - # @return [Array] - required :consumption_table, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ] - end - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(consumption_table:, prorate: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig} - # for more details. - # - # Configuration for threshold_total_amount pricing - # - # @param consumption_table [Array] When the quantity consumed passes a provided threshold, the configured total wil - # - # @param prorate [Boolean, nil] If true, the unit price will be prorated to the billing period - - class ConsumptionTable < Orb::Internal::Type::BaseModel - # @!attribute threshold - # - # @return [String] - required :threshold, String - - # @!attribute total_amount - # Total amount for this threshold - # - # @return [String] - required :total_amount, String - - # @!method initialize(threshold:, total_amount:) - # Configuration for a single threshold - # - # @param threshold [String] - # - # @param total_amount [String] Total amount for this threshold - end - end - end - - class TieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_package] - required :model_type, const: :tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_package_config - # Configuration for tiered_package pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig] - required :tiered_package_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_package_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_package_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig] Configuration for tiered_package pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage#tiered_package_config - class TieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - end - - # @!method initialize(package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig} - # for more details. - # - # Configuration for tiered_package pricing - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute per_unit - # Price per package - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(per_unit:, tier_lower_bound:) - # Configuration for a single tier with business logic - # - # @param per_unit [String] Price per package - # - # @param tier_lower_bound [String] - end - end - end - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_with_minimum] - required :model_type, const: :tiered_with_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_minimum_config - # Configuration for tiered_with_minimum pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig] - required :tiered_with_minimum_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_with_minimum_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_with_minimum_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig] Configuration for tiered_with_minimum pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_with_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum#tiered_with_minimum_config - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ] - end - - # @!attribute hide_zero_amount_tiers - # If true, tiers with an accrued amount of 0 will not be included in the rating. - # - # @return [Boolean, nil] - optional :hide_zero_amount_tiers, Orb::Internal::Type::Boolean - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean - - # @!method initialize(tiers:, hide_zero_amount_tiers: nil, prorate: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig} - # for more details. - # - # Configuration for tiered_with_minimum pricing - # - # @param tiers [Array] Tiered pricing with a minimum amount dependent on the volume tier. Tiers are def - # - # @param hide_zero_amount_tiers [Boolean] If true, tiers with an accrued amount of 0 will not be included in the rating. - # - # @param prorate [Boolean] If true, the unit price will be prorated to the billing period - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # - # @return [String] - required :minimum_amount, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(minimum_amount:, tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param minimum_amount [String] - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - end - - class GroupedTiered < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence } - - # @!attribute grouped_tiered_config - # Configuration for grouped_tiered pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig] - required :grouped_tiered_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_tiered] - required :model_type, const: :grouped_tiered - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_tiered_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_tiered) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence] The cadence to bill for this price on. - # - # @param grouped_tiered_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig] Configuration for grouped_tiered pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_tiered] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered#grouped_tiered_config - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The billable metric property used to group before tiering - # - # @return [String] - required :grouping_key, String - - # @!attribute tiers - # Apply tiered pricing to each segment generated after grouping with the provided - # key - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - end - - # @!method initialize(grouping_key:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig} - # for more details. - # - # Configuration for grouped_tiered pricing - # - # @param grouping_key [String] The billable metric property used to group before tiering - # - # @param tiers [Array] Apply tiered pricing to each segment generated after grouping with the provided - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_package_with_minimum] - required :model_type, const: :tiered_package_with_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_package_with_minimum_config - # Configuration for tiered_package_with_minimum pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig] - required :tiered_package_with_minimum_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_package_with_minimum_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_package_with_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_package_with_minimum_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig] Configuration for tiered_package_with_minimum pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_package_with_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum#tiered_package_with_minimum_config - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute package_size - # - # @return [Float] - required :package_size, Float - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - end - - # @!method initialize(package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig} - # for more details. - # - # Configuration for tiered_package_with_minimum pricing - # - # @param package_size [Float] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # - # @return [String] - required :minimum_amount, String - - # @!attribute per_unit - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(minimum_amount:, per_unit:, tier_lower_bound:) - # Configuration for a single tier - # - # @param minimum_amount [String] - # @param per_unit [String] - # @param tier_lower_bound [String] - end - end - end - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :package_with_allocation] - required :model_type, const: :package_with_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute package_with_allocation_config - # Configuration for package_with_allocation pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig] - required :package_with_allocation_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, package_with_allocation_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :package_with_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param package_with_allocation_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig] Configuration for package_with_allocation pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :package_with_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation#package_with_allocation_config - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute allocation - # - # @return [String] - required :allocation, String - - # @!attribute package_amount - # - # @return [String] - required :package_amount, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!method initialize(allocation:, package_amount:, package_size:) - # Configuration for package_with_allocation pricing - # - # @param allocation [String] - # @param package_amount [String] - # @param package_size [String] - end - end - - class UnitWithPercent < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :unit_with_percent] - required :model_type, const: :unit_with_percent - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_with_percent_config - # Configuration for unit_with_percent pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig] - required :unit_with_percent_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_with_percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit_with_percent) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param unit_with_percent_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig] Configuration for unit_with_percent pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :unit_with_percent] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent#unit_with_percent_config - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - # @!attribute percent - # What percent, out of 100, of the calculated total to charge - # - # @return [String] - required :percent, String - - # @!attribute unit_amount - # Rate per unit of usage - # - # @return [String] - required :unit_amount, String - - # @!method initialize(percent:, unit_amount:) - # Configuration for unit_with_percent pricing - # - # @param percent [String] What percent, out of 100, of the calculated total to charge - # - # @param unit_amount [String] Rate per unit of usage - end - end - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ] - end - - # @!attribute matrix_with_allocation_config - # Configuration for matrix_with_allocation pricing - # - # @return [Orb::Models::MatrixWithAllocationConfig] - required :matrix_with_allocation_config, -> { Orb::MatrixWithAllocationConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix_with_allocation] - required :model_type, const: :matrix_with_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_with_allocation_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_with_allocation_config [Orb::Models::MatrixWithAllocationConfig] Configuration for matrix_with_allocation pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix_with_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_with_proration] - required :model_type, const: :tiered_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_proration_config - # Configuration for tiered_with_proration pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig] - required :tiered_with_proration_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_with_proration_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_with_proration] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration#tiered_with_proration_config - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Tiers for rating based on total usage quantities into the specified tier with - # proration - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - end - - # @!method initialize(tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig} - # for more details. - # - # Configuration for tiered_with_proration pricing - # - # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # Inclusive tier starting value - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tiered with proration tier - # - # @param tier_lower_bound [String] Inclusive tier starting value - # - # @param unit_amount [String] Amount per unit - end - end - end - - class UnitWithProration < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :unit_with_proration] - required :model_type, const: :unit_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_with_proration_config - # Configuration for unit_with_proration pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig] - required :unit_with_proration_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param unit_with_proration_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig] Configuration for unit_with_proration pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :unit_with_proration] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration#unit_with_proration_config - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Rate per unit of usage - # - # @return [String] - required :unit_amount, String - - # @!method initialize(unit_amount:) - # Configuration for unit_with_proration pricing - # - # @param unit_amount [String] Rate per unit of usage - end - end - - class GroupedAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence } - - # @!attribute grouped_allocation_config - # Configuration for grouped_allocation pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig] - required :grouped_allocation_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_allocation] - required :model_type, const: :grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_allocation_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param grouped_allocation_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig] Configuration for grouped_allocation pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation#grouped_allocation_config - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute allocation - # Usage allocation per group - # - # @return [String] - required :allocation, String - - # @!attribute grouping_key - # How to determine the groups that should each be allocated some quantity - # - # @return [String] - required :grouping_key, String - - # @!attribute overage_unit_rate - # Unit rate for post-allocation - # - # @return [String] - required :overage_unit_rate, String - - # @!method initialize(allocation:, grouping_key:, overage_unit_rate:) - # Configuration for grouped_allocation pricing - # - # @param allocation [String] Usage allocation per group - # - # @param grouping_key [String] How to determine the groups that should each be allocated some quantity - # - # @param overage_unit_rate [String] Unit rate for post-allocation - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class BulkWithProration < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_proration_config - # Configuration for bulk_with_proration pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig] - required :bulk_with_proration_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk_with_proration] - required :model_type, const: :bulk_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_with_proration_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration} - # for more details. - # - # @param bulk_with_proration_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig] Configuration for bulk_with_proration pricing - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk_with_proration] The pricing model type - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration#bulk_with_proration_config - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Bulk tiers for rating based on total usage volume - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - end - - # @!method initialize(tiers:) - # Configuration for bulk_with_proration pricing - # - # @param tiers [Array] Bulk tiers for rating based on total usage volume - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Cost per unit - # - # @return [String] - required :unit_amount, String - - # @!attribute tier_lower_bound - # The lower bound for this tier - # - # @return [String, nil] - optional :tier_lower_bound, String, nil?: true - - # @!method initialize(unit_amount:, tier_lower_bound: nil) - # Configuration for a single bulk pricing tier with proration - # - # @param unit_amount [String] Cost per unit - # - # @param tier_lower_bound [String, nil] The lower bound for this tier - end - end - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence } - - # @!attribute grouped_with_prorated_minimum_config - # Configuration for grouped_with_prorated_minimum pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig] - required :grouped_with_prorated_minimum_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_prorated_minimum] - required :model_type, const: :grouped_with_prorated_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_prorated_minimum_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_prorated_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_prorated_minimum_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig] Configuration for grouped_with_prorated_minimum pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_prorated_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum#grouped_with_prorated_minimum_config - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # How to determine the groups that should each have a minimum - # - # @return [String] - required :grouping_key, String - - # @!attribute minimum - # The minimum amount to charge per group - # - # @return [String] - required :minimum, String - - # @!attribute unit_rate - # The amount to charge per unit - # - # @return [String] - required :unit_rate, String - - # @!method initialize(grouping_key:, minimum:, unit_rate:) - # Configuration for grouped_with_prorated_minimum pricing - # - # @param grouping_key [String] How to determine the groups that should each have a minimum - # - # @param minimum [String] The minimum amount to charge per group - # - # @param unit_rate [String] The amount to charge per unit - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence } - - # @!attribute grouped_with_metered_minimum_config - # Configuration for grouped_with_metered_minimum pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig] - required :grouped_with_metered_minimum_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_metered_minimum] - required :model_type, const: :grouped_with_metered_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_metered_minimum_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_metered_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_metered_minimum_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig] Configuration for grouped_with_metered_minimum pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_metered_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum#grouped_with_metered_minimum_config - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - # - # @return [String] - required :grouping_key, String - - # @!attribute minimum_unit_amount - # The minimum amount to charge per group per unit - # - # @return [String] - required :minimum_unit_amount, String - - # @!attribute pricing_key - # Used to determine the unit rate - # - # @return [String] - required :pricing_key, String - - # @!attribute scaling_factors - # Scale the unit rates by the scaling factor. - # - # @return [Array] - required :scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ] - end - - # @!attribute scaling_key - # Used to determine the unit rate scaling factor - # - # @return [String] - required :scaling_key, String - - # @!attribute unit_amounts - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - # - # @return [Array] - required :unit_amounts, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - end - - # @!method initialize(grouping_key:, minimum_unit_amount:, pricing_key:, scaling_factors:, scaling_key:, unit_amounts:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig} - # for more details. - # - # Configuration for grouped_with_metered_minimum pricing - # - # @param grouping_key [String] Used to partition the usage into groups. The minimum amount is applied to each g - # - # @param minimum_unit_amount [String] The minimum amount to charge per group per unit - # - # @param pricing_key [String] Used to determine the unit rate - # - # @param scaling_factors [Array] Scale the unit rates by the scaling factor. - # - # @param scaling_key [String] Used to determine the unit rate scaling factor - # - # @param unit_amounts [Array] Apply per unit pricing to each pricing value. The minimum amount is applied any - - class ScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute scaling_value - # - # @return [String] - required :scaling_value, String - - # @!method initialize(scaling_factor:, scaling_value:) - # Configuration for a scaling factor - # - # @param scaling_factor [String] - # @param scaling_value [String] - end - - class UnitAmount < Orb::Internal::Type::BaseModel - # @!attribute pricing_value - # - # @return [String] - required :pricing_value, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(pricing_value:, unit_amount:) - # Configuration for a unit amount - # - # @param pricing_value [String] - # - # @param unit_amount [String] Per unit amount - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence } - - # @!attribute grouped_with_min_max_thresholds_config - # Configuration for grouped_with_min_max_thresholds pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] - required :grouped_with_min_max_thresholds_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_min_max_thresholds] - required :model_type, const: :grouped_with_min_max_thresholds - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_min_max_thresholds_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before applying thresholds - # - # @return [String] - required :grouping_key, String - - # @!attribute maximum_charge - # The maximum amount to charge each group - # - # @return [String] - required :maximum_charge, String - - # @!attribute minimum_charge - # The minimum amount to charge each group, regardless of usage - # - # @return [String] - required :minimum_charge, String - - # @!attribute per_unit_rate - # The base price charged per group - # - # @return [String] - required :per_unit_rate, String - - # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) - # Configuration for grouped_with_min_max_thresholds pricing - # - # @param grouping_key [String] The event property used to group before applying thresholds - # - # @param maximum_charge [String] The maximum amount to charge each group - # - # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage - # - # @param per_unit_rate [String] The base price charged per group - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ] - end - - # @!attribute matrix_with_display_name_config - # Configuration for matrix_with_display_name pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig] - required :matrix_with_display_name_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix_with_display_name] - required :model_type, const: :matrix_with_display_name - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_with_display_name_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_display_name) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_with_display_name_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig] Configuration for matrix_with_display_name pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix_with_display_name] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName#matrix_with_display_name_config - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - # @!attribute dimension - # Used to determine the unit rate - # - # @return [String] - required :dimension, String - - # @!attribute unit_amounts - # Apply per unit pricing to each dimension value - # - # @return [Array] - required :unit_amounts, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - end - - # @!method initialize(dimension:, unit_amounts:) - # Configuration for matrix_with_display_name pricing - # - # @param dimension [String] Used to determine the unit rate - # - # @param unit_amounts [Array] Apply per unit pricing to each dimension value - - class UnitAmount < Orb::Internal::Type::BaseModel - # @!attribute dimension_value - # The dimension value - # - # @return [String] - required :dimension_value, String - - # @!attribute display_name - # Display name for this dimension value - # - # @return [String] - required :display_name, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(dimension_value:, display_name:, unit_amount:) - # Configuration for a unit amount item - # - # @param dimension_value [String] The dimension value - # - # @param display_name [String] Display name for this dimension value - # - # @param unit_amount [String] Per unit amount - end - end - end - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence } - - # @!attribute grouped_tiered_package_config - # Configuration for grouped_tiered_package pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig] - required :grouped_tiered_package_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_tiered_package] - required :model_type, const: :grouped_tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_tiered_package_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence] The cadence to bill for this price on. - # - # @param grouped_tiered_package_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig] Configuration for grouped_tiered_package pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage#grouped_tiered_package_config - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before tiering - # - # @return [String] - required :grouping_key, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - end - - # @!method initialize(grouping_key:, package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig} - # for more details. - # - # Configuration for grouped_tiered_package pricing - # - # @param grouping_key [String] The event property used to group before tiering - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute per_unit - # Per package - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(per_unit:, tier_lower_bound:) - # Configuration for a single tier - # - # @param per_unit [String] Per package - # - # @param tier_lower_bound [String] - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ] - end - - # @!attribute max_group_tiered_package_config - # Configuration for max_group_tiered_package pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig] - required :max_group_tiered_package_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :max_group_tiered_package] - required :model_type, const: :max_group_tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, max_group_tiered_package_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :max_group_tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param max_group_tiered_package_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig] Configuration for max_group_tiered_package pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :max_group_tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage#max_group_tiered_package_config - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before tiering the group with the highest value - # - # @return [String] - required :grouping_key, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing to the largest group after grouping with the provided key. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - end - - # @!method initialize(grouping_key:, package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig} - # for more details. - # - # Configuration for max_group_tiered_package pricing - # - # @param grouping_key [String] The event property used to group before tiering the group with the highest value - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing to the largest group after grouping with the provided key. - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - end - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :scalable_matrix_with_unit_pricing] - required :model_type, const: :scalable_matrix_with_unit_pricing - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute scalable_matrix_with_unit_pricing_config - # Configuration for scalable_matrix_with_unit_pricing pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig] - required :scalable_matrix_with_unit_pricing_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, scalable_matrix_with_unit_pricing_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :scalable_matrix_with_unit_pricing) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param scalable_matrix_with_unit_pricing_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig] Configuration for scalable_matrix_with_unit_pricing pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :scalable_matrix_with_unit_pricing] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing#scalable_matrix_with_unit_pricing_config - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - # @!attribute first_dimension - # Used to determine the unit rate - # - # @return [String] - required :first_dimension, String - - # @!attribute matrix_scaling_factors - # Apply a scaling factor to each dimension - # - # @return [Array] - required :matrix_scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ] - end - - # @!attribute unit_price - # The final unit price to rate against the output of the matrix - # - # @return [String] - required :unit_price, String - - # @!attribute grouping_key - # The property used to group this price - # - # @return [String, nil] - optional :grouping_key, String, nil?: true - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute second_dimension - # Used to determine the unit rate (optional) - # - # @return [String, nil] - optional :second_dimension, String, nil?: true - - # @!method initialize(first_dimension:, matrix_scaling_factors:, unit_price:, grouping_key: nil, prorate: nil, second_dimension: nil) - # Configuration for scalable_matrix_with_unit_pricing pricing - # - # @param first_dimension [String] Used to determine the unit rate - # - # @param matrix_scaling_factors [Array] Apply a scaling factor to each dimension - # - # @param unit_price [String] The final unit price to rate against the output of the matrix - # - # @param grouping_key [String, nil] The property used to group this price - # - # @param prorate [Boolean, nil] If true, the unit price will be prorated to the billing period - # - # @param second_dimension [String, nil] Used to determine the unit rate (optional) - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute first_dimension_value - # - # @return [String] - required :first_dimension_value, String - - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute second_dimension_value - # - # @return [String, nil] - optional :second_dimension_value, String, nil?: true - - # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil) - # Configuration for a single matrix scaling factor - # - # @param first_dimension_value [String] - # @param scaling_factor [String] - # @param second_dimension_value [String, nil] - end - end - end - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :scalable_matrix_with_tiered_pricing] - required :model_type, const: :scalable_matrix_with_tiered_pricing - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute scalable_matrix_with_tiered_pricing_config - # Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig] - required :scalable_matrix_with_tiered_pricing_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, scalable_matrix_with_tiered_pricing_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :scalable_matrix_with_tiered_pricing) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param scalable_matrix_with_tiered_pricing_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig] Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :scalable_matrix_with_tiered_pricing] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing#scalable_matrix_with_tiered_pricing_config - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - # @!attribute first_dimension - # Used for the scalable matrix first dimension - # - # @return [String] - required :first_dimension, String - - # @!attribute matrix_scaling_factors - # Apply a scaling factor to each dimension - # - # @return [Array] - required :matrix_scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ] - end - - # @!attribute tiers - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ] - end - - # @!attribute second_dimension - # Used for the scalable matrix second dimension (optional) - # - # @return [String, nil] - optional :second_dimension, String, nil?: true - - # @!method initialize(first_dimension:, matrix_scaling_factors:, tiers:, second_dimension: nil) - # Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @param first_dimension [String] Used for the scalable matrix first dimension - # - # @param matrix_scaling_factors [Array] Apply a scaling factor to each dimension - # - # @param tiers [Array] - # - # @param second_dimension [String, nil] Used for the scalable matrix second dimension (optional) - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute first_dimension_value - # - # @return [String] - required :first_dimension_value, String - - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute second_dimension_value - # - # @return [String, nil] - optional :second_dimension_value, String, nil?: true - - # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil) - # Configuration for a single matrix scaling factor - # - # @param first_dimension_value [String] - # @param scaling_factor [String] - # @param second_dimension_value [String, nil] - end - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier entry with business logic - # - # @param tier_lower_bound [String] - # @param unit_amount [String] - end - end - end - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence } - - # @!attribute cumulative_grouped_bulk_config - # Configuration for cumulative_grouped_bulk pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig] - required :cumulative_grouped_bulk_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :cumulative_grouped_bulk] - required :model_type, const: :cumulative_grouped_bulk - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, cumulative_grouped_bulk_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_bulk) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_bulk_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig] Configuration for cumulative_grouped_bulk pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :cumulative_grouped_bulk] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk#cumulative_grouped_bulk_config - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - # @!attribute dimension_values - # Each tier lower bound must have the same group of values. - # - # @return [Array] - required :dimension_values, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ] - end - - # @!attribute group - # - # @return [String] - required :group, String - - # @!method initialize(dimension_values:, group:) - # Configuration for cumulative_grouped_bulk pricing - # - # @param dimension_values [Array] Each tier lower bound must have the same group of values. - # - # @param group [String] - - class DimensionValue < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # Grouping key value - # - # @return [String] - required :grouping_key, String - - # @!attribute tier_lower_bound - # Tier lower bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Unit amount for this combination - # - # @return [String] - required :unit_amount, String - - # @!method initialize(grouping_key:, tier_lower_bound:, unit_amount:) - # Configuration for a dimension value entry - # - # @param grouping_key [String] Grouping key value - # - # @param tier_lower_bound [String] Tier lower bound - # - # @param unit_amount [String] Unit amount for this combination - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence } - - # @!attribute cumulative_grouped_allocation_config - # Configuration for cumulative_grouped_allocation pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] - required :cumulative_grouped_allocation_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :cumulative_grouped_allocation] - required :model_type, const: :cumulative_grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, cumulative_grouped_allocation_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_allocation_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation#cumulative_grouped_allocation_config - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute cumulative_allocation - # The overall allocation across all groups - # - # @return [String] - required :cumulative_allocation, String - - # @!attribute group_allocation - # The allocation per individual group - # - # @return [String] - required :group_allocation, String - - # @!attribute grouping_key - # The event property used to group usage before applying allocations - # - # @return [String] - required :grouping_key, String - - # @!attribute unit_amount - # The amount to charge for each unit outside of the allocation - # - # @return [String] - required :unit_amount, String - - # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:) - # Configuration for cumulative_grouped_allocation pricing - # - # @param cumulative_allocation [String] The overall allocation across all groups - # - # @param group_allocation [String] The allocation per individual group - # - # @param grouping_key [String] The event property used to group usage before applying allocations - # - # @param unit_amount [String] The amount to charge for each unit outside of the allocation - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param 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::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ] - end - - # @!attribute minimum_composite_config - # Configuration for minimum_composite pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig] - required :minimum_composite_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :minimum_composite] - required :model_type, const: :minimum_composite - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for 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 - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference 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::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 - - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::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 - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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::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. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for 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::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::ReplacePrice::LicenseAllocationPrice::Percent} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param percent_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::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 - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be 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::ReplacePrice::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::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 - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::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 } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @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::ReplacePrice::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::ReplacePrice::LicenseAllocationPrice::EventOutput} - # 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 item_id [String] The id of the item the price will be associated with. - # - # @param license_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::ReplacePrice::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::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. - # - # @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::ReplacePrice::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::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 - - # New plan price request body params. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::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::Beta::ExternalPlanIDCreatePlanVersionParams::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::Beta::ExternalPlanIDCreatePlanVersionParams::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::Beta::ExternalPlanIDCreatePlanVersionParams::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::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation } - - variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } - - variant :percent, -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent } - - 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 } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::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::Beta::ExternalPlanIDCreatePlanVersionParams::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::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters} - # 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::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::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::Price::BulkWithFilters#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds#cadence module Cadence extend Orb::Internal::Type::Enum @@ -19486,15 +3641,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 +3705,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 +3714,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 +3747,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 +3815,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 +3856,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 +3875,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 +3938,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 +3980,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 +4048,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 +4089,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 +4108,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 +4208,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 +4260,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 +4328,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 +4369,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 +4388,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 +4894,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput)] end end end diff --git a/lib/orb/models/beta_create_plan_version_params.rb b/lib/orb/models/beta_create_plan_version_params.rb index 0e288ef2..fe7526cc 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,354 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!attribute price # New plan price request body params. # - # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] + # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::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::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::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered } + variant :tiered, -> { Orb::NewPlanTieredPrice } - variant :bulk, -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk } + variant :bulk, -> { Orb::NewPlanBulkPrice } - variant :bulk_with_filters, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters } + variant :bulk_with_filters, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters } - variant :package, -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package } + variant :package, -> { Orb::NewPlanPackagePrice } - variant :matrix, -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix } + variant :matrix, -> { Orb::NewPlanMatrixPrice } - variant :threshold_total_amount, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount } + variant :threshold_total_amount, -> { Orb::NewPlanThresholdTotalAmountPrice } - variant :tiered_package, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage } + variant :tiered_package, -> { Orb::NewPlanTieredPackagePrice } - variant :tiered_with_minimum, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum } + variant :tiered_with_minimum, -> { Orb::NewPlanTieredWithMinimumPrice } - variant :grouped_tiered, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered } + variant :grouped_tiered, -> { Orb::NewPlanGroupedTieredPrice } - variant :tiered_package_with_minimum, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum } + variant :tiered_package_with_minimum, -> { Orb::NewPlanTieredPackageWithMinimumPrice } - variant :package_with_allocation, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation } + variant :package_with_allocation, -> { Orb::NewPlanPackageWithAllocationPrice } - variant :unit_with_percent, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent } + variant :unit_with_percent, -> { Orb::NewPlanUnitWithPercentPrice } - variant :matrix_with_allocation, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation } + variant :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice } variant :tiered_with_proration, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration } + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration } - variant :unit_with_proration, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration } + variant :unit_with_proration, -> { Orb::NewPlanUnitWithProrationPrice } - variant :grouped_allocation, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation } + variant :grouped_allocation, -> { Orb::NewPlanGroupedAllocationPrice } - variant :bulk_with_proration, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration } + variant :bulk_with_proration, -> { Orb::NewPlanBulkWithProrationPrice } - variant :grouped_with_prorated_minimum, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum } + variant :grouped_with_prorated_minimum, -> { Orb::NewPlanGroupedWithProratedMinimumPrice } - variant :grouped_with_metered_minimum, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum } + variant :grouped_with_metered_minimum, -> { Orb::NewPlanGroupedWithMeteredMinimumPrice } variant :grouped_with_min_max_thresholds, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds } + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds } - variant :matrix_with_display_name, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName } + variant :matrix_with_display_name, -> { Orb::NewPlanMatrixWithDisplayNamePrice } - variant :grouped_tiered_package, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage } + variant :grouped_tiered_package, -> { Orb::NewPlanGroupedTieredPackagePrice } - variant :max_group_tiered_package, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage } + variant :max_group_tiered_package, -> { Orb::NewPlanMaxGroupTieredPackagePrice } - variant :scalable_matrix_with_unit_pricing, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing } + variant :scalable_matrix_with_unit_pricing, -> { Orb::NewPlanScalableMatrixWithUnitPricingPrice } - variant :scalable_matrix_with_tiered_pricing, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing } + variant :scalable_matrix_with_tiered_pricing, -> { Orb::NewPlanScalableMatrixWithTieredPricingPrice } - variant :cumulative_grouped_bulk, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk } + variant :cumulative_grouped_bulk, -> { Orb::NewPlanCumulativeGroupedBulkPrice } variant :cumulative_grouped_allocation, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation } + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation } + + variant :daily_credit_allowance, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance } + + variant :metered_allowance, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance } - variant :minimum_composite, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite } + variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } + + variant :percent, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent } - variant :percent, -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent } + variant :event_output, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput } - variant :event_output, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput } + class BulkWithFilters < Orb::Internal::Type::BaseModel + # @!attribute bulk_with_filters_config + # Configuration for bulk_with_filters pricing + # + # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig] + required :bulk_with_filters_config, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig } - class Unit < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence } + enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -279,20 +513,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 +525,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 +558,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 +626,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 +667,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 +751,15 @@ module Cadence # @!method self.values # @return [Array] end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end end - class Tiered < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence } + enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -511,20 +767,11 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation] } - # @!attribute model_type # The pricing model type # - # @return [Symbol, :tiered] - required :model_type, const: :tiered + # @return [Symbol, :tiered_with_proration] + required :model_type, const: :tiered_with_proration # @!attribute name # The name of the price. @@ -532,11 +779,12 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute tiered_config - # Configuration for tiered pricing + # @!attribute tiered_with_proration_config + # Configuration for tiered_with_proration pricing # - # @return [Orb::Models::TieredConfig] - required :tiered_config, -> { Orb::TieredConfig } + # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig] + required :tiered_with_proration_config, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig } # @!attribute billable_metric_id # The id of the billable metric for the price. Only needed if the price is @@ -571,7 +819,7 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::ConversionRateConfig }, nil?: true @@ -639,20 +887,18 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered) + # @!method initialize(cadence:, item_id:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration) # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered} + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration} # for more details. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # - # @param tiered_config [Orb::Models::TieredConfig] Configuration for tiered pricing + # @param tiered_with_proration_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b # @@ -682,11 +928,11 @@ class Tiered < Orb::Internal::Type::BaseModel # # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments # - # @param model_type [Symbol, :tiered] The pricing model type + # @param model_type [Symbol, :tiered_with_proration] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration#cadence module Cadence extend Orb::Internal::Type::Enum @@ -701,47 +947,62 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration#tiered_with_proration_config + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + # @!attribute tiers + # Tiers for rating based on total usage quantities into the specified tier with + # proration # - # @return [String] - required :amount, String + # @return [Array] + required :tiers, + -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] } - # @!attribute currency - # The currency of the license allocation. + # @!method initialize(tiers:) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig} + # for more details. # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. + # Configuration for tiered_with_proration pricing # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + class Tier < Orb::Internal::Type::BaseModel + # @!attribute tier_lower_bound + # Inclusive tier starting value + # + # @return [String] + required :tier_lower_bound, String + + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String + + # @!method initialize(tier_lower_bound:, unit_amount:) + # Configuration for a single tiered with proration tier + # + # @param tier_lower_bound [String] Inclusive tier starting value + # + # @param unit_amount [String] Amount per unit + end end end - class Bulk < Orb::Internal::Type::BaseModel - # @!attribute bulk_config - # Configuration for bulk pricing - # - # @return [Orb::Models::BulkConfig] - required :bulk_config, -> { Orb::BulkConfig } - + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence } + enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence } + + # @!attribute grouped_with_min_max_thresholds_config + # Configuration for grouped_with_min_max_thresholds pricing + # + # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] + required :grouped_with_min_max_thresholds_config, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -749,20 +1010,11 @@ class Bulk < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation] } - # @!attribute model_type # The pricing model type # - # @return [Symbol, :bulk] - required :model_type, const: :bulk + # @return [Symbol, :grouped_with_min_max_thresholds] + required :model_type, const: :grouped_with_min_max_thresholds # @!attribute name # The name of the price. @@ -803,7 +1055,7 @@ class Bulk < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::ConversionRateConfig }, nil?: true @@ -871,19 +1123,17 @@ class Bulk < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(bulk_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk) + # @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds) # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk} + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds} # for more details. # - # @param bulk_config [Orb::Models::BulkConfig] Configuration for bulk pricing + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence] The cadence to bill for this price on. + # @param grouped_with_min_max_thresholds_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b @@ -914,11 +1164,11 @@ class Bulk < Orb::Internal::Type::BaseModel # # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments # - # @param model_type [Symbol, :bulk] The pricing model type + # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds#cadence module Cadence extend Orb::Internal::Type::Enum @@ -933,48 +1183,59 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + # @!attribute grouping_key + # The event property used to group before applying thresholds # # @return [String] - required :amount, String + required :grouping_key, String - # @!attribute currency - # The currency of the license allocation. + # @!attribute maximum_charge + # The maximum amount to charge each group # # @return [String] - required :currency, String + required :maximum_charge, String - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. + # @!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 [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 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 CumulativeGroupedAllocation < 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::CumulativeGroupedAllocation::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::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. @@ -982,20 +1243,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, :cumulative_grouped_allocation] + required :model_type, const: :cumulative_grouped_allocation # @!attribute name # The name of the price. @@ -1036,7 +1288,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::CumulativeGroupedAllocation::ConversionRateConfig }, nil?: true @@ -1104,19 +1356,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:, 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::BulkWithFilters} + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation} # 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::CumulativeGroupedAllocation::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 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 billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b @@ -1147,85 +1397,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, :cumulative_grouped_allocation] 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::CumulativeGroupedAllocation#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1240,41 +1416,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 currency [String] The currency of the license allocation. + # @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 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 Package < 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::Package::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::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. @@ -1282,20 +1476,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, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance # @!attribute name # The name of the price. @@ -1303,12 +1488,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 +1521,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::DailyCreditAllowance::ConversionRateConfig }, nil?: true @@ -1410,21 +1589,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:, 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::Package} + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance} # 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::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 daily_credit_allowance_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance 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 @@ -1453,11 +1630,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, :daily_credit_allowance] 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::DailyCreditAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1472,41 +1649,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 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, + -> 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 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::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 Matrix < 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::Matrix::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence } + enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -1514,26 +1749,18 @@ 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 + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing # - # @return [Orb::Models::MatrixConfig] - required :matrix_config, -> { Orb::MatrixConfig } + # @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, :matrix] - required :model_type, const: :matrix + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance # @!attribute name # The name of the price. @@ -1574,7 +1801,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::MeteredAllowance::ConversionRateConfig }, nil?: true @@ -1642,18 +1869,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:, 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::Matrix} + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance} # for more details. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::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 matrix_config [Orb::Models::MatrixConfig] Configuration for matrix pricing + # @param metered_allowance_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing # # @param name [String] The name of the price. # @@ -1685,11 +1910,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, :metered_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::MeteredAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1704,41 +1929,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 :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 :amount, String + required :consumption_grouping_value, String - # @!attribute currency - # The currency of the license allocation. + # @!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 :currency, 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 write_off_overage - # When True, overage beyond the allocation is written off. + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @return [String, nil] + optional :consumption_display_name, String - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig} + # for more details. + # + # Configuration for metered_allowance pricing + # + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p + # + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl # - # @param currency [String] The currency of the license allocation. + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + # @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 ThresholdTotalAmount < 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::ThresholdTotalAmount::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::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. @@ -1746,24 +2006,11 @@ 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. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ] - end - # @!attribute model_type # The pricing model type # - # @return [Symbol, :threshold_total_amount] - required :model_type, const: :threshold_total_amount + # @return [Symbol, :percent] + required :model_type, const: :percent # @!attribute name # The name of the price. @@ -1771,12 +2018,11 @@ class ThresholdTotalAmount < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute threshold_total_amount_config - # Configuration for threshold_total_amount pricing + # @!attribute percent_config + # Configuration for percent pricing # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig] - required :threshold_total_amount_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig } + # @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 @@ -1811,7 +2057,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::Percent::ConversionRateConfig }, nil?: true @@ -1879,20 +2125,18 @@ 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:, 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::ThresholdTotalAmount} - # for more details. + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent} 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::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 threshold_total_amount_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig] Configuration for threshold_total_amount 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 # @@ -1922,11 +2166,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, :percent] 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::Percent#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1941,93 +2185,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. + # @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 [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @return [Float] + required :percent, Float - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. + # @!method initialize(percent:) + # Configuration for percent pricing # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + # @param percent [Float] What percent of the component subtotals to charge end + end - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount#threshold_total_amount_config - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - # @!attribute consumption_table - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - # - # @return [Array] - required :consumption_table, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ] - end - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean, nil?: true + 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 } - # @!method initialize(consumption_table:, prorate: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig} - # for more details. - # - # Configuration for threshold_total_amount pricing - # - # @param consumption_table [Array] When the quantity consumed passes a provided threshold, the configured total wil - # - # @param prorate [Boolean, nil] If true, the unit price will be prorated to the billing period - - class ConsumptionTable < Orb::Internal::Type::BaseModel - # @!attribute threshold - # - # @return [String] - required :threshold, String - - # @!attribute total_amount - # Total amount for this threshold - # - # @return [String] - required :total_amount, String - - # @!method initialize(threshold:, total_amount:) - # Configuration for a single threshold - # - # @param threshold [String] - # - # @param total_amount [String] Total amount for this threshold - end - end - end - - class TieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. + # @!attribute event_output_config + # Configuration for event_output pricing # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence } + # @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. @@ -2035,20 +2220,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, :event_output] + required :model_type, const: :event_output # @!attribute name # The name of the price. @@ -2056,13 +2232,6 @@ class TieredPackage < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute tiered_package_config - # Configuration for tiered_package pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig] - required :tiered_package_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig } - # @!attribute billable_metric_id # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -2096,7 +2265,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::EventOutput::ConversionRateConfig }, nil?: true @@ -2164,21 +2333,19 @@ 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:, 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::TieredPackage} - # for more details. + # {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 cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::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 license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # - # @param tiered_package_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig] Configuration for tiered_package pricing - # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b # # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi @@ -2207,11 +2374,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, :event_output] 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::EventOutput#cadence module Cadence extend Orb::Internal::Type::Enum @@ -2226,16246 +2393,516 @@ 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 + required :unit_rating_key, String - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage#tiered_package_config - class TieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute package_size + # @!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] - required :package_size, String + # @return [String, nil] + optional :default_unit_rate, String, nil?: true - # @!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. + # @!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 [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - end + # @return [String, nil] + optional :grouping_key, String, nil?: true - # @!method initialize(package_size:, tiers:) + # @!method initialize(unit_rating_key:, default_unit_rate: nil, grouping_key: nil) # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig} + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig} # for more details. # - # Configuration for tiered_package pricing + # Configuration for event_output pricing # - # @param package_size [String] + # @param unit_rating_key [String] The key in the event data to extract the unit rate from. # - # @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 default_unit_rate [String, nil] If provided, this amount will be used as the unit rate when an event does not ha + # + # @param grouping_key [String, nil] An optional key in the event data to group by (e.g., event ID). All events will end end - class TieredWithMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence } + # @!method self.variants + # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput)] + end + end - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String + class RemoveAdjustment < Orb::Internal::Type::BaseModel + # @!attribute adjustment_id + # The id of the adjustment to remove from on the plan. + # + # @return [String] + required :adjustment_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines 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 plan_phase_order + # The phase to remove this adjustment from. + # + # @return [Integer, nil] + optional :plan_phase_order, Integer, nil?: true - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_with_minimum] - required :model_type, const: :tiered_with_minimum + # @!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 name - # The name of the price. - # - # @return [String] - required :name, String + 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 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 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 replaces_adjustment_id + # The id of the adjustment on the plan to replace in the plan. + # + # @return [String] + required :replaces_adjustment_id, String - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true + # @!attribute plan_phase_order + # The phase to replace this adjustment from. + # + # @return [Integer, nil] + optional :plan_phase_order, Integer, nil?: true - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::ConversionRateConfig - }, - nil?: true + # @!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 currency - # 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 plan. + # + # @see Orb::Models::BetaCreatePlanVersionParams::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 + variant :percentage_discount, -> { Orb::NewPercentageDiscount } - # @!attribute fixed_price_quantity - # 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 :usage_discount, -> { Orb::NewUsageDiscount } - # @!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 :amount_discount, -> { Orb::NewAmountDiscount } - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are 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 :minimum, -> { Orb::NewMinimum } - # @!attribute 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 :maximum, -> { Orb::NewMaximum } - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_with_minimum_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_with_minimum_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig] Configuration for tiered_with_minimum pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_with_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum#tiered_with_minimum_config - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ] - end - - # @!attribute hide_zero_amount_tiers - # If true, tiers with an accrued amount of 0 will not be included in the rating. - # - # @return [Boolean, nil] - optional :hide_zero_amount_tiers, Orb::Internal::Type::Boolean - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean - - # @!method initialize(tiers:, hide_zero_amount_tiers: nil, prorate: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig} - # for more details. - # - # Configuration for tiered_with_minimum pricing - # - # @param tiers [Array] Tiered pricing with a minimum amount dependent on the volume tier. Tiers are def - # - # @param hide_zero_amount_tiers [Boolean] If true, tiers with an accrued amount of 0 will not be included in the rating. - # - # @param prorate [Boolean] If true, the unit price will be prorated to the billing period - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # - # @return [String] - required :minimum_amount, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(minimum_amount:, tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param minimum_amount [String] - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - end - - class GroupedTiered < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence } - - # @!attribute grouped_tiered_config - # Configuration for grouped_tiered pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig] - required :grouped_tiered_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_tiered] - required :model_type, const: :grouped_tiered - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_tiered_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_tiered) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence] The cadence to bill for this price on. - # - # @param grouped_tiered_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig] Configuration for grouped_tiered pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_tiered] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered#grouped_tiered_config - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The billable metric property used to group before tiering - # - # @return [String] - required :grouping_key, String - - # @!attribute tiers - # Apply tiered pricing to each segment generated after grouping with the provided - # key - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - end - - # @!method initialize(grouping_key:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig} - # for more details. - # - # Configuration for grouped_tiered pricing - # - # @param grouping_key [String] The billable metric property used to group before tiering - # - # @param tiers [Array] Apply tiered pricing to each segment generated after grouping with the provided - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_package_with_minimum] - required :model_type, const: :tiered_package_with_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_package_with_minimum_config - # Configuration for tiered_package_with_minimum pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig] - required :tiered_package_with_minimum_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_package_with_minimum_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_package_with_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_package_with_minimum_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig] Configuration for tiered_package_with_minimum pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_package_with_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum#tiered_package_with_minimum_config - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute package_size - # - # @return [Float] - required :package_size, Float - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - end - - # @!method initialize(package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig} - # for more details. - # - # Configuration for tiered_package_with_minimum pricing - # - # @param package_size [Float] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # - # @return [String] - required :minimum_amount, String - - # @!attribute per_unit - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(minimum_amount:, per_unit:, tier_lower_bound:) - # Configuration for a single tier - # - # @param minimum_amount [String] - # @param per_unit [String] - # @param tier_lower_bound [String] - end - end - end - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :package_with_allocation] - required :model_type, const: :package_with_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute package_with_allocation_config - # Configuration for package_with_allocation pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig] - required :package_with_allocation_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, package_with_allocation_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :package_with_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param package_with_allocation_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig] Configuration for package_with_allocation pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :package_with_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation#package_with_allocation_config - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute allocation - # - # @return [String] - required :allocation, String - - # @!attribute package_amount - # - # @return [String] - required :package_amount, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!method initialize(allocation:, package_amount:, package_size:) - # Configuration for package_with_allocation pricing - # - # @param allocation [String] - # @param package_amount [String] - # @param package_size [String] - end - end - - class UnitWithPercent < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :unit_with_percent] - required :model_type, const: :unit_with_percent - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_with_percent_config - # Configuration for unit_with_percent pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig] - required :unit_with_percent_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_with_percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit_with_percent) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param unit_with_percent_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig] Configuration for unit_with_percent pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :unit_with_percent] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent#unit_with_percent_config - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - # @!attribute percent - # What percent, out of 100, of the calculated total to charge - # - # @return [String] - required :percent, String - - # @!attribute unit_amount - # Rate per unit of usage - # - # @return [String] - required :unit_amount, String - - # @!method initialize(percent:, unit_amount:) - # Configuration for unit_with_percent pricing - # - # @param percent [String] What percent, out of 100, of the calculated total to charge - # - # @param unit_amount [String] Rate per unit of usage - end - end - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ] - end - - # @!attribute matrix_with_allocation_config - # Configuration for matrix_with_allocation pricing - # - # @return [Orb::Models::MatrixWithAllocationConfig] - required :matrix_with_allocation_config, -> { Orb::MatrixWithAllocationConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix_with_allocation] - required :model_type, const: :matrix_with_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_with_allocation_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_with_allocation_config [Orb::Models::MatrixWithAllocationConfig] Configuration for matrix_with_allocation pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix_with_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_with_proration] - required :model_type, const: :tiered_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_proration_config - # Configuration for tiered_with_proration pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig] - required :tiered_with_proration_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_with_proration_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_with_proration] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration#tiered_with_proration_config - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Tiers for rating based on total usage quantities into the specified tier with - # proration - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - end - - # @!method initialize(tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig} - # for more details. - # - # Configuration for tiered_with_proration pricing - # - # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # Inclusive tier starting value - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tiered with proration tier - # - # @param tier_lower_bound [String] Inclusive tier starting value - # - # @param unit_amount [String] Amount per unit - end - end - end - - class UnitWithProration < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :unit_with_proration] - required :model_type, const: :unit_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_with_proration_config - # Configuration for unit_with_proration pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig] - required :unit_with_proration_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param unit_with_proration_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig] Configuration for unit_with_proration pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :unit_with_proration] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration#unit_with_proration_config - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Rate per unit of usage - # - # @return [String] - required :unit_amount, String - - # @!method initialize(unit_amount:) - # Configuration for unit_with_proration pricing - # - # @param unit_amount [String] Rate per unit of usage - end - end - - class GroupedAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence } - - # @!attribute grouped_allocation_config - # Configuration for grouped_allocation pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig] - required :grouped_allocation_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_allocation] - required :model_type, const: :grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_allocation_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param grouped_allocation_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig] Configuration for grouped_allocation pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation#grouped_allocation_config - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute allocation - # Usage allocation per group - # - # @return [String] - required :allocation, String - - # @!attribute grouping_key - # How to determine the groups that should each be allocated some quantity - # - # @return [String] - required :grouping_key, String - - # @!attribute overage_unit_rate - # Unit rate for post-allocation - # - # @return [String] - required :overage_unit_rate, String - - # @!method initialize(allocation:, grouping_key:, overage_unit_rate:) - # Configuration for grouped_allocation pricing - # - # @param allocation [String] Usage allocation per group - # - # @param grouping_key [String] How to determine the groups that should each be allocated some quantity - # - # @param overage_unit_rate [String] Unit rate for post-allocation - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class BulkWithProration < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_proration_config - # Configuration for bulk_with_proration pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig] - required :bulk_with_proration_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk_with_proration] - required :model_type, const: :bulk_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_with_proration_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration} - # for more details. - # - # @param bulk_with_proration_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig] Configuration for bulk_with_proration pricing - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk_with_proration] The pricing model type - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration#bulk_with_proration_config - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Bulk tiers for rating based on total usage volume - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - end - - # @!method initialize(tiers:) - # Configuration for bulk_with_proration pricing - # - # @param tiers [Array] Bulk tiers for rating based on total usage volume - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Cost per unit - # - # @return [String] - required :unit_amount, String - - # @!attribute tier_lower_bound - # The lower bound for this tier - # - # @return [String, nil] - optional :tier_lower_bound, String, nil?: true - - # @!method initialize(unit_amount:, tier_lower_bound: nil) - # Configuration for a single bulk pricing tier with proration - # - # @param unit_amount [String] Cost per unit - # - # @param tier_lower_bound [String, nil] The lower bound for this tier - end - end - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence } - - # @!attribute grouped_with_prorated_minimum_config - # Configuration for grouped_with_prorated_minimum pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig] - required :grouped_with_prorated_minimum_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_prorated_minimum] - required :model_type, const: :grouped_with_prorated_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_prorated_minimum_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_prorated_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_prorated_minimum_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig] Configuration for grouped_with_prorated_minimum pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_prorated_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum#grouped_with_prorated_minimum_config - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # How to determine the groups that should each have a minimum - # - # @return [String] - required :grouping_key, String - - # @!attribute minimum - # The minimum amount to charge per group - # - # @return [String] - required :minimum, String - - # @!attribute unit_rate - # The amount to charge per unit - # - # @return [String] - required :unit_rate, String - - # @!method initialize(grouping_key:, minimum:, unit_rate:) - # Configuration for grouped_with_prorated_minimum pricing - # - # @param grouping_key [String] How to determine the groups that should each have a minimum - # - # @param minimum [String] The minimum amount to charge per group - # - # @param unit_rate [String] The amount to charge per unit - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence } - - # @!attribute grouped_with_metered_minimum_config - # Configuration for grouped_with_metered_minimum pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig] - required :grouped_with_metered_minimum_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_metered_minimum] - required :model_type, const: :grouped_with_metered_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_metered_minimum_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_metered_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_metered_minimum_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig] Configuration for grouped_with_metered_minimum pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_metered_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum#grouped_with_metered_minimum_config - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - # - # @return [String] - required :grouping_key, String - - # @!attribute minimum_unit_amount - # The minimum amount to charge per group per unit - # - # @return [String] - required :minimum_unit_amount, String - - # @!attribute pricing_key - # Used to determine the unit rate - # - # @return [String] - required :pricing_key, String - - # @!attribute scaling_factors - # Scale the unit rates by the scaling factor. - # - # @return [Array] - required :scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ] - end - - # @!attribute scaling_key - # Used to determine the unit rate scaling factor - # - # @return [String] - required :scaling_key, String - - # @!attribute unit_amounts - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - # - # @return [Array] - required :unit_amounts, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - end - - # @!method initialize(grouping_key:, minimum_unit_amount:, pricing_key:, scaling_factors:, scaling_key:, unit_amounts:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig} - # for more details. - # - # Configuration for grouped_with_metered_minimum pricing - # - # @param grouping_key [String] Used to partition the usage into groups. The minimum amount is applied to each g - # - # @param minimum_unit_amount [String] The minimum amount to charge per group per unit - # - # @param pricing_key [String] Used to determine the unit rate - # - # @param scaling_factors [Array] Scale the unit rates by the scaling factor. - # - # @param scaling_key [String] Used to determine the unit rate scaling factor - # - # @param unit_amounts [Array] Apply per unit pricing to each pricing value. The minimum amount is applied any - - class ScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute scaling_value - # - # @return [String] - required :scaling_value, String - - # @!method initialize(scaling_factor:, scaling_value:) - # Configuration for a scaling factor - # - # @param scaling_factor [String] - # @param scaling_value [String] - end - - class UnitAmount < Orb::Internal::Type::BaseModel - # @!attribute pricing_value - # - # @return [String] - required :pricing_value, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(pricing_value:, unit_amount:) - # Configuration for a unit amount - # - # @param pricing_value [String] - # - # @param unit_amount [String] Per unit amount - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence } - - # @!attribute grouped_with_min_max_thresholds_config - # Configuration for grouped_with_min_max_thresholds pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] - required :grouped_with_min_max_thresholds_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_min_max_thresholds] - required :model_type, const: :grouped_with_min_max_thresholds - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_min_max_thresholds_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before applying thresholds - # - # @return [String] - required :grouping_key, String - - # @!attribute maximum_charge - # The maximum amount to charge each group - # - # @return [String] - required :maximum_charge, String - - # @!attribute minimum_charge - # The minimum amount to charge each group, regardless of usage - # - # @return [String] - required :minimum_charge, String - - # @!attribute per_unit_rate - # The base price charged per group - # - # @return [String] - required :per_unit_rate, String - - # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) - # Configuration for grouped_with_min_max_thresholds pricing - # - # @param grouping_key [String] The event property used to group before applying thresholds - # - # @param maximum_charge [String] The maximum amount to charge each group - # - # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage - # - # @param per_unit_rate [String] The base price charged per group - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ] - end - - # @!attribute matrix_with_display_name_config - # Configuration for matrix_with_display_name pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig] - required :matrix_with_display_name_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix_with_display_name] - required :model_type, const: :matrix_with_display_name - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_with_display_name_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_display_name) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_with_display_name_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig] Configuration for matrix_with_display_name pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix_with_display_name] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName#matrix_with_display_name_config - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - # @!attribute dimension - # Used to determine the unit rate - # - # @return [String] - required :dimension, String - - # @!attribute unit_amounts - # Apply per unit pricing to each dimension value - # - # @return [Array] - required :unit_amounts, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - end - - # @!method initialize(dimension:, unit_amounts:) - # Configuration for matrix_with_display_name pricing - # - # @param dimension [String] Used to determine the unit rate - # - # @param unit_amounts [Array] Apply per unit pricing to each dimension value - - class UnitAmount < Orb::Internal::Type::BaseModel - # @!attribute dimension_value - # The dimension value - # - # @return [String] - required :dimension_value, String - - # @!attribute display_name - # Display name for this dimension value - # - # @return [String] - required :display_name, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(dimension_value:, display_name:, unit_amount:) - # Configuration for a unit amount item - # - # @param dimension_value [String] The dimension value - # - # @param display_name [String] Display name for this dimension value - # - # @param unit_amount [String] Per unit amount - end - end - end - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence } - - # @!attribute grouped_tiered_package_config - # Configuration for grouped_tiered_package pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig] - required :grouped_tiered_package_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_tiered_package] - required :model_type, const: :grouped_tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_tiered_package_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence] The cadence to bill for this price on. - # - # @param grouped_tiered_package_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig] Configuration for grouped_tiered_package pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage#grouped_tiered_package_config - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before tiering - # - # @return [String] - required :grouping_key, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - end - - # @!method initialize(grouping_key:, package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig} - # for more details. - # - # Configuration for grouped_tiered_package pricing - # - # @param grouping_key [String] The event property used to group before tiering - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute per_unit - # Per package - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(per_unit:, tier_lower_bound:) - # Configuration for a single tier - # - # @param per_unit [String] Per package - # - # @param tier_lower_bound [String] - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ] - end - - # @!attribute max_group_tiered_package_config - # Configuration for max_group_tiered_package pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig] - required :max_group_tiered_package_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :max_group_tiered_package] - required :model_type, const: :max_group_tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, max_group_tiered_package_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :max_group_tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param max_group_tiered_package_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig] Configuration for max_group_tiered_package pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :max_group_tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage#max_group_tiered_package_config - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before tiering the group with the highest value - # - # @return [String] - required :grouping_key, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing to the largest group after grouping with the provided key. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - end - - # @!method initialize(grouping_key:, package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig} - # for more details. - # - # Configuration for max_group_tiered_package pricing - # - # @param grouping_key [String] The event property used to group before tiering the group with the highest value - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing to the largest group after grouping with the provided key. - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - end - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :scalable_matrix_with_unit_pricing] - required :model_type, const: :scalable_matrix_with_unit_pricing - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute scalable_matrix_with_unit_pricing_config - # Configuration for scalable_matrix_with_unit_pricing pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig] - required :scalable_matrix_with_unit_pricing_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, scalable_matrix_with_unit_pricing_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :scalable_matrix_with_unit_pricing) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param scalable_matrix_with_unit_pricing_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig] Configuration for scalable_matrix_with_unit_pricing pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :scalable_matrix_with_unit_pricing] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing#scalable_matrix_with_unit_pricing_config - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - # @!attribute first_dimension - # Used to determine the unit rate - # - # @return [String] - required :first_dimension, String - - # @!attribute matrix_scaling_factors - # Apply a scaling factor to each dimension - # - # @return [Array] - required :matrix_scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ] - end - - # @!attribute unit_price - # The final unit price to rate against the output of the matrix - # - # @return [String] - required :unit_price, String - - # @!attribute grouping_key - # The property used to group this price - # - # @return [String, nil] - optional :grouping_key, String, nil?: true - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute second_dimension - # Used to determine the unit rate (optional) - # - # @return [String, nil] - optional :second_dimension, String, nil?: true - - # @!method initialize(first_dimension:, matrix_scaling_factors:, unit_price:, grouping_key: nil, prorate: nil, second_dimension: nil) - # Configuration for scalable_matrix_with_unit_pricing pricing - # - # @param first_dimension [String] Used to determine the unit rate - # - # @param matrix_scaling_factors [Array] Apply a scaling factor to each dimension - # - # @param unit_price [String] The final unit price to rate against the output of the matrix - # - # @param grouping_key [String, nil] The property used to group this price - # - # @param prorate [Boolean, nil] If true, the unit price will be prorated to the billing period - # - # @param second_dimension [String, nil] Used to determine the unit rate (optional) - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute first_dimension_value - # - # @return [String] - required :first_dimension_value, String - - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute second_dimension_value - # - # @return [String, nil] - optional :second_dimension_value, String, nil?: true - - # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil) - # Configuration for a single matrix scaling factor - # - # @param first_dimension_value [String] - # @param scaling_factor [String] - # @param second_dimension_value [String, nil] - end - end - end - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :scalable_matrix_with_tiered_pricing] - required :model_type, const: :scalable_matrix_with_tiered_pricing - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute scalable_matrix_with_tiered_pricing_config - # Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig] - required :scalable_matrix_with_tiered_pricing_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, scalable_matrix_with_tiered_pricing_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :scalable_matrix_with_tiered_pricing) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param scalable_matrix_with_tiered_pricing_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig] Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :scalable_matrix_with_tiered_pricing] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing#scalable_matrix_with_tiered_pricing_config - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - # @!attribute first_dimension - # Used for the scalable matrix first dimension - # - # @return [String] - required :first_dimension, String - - # @!attribute matrix_scaling_factors - # Apply a scaling factor to each dimension - # - # @return [Array] - required :matrix_scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ] - end - - # @!attribute tiers - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ] - end - - # @!attribute second_dimension - # Used for the scalable matrix second dimension (optional) - # - # @return [String, nil] - optional :second_dimension, String, nil?: true - - # @!method initialize(first_dimension:, matrix_scaling_factors:, tiers:, second_dimension: nil) - # Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @param first_dimension [String] Used for the scalable matrix first dimension - # - # @param matrix_scaling_factors [Array] Apply a scaling factor to each dimension - # - # @param tiers [Array] - # - # @param second_dimension [String, nil] Used for the scalable matrix second dimension (optional) - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute first_dimension_value - # - # @return [String] - required :first_dimension_value, String - - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute second_dimension_value - # - # @return [String, nil] - optional :second_dimension_value, String, nil?: true - - # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil) - # Configuration for a single matrix scaling factor - # - # @param first_dimension_value [String] - # @param scaling_factor [String] - # @param second_dimension_value [String, nil] - end - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier entry with business logic - # - # @param tier_lower_bound [String] - # @param unit_amount [String] - end - end - end - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence } - - # @!attribute cumulative_grouped_bulk_config - # Configuration for cumulative_grouped_bulk pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig] - required :cumulative_grouped_bulk_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :cumulative_grouped_bulk] - required :model_type, const: :cumulative_grouped_bulk - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, cumulative_grouped_bulk_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_bulk) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_bulk_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig] Configuration for cumulative_grouped_bulk pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :cumulative_grouped_bulk] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk#cumulative_grouped_bulk_config - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - # @!attribute dimension_values - # Each tier lower bound must have the same group of values. - # - # @return [Array] - required :dimension_values, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ] - end - - # @!attribute group - # - # @return [String] - required :group, String - - # @!method initialize(dimension_values:, group:) - # Configuration for cumulative_grouped_bulk pricing - # - # @param dimension_values [Array] Each tier lower bound must have the same group of values. - # - # @param group [String] - - class DimensionValue < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # Grouping key value - # - # @return [String] - required :grouping_key, String - - # @!attribute tier_lower_bound - # Tier lower bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Unit amount for this combination - # - # @return [String] - required :unit_amount, String - - # @!method initialize(grouping_key:, tier_lower_bound:, unit_amount:) - # Configuration for a dimension value entry - # - # @param grouping_key [String] Grouping key value - # - # @param tier_lower_bound [String] Tier lower bound - # - # @param unit_amount [String] Unit amount for this combination - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence } - - # @!attribute cumulative_grouped_allocation_config - # Configuration for cumulative_grouped_allocation pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] - required :cumulative_grouped_allocation_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :cumulative_grouped_allocation] - required :model_type, const: :cumulative_grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, cumulative_grouped_allocation_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_allocation_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation#cumulative_grouped_allocation_config - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute cumulative_allocation - # The overall allocation across all groups - # - # @return [String] - required :cumulative_allocation, String - - # @!attribute group_allocation - # The allocation per individual group - # - # @return [String] - required :group_allocation, String - - # @!attribute grouping_key - # The event property used to group usage before applying allocations - # - # @return [String] - required :grouping_key, String - - # @!attribute unit_amount - # The amount to charge for each unit outside of the allocation - # - # @return [String] - required :unit_amount, String - - # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:) - # Configuration for cumulative_grouped_allocation pricing - # - # @param cumulative_allocation [String] The overall allocation across all groups - # - # @param group_allocation [String] The allocation per individual group - # - # @param grouping_key [String] The event property used to group usage before applying allocations - # - # @param unit_amount [String] The amount to charge for each unit outside of the allocation - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MinimumComposite < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation] } - - # @!attribute minimum_composite_config - # Configuration for minimum_composite pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig] - required :minimum_composite_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :minimum_composite] - required :model_type, const: :minimum_composite - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, minimum_composite_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :minimum_composite) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param minimum_composite_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig] Configuration for minimum_composite pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :minimum_composite] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite#minimum_composite_config - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # The minimum amount to apply - # - # @return [String] - required :minimum_amount, String - - # @!attribute prorated - # If true, subtotals from this price are prorated based on the service period - # - # @return [Boolean, nil] - optional :prorated, Orb::Internal::Type::Boolean - - # @!method initialize(minimum_amount:, prorated: nil) - # Configuration for minimum_composite pricing - # - # @param minimum_amount [String] The minimum amount to apply - # - # @param prorated [Boolean] If true, subtotals from this price are prorated based on the service period - end - end - - class Percent < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :percent] - required :model_type, const: :percent - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute percent_config - # Configuration for percent pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig] - required :percent_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :percent) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param percent_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig] Configuration for percent pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :percent] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent#percent_config - class PercentConfig < Orb::Internal::Type::BaseModel - # @!attribute percent - # What percent of the component subtotals to charge - # - # @return [Float] - required :percent, Float - - # @!method initialize(percent:) - # Configuration for percent pricing - # - # @param percent [Float] What percent of the component subtotals to charge - end - end - - class EventOutput < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence } - - # @!attribute event_output_config - # Configuration for event_output pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig] - required :event_output_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :event_output] - required :model_type, const: :event_output - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, event_output_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :event_output) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence] The cadence to bill for this price on. - # - # @param event_output_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig] Configuration for event_output pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :event_output] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput#event_output_config - class EventOutputConfig < Orb::Internal::Type::BaseModel - # @!attribute unit_rating_key - # The key in the event data to extract the unit rate from. - # - # @return [String] - required :unit_rating_key, String - - # @!attribute default_unit_rate - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - # - # @return [String, nil] - optional :default_unit_rate, String, nil?: true - - # @!attribute grouping_key - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - # - # @return [String, nil] - optional :grouping_key, String, nil?: true - - # @!method initialize(unit_rating_key:, default_unit_rate: nil, grouping_key: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig} - # for more details. - # - # Configuration for event_output pricing - # - # @param unit_rating_key [String] The key in the event data to extract the unit rate from. - # - # @param default_unit_rate [String, nil] If provided, this amount will be used as the unit rate when an event does not ha - # - # @param grouping_key [String, nil] An optional key in the event data to group by (e.g., event ID). All events will - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - # @!method self.variants - # @return [Array(Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput)] - end - - # New plan price request body params. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice#price - module Price - extend Orb::Internal::Type::Union - - discriminator :model_type - - variant :unit, -> { Orb::NewPlanUnitPrice } - - variant :tiered, -> { Orb::NewPlanTieredPrice } - - variant :bulk, -> { Orb::NewPlanBulkPrice } - - variant :bulk_with_filters, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters } - - variant :package, -> { Orb::NewPlanPackagePrice } - - variant :matrix, -> { Orb::NewPlanMatrixPrice } - - variant :threshold_total_amount, -> { Orb::NewPlanThresholdTotalAmountPrice } - - variant :tiered_package, -> { Orb::NewPlanTieredPackagePrice } - - variant :tiered_with_minimum, -> { Orb::NewPlanTieredWithMinimumPrice } - - variant :grouped_tiered, -> { Orb::NewPlanGroupedTieredPrice } - - variant :tiered_package_with_minimum, -> { Orb::NewPlanTieredPackageWithMinimumPrice } - - variant :package_with_allocation, -> { Orb::NewPlanPackageWithAllocationPrice } - - variant :unit_with_percent, -> { Orb::NewPlanUnitWithPercentPrice } - - variant :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice } - - variant :tiered_with_proration, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration } - - variant :unit_with_proration, -> { Orb::NewPlanUnitWithProrationPrice } - - variant :grouped_allocation, -> { Orb::NewPlanGroupedAllocationPrice } - - variant :bulk_with_proration, -> { Orb::NewPlanBulkWithProrationPrice } - - variant :grouped_with_prorated_minimum, -> { Orb::NewPlanGroupedWithProratedMinimumPrice } - - variant :grouped_with_metered_minimum, -> { Orb::NewPlanGroupedWithMeteredMinimumPrice } - - variant :grouped_with_min_max_thresholds, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds } - - variant :matrix_with_display_name, -> { Orb::NewPlanMatrixWithDisplayNamePrice } - - variant :grouped_tiered_package, -> { Orb::NewPlanGroupedTieredPackagePrice } - - variant :max_group_tiered_package, -> { Orb::NewPlanMaxGroupTieredPackagePrice } - - variant :scalable_matrix_with_unit_pricing, -> { Orb::NewPlanScalableMatrixWithUnitPricingPrice } - - variant :scalable_matrix_with_tiered_pricing, -> { Orb::NewPlanScalableMatrixWithTieredPricingPrice } - - variant :cumulative_grouped_bulk, -> { Orb::NewPlanCumulativeGroupedBulkPrice } - - variant :cumulative_grouped_allocation, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation } - - variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } - - variant :percent, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent } - - variant :event_output, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput } - - class BulkWithFilters < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_filters_config - # Configuration for bulk_with_filters pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig] - required :bulk_with_filters_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk_with_filters] - required :model_type, const: :bulk_with_filters - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_with_filters_config:, cadence:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_filters) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters} for - # more details. - # - # @param bulk_with_filters_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk_with_filters] The pricing model type - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters#bulk_with_filters_config - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - # @!attribute filters - # Property filters to apply (all must match) - # - # @return [Array] - required :filters, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter] } - - # @!attribute tiers - # Bulk tiers for rating based on total usage volume - # - # @return [Array] - required :tiers, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] } - - # @!method initialize(filters:, tiers:) - # Configuration for bulk_with_filters pricing - # - # @param filters [Array] Property filters to apply (all must match) - # - # @param tiers [Array] Bulk tiers for rating based on total usage volume - - class Filter < Orb::Internal::Type::BaseModel - # @!attribute property_key - # Event property key to filter on - # - # @return [String] - required :property_key, String - - # @!attribute property_value - # Event property value to match - # - # @return [String] - required :property_value, String - - # @!method initialize(property_key:, property_value:) - # Configuration for a single property filter - # - # @param property_key [String] Event property key to filter on - # - # @param property_value [String] Event property value to match - end - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!attribute tier_lower_bound - # The lower bound for this tier - # - # @return [String, nil] - optional :tier_lower_bound, String, nil?: true - - # @!method initialize(unit_amount:, tier_lower_bound: nil) - # Configuration for a single bulk pricing tier - # - # @param unit_amount [String] Amount per unit - # - # @param tier_lower_bound [String, nil] The lower bound for this tier - end - end - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_with_proration] - required :model_type, const: :tiered_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_proration_config - # Configuration for tiered_with_proration pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig] - required :tiered_with_proration_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param name [String] The name of the price. - # - # @param tiered_with_proration_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_with_proration] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration#tiered_with_proration_config - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Tiers for rating based on total usage quantities into the specified tier with - # proration - # - # @return [Array] - required :tiers, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] } - - # @!method initialize(tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig} - # for more details. - # - # Configuration for tiered_with_proration pricing - # - # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # Inclusive tier starting value - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tiered with proration tier - # - # @param tier_lower_bound [String] Inclusive tier starting value - # - # @param unit_amount [String] Amount per unit - end - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence } - - # @!attribute grouped_with_min_max_thresholds_config - # Configuration for grouped_with_min_max_thresholds pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] - required :grouped_with_min_max_thresholds_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_min_max_thresholds] - required :model_type, const: :grouped_with_min_max_thresholds - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_min_max_thresholds_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before applying thresholds - # - # @return [String] - required :grouping_key, String - - # @!attribute maximum_charge - # The maximum amount to charge each group - # - # @return [String] - required :maximum_charge, String - - # @!attribute minimum_charge - # The minimum amount to charge each group, regardless of usage - # - # @return [String] - required :minimum_charge, String - - # @!attribute per_unit_rate - # The base price charged per group - # - # @return [String] - required :per_unit_rate, String - - # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) - # Configuration for grouped_with_min_max_thresholds pricing - # - # @param grouping_key [String] The event property used to group before applying thresholds - # - # @param maximum_charge [String] The maximum amount to charge each group - # - # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage - # - # @param per_unit_rate [String] The base price charged per group - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence } - - # @!attribute cumulative_grouped_allocation_config - # Configuration for cumulative_grouped_allocation pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] - required :cumulative_grouped_allocation_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :cumulative_grouped_allocation] - required :model_type, const: :cumulative_grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, cumulative_grouped_allocation_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_allocation_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute cumulative_allocation - # The overall allocation across all groups - # - # @return [String] - required :cumulative_allocation, String - - # @!attribute group_allocation - # The allocation per individual group - # - # @return [String] - required :group_allocation, String - - # @!attribute grouping_key - # The event property used to group usage before applying allocations - # - # @return [String] - required :grouping_key, String - - # @!attribute unit_amount - # The amount to charge for each unit outside of the allocation - # - # @return [String] - required :unit_amount, String - - # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:) - # Configuration for cumulative_grouped_allocation pricing - # - # @param cumulative_allocation [String] The overall allocation across all groups - # - # @param group_allocation [String] The allocation per individual group - # - # @param grouping_key [String] The event property used to group usage before applying allocations - # - # @param unit_amount [String] The amount to charge for each unit outside of the allocation - end - end - - class Percent < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence] - required :cadence, enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :percent] - required :model_type, const: :percent - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute percent_config - # Configuration for percent pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig] - required :percent_config, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, name:, percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :percent) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent} for more - # details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param name [String] The name of the price. - # - # @param percent_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig] Configuration for percent pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :percent] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent#percent_config - class PercentConfig < Orb::Internal::Type::BaseModel - # @!attribute percent - # What percent of the component subtotals to charge - # - # @return [Float] - required :percent, Float - - # @!method initialize(percent:) - # Configuration for percent pricing - # - # @param percent [Float] What percent of the component subtotals to charge - end - end - - class EventOutput < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence] - required :cadence, enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence } - - # @!attribute event_output_config - # Configuration for event_output pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig] - required :event_output_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :event_output] - required :model_type, const: :event_output - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, event_output_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :event_output) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput} for - # more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence] The cadence to bill for this price on. - # - # @param event_output_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig] Configuration for event_output pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :event_output] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput#event_output_config - class EventOutputConfig < Orb::Internal::Type::BaseModel - # @!attribute unit_rating_key - # The key in the event data to extract the unit rate from. - # - # @return [String] - required :unit_rating_key, String - - # @!attribute default_unit_rate - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - # - # @return [String, nil] - optional :default_unit_rate, String, nil?: true - - # @!attribute grouping_key - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - # - # @return [String, nil] - optional :grouping_key, String, nil?: true - - # @!method initialize(unit_rating_key:, default_unit_rate: nil, grouping_key: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig} - # for more details. - # - # Configuration for event_output pricing - # - # @param unit_rating_key [String] The key in the event data to extract the unit rate from. - # - # @param default_unit_rate [String, nil] If provided, this amount will be used as the unit rate when an event does not ha - # - # @param grouping_key [String, nil] An optional key in the event data to group by (e.g., event ID). All events will - end - end - - # @!method self.variants - # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput)] - end - end - - class RemoveAdjustment < Orb::Internal::Type::BaseModel - # @!attribute adjustment_id - # The id of the adjustment to remove from on the plan. - # - # @return [String] - required :adjustment_id, String - - # @!attribute plan_phase_order - # The phase to remove this adjustment from. - # - # @return [Integer, nil] - optional :plan_phase_order, Integer, nil?: true - - # @!method initialize(adjustment_id:, plan_phase_order: nil) - # @param adjustment_id [String] The id of the adjustment to remove from on the plan. - # - # @param plan_phase_order [Integer, nil] The phase to remove this adjustment from. - end - - class RemovePrice < Orb::Internal::Type::BaseModel - # @!attribute price_id - # The id of the price to remove from the plan. - # - # @return [String] - required :price_id, String - - # @!attribute plan_phase_order - # The phase to remove this price from. - # - # @return [Integer, nil] - optional :plan_phase_order, Integer, nil?: true - - # @!method initialize(price_id:, plan_phase_order: nil) - # @param price_id [String] The id of the price to remove from the plan. - # - # @param plan_phase_order [Integer, nil] The phase to remove this price from. - end - - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - # @!attribute adjustment - # The definition of a new adjustment to create and add to the plan. - # - # @return [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum] - required :adjustment, union: -> { Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment } - - # @!attribute replaces_adjustment_id - # The id of the adjustment on the plan to replace in the plan. - # - # @return [String] - required :replaces_adjustment_id, String - - # @!attribute plan_phase_order - # The phase to replace this adjustment from. - # - # @return [Integer, nil] - optional :plan_phase_order, Integer, nil?: true - - # @!method initialize(adjustment:, replaces_adjustment_id:, plan_phase_order: nil) - # @param adjustment [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum] The definition of a new adjustment to create and add to the plan. - # - # @param replaces_adjustment_id [String] The id of the adjustment on the plan to replace in the plan. - # - # @param plan_phase_order [Integer, nil] The phase to replace this adjustment from. - - # The definition of a new adjustment to create and add to the plan. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment#adjustment - module Adjustment - extend Orb::Internal::Type::Union - - discriminator :adjustment_type - - variant :percentage_discount, -> { Orb::NewPercentageDiscount } - - variant :usage_discount, -> { Orb::NewUsageDiscount } - - variant :amount_discount, -> { Orb::NewAmountDiscount } - - variant :minimum, -> { Orb::NewMinimum } - - variant :maximum, -> { Orb::NewMaximum } - - # @!method self.variants - # @return [Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum)] - end - end - - class ReplacePrice < Orb::Internal::Type::BaseModel - # @!attribute replaces_price_id - # The id of the price on the plan to replace in the plan. - # - # @return [String] - required :replaces_price_id, String - - # @!attribute allocation_price - # The allocation price to add to the plan. - # - # @return [Orb::Models::NewAllocationPrice, nil] - optional :allocation_price, -> { Orb::NewAllocationPrice }, nil?: true - - # @!attribute license_allocation_price - # The license allocation price to add to the plan. - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput, nil] - optional :license_allocation_price, - union: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice }, - nil?: true - - # @!attribute plan_phase_order - # The phase to replace this price from. - # - # @return [Integer, nil] - optional :plan_phase_order, Integer, nil?: true - - # @!attribute price - # New plan price request body params. - # - # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] - optional :price, union: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price }, nil?: true - - # @!method initialize(replaces_price_id:, allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil) - # @param replaces_price_id [String] The id of the price on the plan to replace in the plan. - # - # @param allocation_price [Orb::Models::NewAllocationPrice, nil] The allocation price to add to the plan. - # - # @param license_allocation_price [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput, nil] The license allocation price to add to the plan. - # - # @param plan_phase_order [Integer, nil] The phase to replace this price from. - # - # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] New plan price request body params. - - # The license allocation price to add to the plan. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice#license_allocation_price - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - discriminator :model_type - - variant :unit, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit } - - variant :tiered, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered } - - variant :bulk, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk } - - variant :bulk_with_filters, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters } - - variant :package, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package } - - variant :matrix, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix } - - variant :threshold_total_amount, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount } - - variant :tiered_package, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage } - - variant :tiered_with_minimum, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum } - - variant :grouped_tiered, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered } - - variant :tiered_package_with_minimum, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum } - - variant :package_with_allocation, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation } - - variant :unit_with_percent, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent } - - variant :matrix_with_allocation, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation } - - variant :tiered_with_proration, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration } - - variant :unit_with_proration, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration } - - variant :grouped_allocation, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation } - - variant :bulk_with_proration, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration } - - variant :grouped_with_prorated_minimum, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum } - - variant :grouped_with_metered_minimum, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum } - - variant :grouped_with_min_max_thresholds, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds } - - variant :matrix_with_display_name, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName } - - variant :grouped_tiered_package, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage } - - variant :max_group_tiered_package, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage } - - variant :scalable_matrix_with_unit_pricing, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing } - - variant :scalable_matrix_with_tiered_pricing, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing } - - variant :cumulative_grouped_bulk, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk } - - variant :cumulative_grouped_allocation, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation } - - variant :minimum_composite, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite } - - variant :percent, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent } - - variant :event_output, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput } - - class Unit < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :unit] - required :model_type, const: :unit - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_config - # Configuration for unit pricing - # - # @return [Orb::Models::UnitConfig] - required :unit_config, -> { Orb::UnitConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :unit] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Tiered < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered] - required :model_type, const: :tiered - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_config - # Configuration for tiered pricing - # - # @return [Orb::Models::TieredConfig] - required :tiered_config, -> { Orb::TieredConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_config [Orb::Models::TieredConfig] Configuration for tiered pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Bulk < Orb::Internal::Type::BaseModel - # @!attribute bulk_config - # Configuration for bulk pricing - # - # @return [Orb::Models::BulkConfig] - required :bulk_config, -> { Orb::BulkConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk] - required :model_type, const: :bulk - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk} - # for more details. - # - # @param bulk_config [Orb::Models::BulkConfig] Configuration for bulk pricing - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class BulkWithFilters < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_filters_config - # Configuration for bulk_with_filters pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig] - required :bulk_with_filters_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk_with_filters] - required :model_type, const: :bulk_with_filters - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_with_filters_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_filters) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters} - # for more details. - # - # @param bulk_with_filters_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk_with_filters] The pricing model type - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters#bulk_with_filters_config - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - # @!attribute filters - # Property filters to apply (all must match) - # - # @return [Array] - required :filters, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - end - - # @!attribute tiers - # Bulk tiers for rating based on total usage volume - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - end - - # @!method initialize(filters:, tiers:) - # Configuration for bulk_with_filters pricing - # - # @param filters [Array] Property filters to apply (all must match) - # - # @param tiers [Array] Bulk tiers for rating based on total usage volume - - class Filter < Orb::Internal::Type::BaseModel - # @!attribute property_key - # Event property key to filter on - # - # @return [String] - required :property_key, String - - # @!attribute property_value - # Event property value to match - # - # @return [String] - required :property_value, String - - # @!method initialize(property_key:, property_value:) - # Configuration for a single property filter - # - # @param property_key [String] Event property key to filter on - # - # @param property_value [String] Event property value to match - end - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!attribute tier_lower_bound - # The lower bound for this tier - # - # @return [String, nil] - optional :tier_lower_bound, String, nil?: true - - # @!method initialize(unit_amount:, tier_lower_bound: nil) - # Configuration for a single bulk pricing tier - # - # @param unit_amount [String] Amount per unit - # - # @param tier_lower_bound [String, nil] The lower bound for this tier - end - end - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Package < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :package] - required :model_type, const: :package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute package_config - # Configuration for package pricing - # - # @return [Orb::Models::PackageConfig] - required :package_config, -> { Orb::PackageConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, package_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :package) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param package_config [Orb::Models::PackageConfig] Configuration for package pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Matrix < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation] } - - # @!attribute matrix_config - # Configuration for matrix pricing - # - # @return [Orb::Models::MatrixConfig] - required :matrix_config, -> { Orb::MatrixConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix] - required :model_type, const: :matrix - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_config [Orb::Models::MatrixConfig] Configuration for matrix pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :threshold_total_amount] - required :model_type, const: :threshold_total_amount - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute threshold_total_amount_config - # Configuration for threshold_total_amount pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig] - required :threshold_total_amount_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, threshold_total_amount_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :threshold_total_amount) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param threshold_total_amount_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig] Configuration for threshold_total_amount pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :threshold_total_amount] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount#threshold_total_amount_config - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - # @!attribute consumption_table - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - # - # @return [Array] - required :consumption_table, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ] - end - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(consumption_table:, prorate: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig} - # for more details. - # - # Configuration for threshold_total_amount pricing - # - # @param consumption_table [Array] When the quantity consumed passes a provided threshold, the configured total wil - # - # @param prorate [Boolean, nil] If true, the unit price will be prorated to the billing period - - class ConsumptionTable < Orb::Internal::Type::BaseModel - # @!attribute threshold - # - # @return [String] - required :threshold, String - - # @!attribute total_amount - # Total amount for this threshold - # - # @return [String] - required :total_amount, String - - # @!method initialize(threshold:, total_amount:) - # Configuration for a single threshold - # - # @param threshold [String] - # - # @param total_amount [String] Total amount for this threshold - end - end - end - - class TieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_package] - required :model_type, const: :tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_package_config - # Configuration for tiered_package pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig] - required :tiered_package_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_package_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_package_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig] Configuration for tiered_package pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage#tiered_package_config - class TieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - end - - # @!method initialize(package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig} - # for more details. - # - # Configuration for tiered_package pricing - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute per_unit - # Price per package - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(per_unit:, tier_lower_bound:) - # Configuration for a single tier with business logic - # - # @param per_unit [String] Price per package - # - # @param tier_lower_bound [String] - end - end - end - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_with_minimum] - required :model_type, const: :tiered_with_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_minimum_config - # Configuration for tiered_with_minimum pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig] - required :tiered_with_minimum_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_with_minimum_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_with_minimum_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig] Configuration for tiered_with_minimum pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_with_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum#tiered_with_minimum_config - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ] - end - - # @!attribute hide_zero_amount_tiers - # If true, tiers with an accrued amount of 0 will not be included in the rating. - # - # @return [Boolean, nil] - optional :hide_zero_amount_tiers, Orb::Internal::Type::Boolean - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean - - # @!method initialize(tiers:, hide_zero_amount_tiers: nil, prorate: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig} - # for more details. - # - # Configuration for tiered_with_minimum pricing - # - # @param tiers [Array] Tiered pricing with a minimum amount dependent on the volume tier. Tiers are def - # - # @param hide_zero_amount_tiers [Boolean] If true, tiers with an accrued amount of 0 will not be included in the rating. - # - # @param prorate [Boolean] If true, the unit price will be prorated to the billing period - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # - # @return [String] - required :minimum_amount, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(minimum_amount:, tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param minimum_amount [String] - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - end - - class GroupedTiered < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence } - - # @!attribute grouped_tiered_config - # Configuration for grouped_tiered pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig] - required :grouped_tiered_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_tiered] - required :model_type, const: :grouped_tiered - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_tiered_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_tiered) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence] The cadence to bill for this price on. - # - # @param grouped_tiered_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig] Configuration for grouped_tiered pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_tiered] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered#grouped_tiered_config - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The billable metric property used to group before tiering - # - # @return [String] - required :grouping_key, String - - # @!attribute tiers - # Apply tiered pricing to each segment generated after grouping with the provided - # key - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - end - - # @!method initialize(grouping_key:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig} - # for more details. - # - # Configuration for grouped_tiered pricing - # - # @param grouping_key [String] The billable metric property used to group before tiering - # - # @param tiers [Array] Apply tiered pricing to each segment generated after grouping with the provided - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_package_with_minimum] - required :model_type, const: :tiered_package_with_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_package_with_minimum_config - # Configuration for tiered_package_with_minimum pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig] - required :tiered_package_with_minimum_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_package_with_minimum_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_package_with_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_package_with_minimum_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig] Configuration for tiered_package_with_minimum pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_package_with_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum#tiered_package_with_minimum_config - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute package_size - # - # @return [Float] - required :package_size, Float - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - end - - # @!method initialize(package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig} - # for more details. - # - # Configuration for tiered_package_with_minimum pricing - # - # @param package_size [Float] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # - # @return [String] - required :minimum_amount, String - - # @!attribute per_unit - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(minimum_amount:, per_unit:, tier_lower_bound:) - # Configuration for a single tier - # - # @param minimum_amount [String] - # @param per_unit [String] - # @param tier_lower_bound [String] - end - end - end - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :package_with_allocation] - required :model_type, const: :package_with_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute package_with_allocation_config - # Configuration for package_with_allocation pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig] - required :package_with_allocation_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, package_with_allocation_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :package_with_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param package_with_allocation_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig] Configuration for package_with_allocation pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :package_with_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation#package_with_allocation_config - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute allocation - # - # @return [String] - required :allocation, String - - # @!attribute package_amount - # - # @return [String] - required :package_amount, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!method initialize(allocation:, package_amount:, package_size:) - # Configuration for package_with_allocation pricing - # - # @param allocation [String] - # @param package_amount [String] - # @param package_size [String] - end - end - - class UnitWithPercent < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :unit_with_percent] - required :model_type, const: :unit_with_percent - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_with_percent_config - # Configuration for unit_with_percent pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig] - required :unit_with_percent_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_with_percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit_with_percent) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param unit_with_percent_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig] Configuration for unit_with_percent pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :unit_with_percent] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent#unit_with_percent_config - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - # @!attribute percent - # What percent, out of 100, of the calculated total to charge - # - # @return [String] - required :percent, String - - # @!attribute unit_amount - # Rate per unit of usage - # - # @return [String] - required :unit_amount, String - - # @!method initialize(percent:, unit_amount:) - # Configuration for unit_with_percent pricing - # - # @param percent [String] What percent, out of 100, of the calculated total to charge - # - # @param unit_amount [String] Rate per unit of usage - end - end - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ] - end - - # @!attribute matrix_with_allocation_config - # Configuration for matrix_with_allocation pricing - # - # @return [Orb::Models::MatrixWithAllocationConfig] - required :matrix_with_allocation_config, -> { Orb::MatrixWithAllocationConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix_with_allocation] - required :model_type, const: :matrix_with_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_with_allocation_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_with_allocation_config [Orb::Models::MatrixWithAllocationConfig] Configuration for matrix_with_allocation pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix_with_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_with_proration] - required :model_type, const: :tiered_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_proration_config - # Configuration for tiered_with_proration pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig] - required :tiered_with_proration_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_with_proration_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_with_proration] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration#tiered_with_proration_config - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Tiers for rating based on total usage quantities into the specified tier with - # proration - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - end - - # @!method initialize(tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig} - # for more details. - # - # Configuration for tiered_with_proration pricing - # - # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # Inclusive tier starting value - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tiered with proration tier - # - # @param tier_lower_bound [String] Inclusive tier starting value - # - # @param unit_amount [String] Amount per unit - end - end - end - - class UnitWithProration < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :unit_with_proration] - required :model_type, const: :unit_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_with_proration_config - # Configuration for unit_with_proration pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig] - required :unit_with_proration_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param unit_with_proration_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig] Configuration for unit_with_proration pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :unit_with_proration] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration#unit_with_proration_config - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Rate per unit of usage - # - # @return [String] - required :unit_amount, String - - # @!method initialize(unit_amount:) - # Configuration for unit_with_proration pricing - # - # @param unit_amount [String] Rate per unit of usage - end - end - - class GroupedAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence } - - # @!attribute grouped_allocation_config - # Configuration for grouped_allocation pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig] - required :grouped_allocation_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_allocation] - required :model_type, const: :grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_allocation_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param grouped_allocation_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig] Configuration for grouped_allocation pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation#grouped_allocation_config - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute allocation - # Usage allocation per group - # - # @return [String] - required :allocation, String - - # @!attribute grouping_key - # How to determine the groups that should each be allocated some quantity - # - # @return [String] - required :grouping_key, String - - # @!attribute overage_unit_rate - # Unit rate for post-allocation - # - # @return [String] - required :overage_unit_rate, String - - # @!method initialize(allocation:, grouping_key:, overage_unit_rate:) - # Configuration for grouped_allocation pricing - # - # @param allocation [String] Usage allocation per group - # - # @param grouping_key [String] How to determine the groups that should each be allocated some quantity - # - # @param overage_unit_rate [String] Unit rate for post-allocation - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class BulkWithProration < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_proration_config - # Configuration for bulk_with_proration pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig] - required :bulk_with_proration_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk_with_proration] - required :model_type, const: :bulk_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_with_proration_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration} - # for more details. - # - # @param bulk_with_proration_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig] Configuration for bulk_with_proration pricing - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk_with_proration] The pricing model type - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration#bulk_with_proration_config - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Bulk tiers for rating based on total usage volume - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - end - - # @!method initialize(tiers:) - # Configuration for bulk_with_proration pricing - # - # @param tiers [Array] Bulk tiers for rating based on total usage volume - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Cost per unit - # - # @return [String] - required :unit_amount, String - - # @!attribute tier_lower_bound - # The lower bound for this tier - # - # @return [String, nil] - optional :tier_lower_bound, String, nil?: true - - # @!method initialize(unit_amount:, tier_lower_bound: nil) - # Configuration for a single bulk pricing tier with proration - # - # @param unit_amount [String] Cost per unit - # - # @param tier_lower_bound [String, nil] The lower bound for this tier - end - end - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence } - - # @!attribute grouped_with_prorated_minimum_config - # Configuration for grouped_with_prorated_minimum pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig] - required :grouped_with_prorated_minimum_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_prorated_minimum] - required :model_type, const: :grouped_with_prorated_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_prorated_minimum_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_prorated_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_prorated_minimum_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig] Configuration for grouped_with_prorated_minimum pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_prorated_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum#grouped_with_prorated_minimum_config - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # How to determine the groups that should each have a minimum - # - # @return [String] - required :grouping_key, String - - # @!attribute minimum - # The minimum amount to charge per group - # - # @return [String] - required :minimum, String - - # @!attribute unit_rate - # The amount to charge per unit - # - # @return [String] - required :unit_rate, String - - # @!method initialize(grouping_key:, minimum:, unit_rate:) - # Configuration for grouped_with_prorated_minimum pricing - # - # @param grouping_key [String] How to determine the groups that should each have a minimum - # - # @param minimum [String] The minimum amount to charge per group - # - # @param unit_rate [String] The amount to charge per unit - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence } - - # @!attribute grouped_with_metered_minimum_config - # Configuration for grouped_with_metered_minimum pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig] - required :grouped_with_metered_minimum_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_metered_minimum] - required :model_type, const: :grouped_with_metered_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_metered_minimum_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_metered_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_metered_minimum_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig] Configuration for grouped_with_metered_minimum pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_metered_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum#grouped_with_metered_minimum_config - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - # - # @return [String] - required :grouping_key, String - - # @!attribute minimum_unit_amount - # The minimum amount to charge per group per unit - # - # @return [String] - required :minimum_unit_amount, String - - # @!attribute pricing_key - # Used to determine the unit rate - # - # @return [String] - required :pricing_key, String - - # @!attribute scaling_factors - # Scale the unit rates by the scaling factor. - # - # @return [Array] - required :scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ] - end - - # @!attribute scaling_key - # Used to determine the unit rate scaling factor - # - # @return [String] - required :scaling_key, String - - # @!attribute unit_amounts - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - # - # @return [Array] - required :unit_amounts, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - end - - # @!method initialize(grouping_key:, minimum_unit_amount:, pricing_key:, scaling_factors:, scaling_key:, unit_amounts:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig} - # for more details. - # - # Configuration for grouped_with_metered_minimum pricing - # - # @param grouping_key [String] Used to partition the usage into groups. The minimum amount is applied to each g - # - # @param minimum_unit_amount [String] The minimum amount to charge per group per unit - # - # @param pricing_key [String] Used to determine the unit rate - # - # @param scaling_factors [Array] Scale the unit rates by the scaling factor. - # - # @param scaling_key [String] Used to determine the unit rate scaling factor - # - # @param unit_amounts [Array] Apply per unit pricing to each pricing value. The minimum amount is applied any - - class ScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute scaling_value - # - # @return [String] - required :scaling_value, String - - # @!method initialize(scaling_factor:, scaling_value:) - # Configuration for a scaling factor - # - # @param scaling_factor [String] - # @param scaling_value [String] - end - - class UnitAmount < Orb::Internal::Type::BaseModel - # @!attribute pricing_value - # - # @return [String] - required :pricing_value, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(pricing_value:, unit_amount:) - # Configuration for a unit amount - # - # @param pricing_value [String] - # - # @param unit_amount [String] Per unit amount - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence } - - # @!attribute grouped_with_min_max_thresholds_config - # Configuration for grouped_with_min_max_thresholds pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] - required :grouped_with_min_max_thresholds_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_min_max_thresholds] - required :model_type, const: :grouped_with_min_max_thresholds - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_min_max_thresholds_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before applying thresholds - # - # @return [String] - required :grouping_key, String - - # @!attribute maximum_charge - # The maximum amount to charge each group - # - # @return [String] - required :maximum_charge, String - - # @!attribute minimum_charge - # The minimum amount to charge each group, regardless of usage - # - # @return [String] - required :minimum_charge, String - - # @!attribute per_unit_rate - # The base price charged per group - # - # @return [String] - required :per_unit_rate, String - - # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) - # Configuration for grouped_with_min_max_thresholds pricing - # - # @param grouping_key [String] The event property used to group before applying thresholds - # - # @param maximum_charge [String] The maximum amount to charge each group - # - # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage - # - # @param per_unit_rate [String] The base price charged per group - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ] - end - - # @!attribute matrix_with_display_name_config - # Configuration for matrix_with_display_name pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig] - required :matrix_with_display_name_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix_with_display_name] - required :model_type, const: :matrix_with_display_name - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_with_display_name_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_display_name) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_with_display_name_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig] Configuration for matrix_with_display_name pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix_with_display_name] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName#matrix_with_display_name_config - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - # @!attribute dimension - # Used to determine the unit rate - # - # @return [String] - required :dimension, String - - # @!attribute unit_amounts - # Apply per unit pricing to each dimension value - # - # @return [Array] - required :unit_amounts, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - end - - # @!method initialize(dimension:, unit_amounts:) - # Configuration for matrix_with_display_name pricing - # - # @param dimension [String] Used to determine the unit rate - # - # @param unit_amounts [Array] Apply per unit pricing to each dimension value - - class UnitAmount < Orb::Internal::Type::BaseModel - # @!attribute dimension_value - # The dimension value - # - # @return [String] - required :dimension_value, String - - # @!attribute display_name - # Display name for this dimension value - # - # @return [String] - required :display_name, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(dimension_value:, display_name:, unit_amount:) - # Configuration for a unit amount item - # - # @param dimension_value [String] The dimension value - # - # @param display_name [String] Display name for this dimension value - # - # @param unit_amount [String] Per unit amount - end - end - end - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence } - - # @!attribute grouped_tiered_package_config - # Configuration for grouped_tiered_package pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig] - required :grouped_tiered_package_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_tiered_package] - required :model_type, const: :grouped_tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_tiered_package_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence] The cadence to bill for this price on. - # - # @param grouped_tiered_package_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig] Configuration for grouped_tiered_package pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage#grouped_tiered_package_config - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before tiering - # - # @return [String] - required :grouping_key, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - end - - # @!method initialize(grouping_key:, package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig} - # for more details. - # - # Configuration for grouped_tiered_package pricing - # - # @param grouping_key [String] The event property used to group before tiering - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute per_unit - # Per package - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(per_unit:, tier_lower_bound:) - # Configuration for a single tier - # - # @param per_unit [String] Per package - # - # @param tier_lower_bound [String] - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ] - end - - # @!attribute max_group_tiered_package_config - # Configuration for max_group_tiered_package pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig] - required :max_group_tiered_package_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :max_group_tiered_package] - required :model_type, const: :max_group_tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, max_group_tiered_package_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :max_group_tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param max_group_tiered_package_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig] Configuration for max_group_tiered_package pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :max_group_tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage#max_group_tiered_package_config - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before tiering the group with the highest value - # - # @return [String] - required :grouping_key, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing to the largest group after grouping with the provided key. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - end - - # @!method initialize(grouping_key:, package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig} - # for more details. - # - # Configuration for max_group_tiered_package pricing - # - # @param grouping_key [String] The event property used to group before tiering the group with the highest value - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing to the largest group after grouping with the provided key. - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - end - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :scalable_matrix_with_unit_pricing] - required :model_type, const: :scalable_matrix_with_unit_pricing - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute scalable_matrix_with_unit_pricing_config - # Configuration for scalable_matrix_with_unit_pricing pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig] - required :scalable_matrix_with_unit_pricing_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, scalable_matrix_with_unit_pricing_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :scalable_matrix_with_unit_pricing) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param scalable_matrix_with_unit_pricing_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig] Configuration for scalable_matrix_with_unit_pricing pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :scalable_matrix_with_unit_pricing] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing#scalable_matrix_with_unit_pricing_config - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - # @!attribute first_dimension - # Used to determine the unit rate - # - # @return [String] - required :first_dimension, String - - # @!attribute matrix_scaling_factors - # Apply a scaling factor to each dimension - # - # @return [Array] - required :matrix_scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ] - end - - # @!attribute unit_price - # The final unit price to rate against the output of the matrix - # - # @return [String] - required :unit_price, String - - # @!attribute grouping_key - # The property used to group this price - # - # @return [String, nil] - optional :grouping_key, String, nil?: true - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute second_dimension - # Used to determine the unit rate (optional) - # - # @return [String, nil] - optional :second_dimension, String, nil?: true - - # @!method initialize(first_dimension:, matrix_scaling_factors:, unit_price:, grouping_key: nil, prorate: nil, second_dimension: nil) - # Configuration for scalable_matrix_with_unit_pricing pricing - # - # @param first_dimension [String] Used to determine the unit rate - # - # @param matrix_scaling_factors [Array] Apply a scaling factor to each dimension - # - # @param unit_price [String] The final unit price to rate against the output of the matrix - # - # @param grouping_key [String, nil] The property used to group this price - # - # @param prorate [Boolean, nil] If true, the unit price will be prorated to the billing period - # - # @param second_dimension [String, nil] Used to determine the unit rate (optional) - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute first_dimension_value - # - # @return [String] - required :first_dimension_value, String - - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute second_dimension_value - # - # @return [String, nil] - optional :second_dimension_value, String, nil?: true - - # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil) - # Configuration for a single matrix scaling factor - # - # @param first_dimension_value [String] - # @param scaling_factor [String] - # @param second_dimension_value [String, nil] - end - end - end - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :scalable_matrix_with_tiered_pricing] - required :model_type, const: :scalable_matrix_with_tiered_pricing - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute scalable_matrix_with_tiered_pricing_config - # Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig] - required :scalable_matrix_with_tiered_pricing_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, scalable_matrix_with_tiered_pricing_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :scalable_matrix_with_tiered_pricing) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param scalable_matrix_with_tiered_pricing_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig] Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :scalable_matrix_with_tiered_pricing] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing#scalable_matrix_with_tiered_pricing_config - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - # @!attribute first_dimension - # Used for the scalable matrix first dimension - # - # @return [String] - required :first_dimension, String - - # @!attribute matrix_scaling_factors - # Apply a scaling factor to each dimension - # - # @return [Array] - required :matrix_scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ] - end - - # @!attribute tiers - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ] - end - - # @!attribute second_dimension - # Used for the scalable matrix second dimension (optional) - # - # @return [String, nil] - optional :second_dimension, String, nil?: true - - # @!method initialize(first_dimension:, matrix_scaling_factors:, tiers:, second_dimension: nil) - # Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @param first_dimension [String] Used for the scalable matrix first dimension - # - # @param matrix_scaling_factors [Array] Apply a scaling factor to each dimension - # - # @param tiers [Array] - # - # @param second_dimension [String, nil] Used for the scalable matrix second dimension (optional) - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute first_dimension_value - # - # @return [String] - required :first_dimension_value, String - - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute second_dimension_value - # - # @return [String, nil] - optional :second_dimension_value, String, nil?: true - - # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil) - # Configuration for a single matrix scaling factor - # - # @param first_dimension_value [String] - # @param scaling_factor [String] - # @param second_dimension_value [String, nil] - end - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier entry with business logic - # - # @param tier_lower_bound [String] - # @param unit_amount [String] - end - end - end - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence } - - # @!attribute cumulative_grouped_bulk_config - # Configuration for cumulative_grouped_bulk pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig] - required :cumulative_grouped_bulk_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :cumulative_grouped_bulk] - required :model_type, const: :cumulative_grouped_bulk - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, cumulative_grouped_bulk_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_bulk) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_bulk_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig] Configuration for cumulative_grouped_bulk pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :cumulative_grouped_bulk] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk#cumulative_grouped_bulk_config - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - # @!attribute dimension_values - # Each tier lower bound must have the same group of values. - # - # @return [Array] - required :dimension_values, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ] - end - - # @!attribute group - # - # @return [String] - required :group, String - - # @!method initialize(dimension_values:, group:) - # Configuration for cumulative_grouped_bulk pricing - # - # @param dimension_values [Array] Each tier lower bound must have the same group of values. - # - # @param group [String] - - class DimensionValue < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # Grouping key value - # - # @return [String] - required :grouping_key, String - - # @!attribute tier_lower_bound - # Tier lower bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Unit amount for this combination - # - # @return [String] - required :unit_amount, String - - # @!method initialize(grouping_key:, tier_lower_bound:, unit_amount:) - # Configuration for a dimension value entry - # - # @param grouping_key [String] Grouping key value - # - # @param tier_lower_bound [String] Tier lower bound - # - # @param unit_amount [String] Unit amount for this combination - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence } - - # @!attribute cumulative_grouped_allocation_config - # Configuration for cumulative_grouped_allocation pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] - required :cumulative_grouped_allocation_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ] - end - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :cumulative_grouped_allocation] - required :model_type, const: :cumulative_grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true + # @!method self.variants + # @return [Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum)] + end + end - # @!attribute conversion_rate_config - # The configuration for 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 + 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 currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, 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 dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true + # @!attribute license_allocation_price + # The license allocation price to add to the plan. + # + # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice, nil] + optional :license_allocation_price, + -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice }, + nil?: true - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, 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 fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, 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::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 invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, 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::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice, nil] The license allocation price to add to the plan. + # + # @param plan_phase_order [Integer, nil] The phase to replace this price from. + # + # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::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. - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + # @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 - # @!attribute license_type_id - # The ID of the license type to associate with this price. + class LicenseAllocation < Orb::Internal::Type::BaseModel + # @!attribute amount + # The amount of credits granted per active license per cadence. # - # @return [String, nil] - optional :license_type_id, String, nil?: true + # @return [String] + required :amount, 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`. + # @!attribute currency + # The currency of the license allocation. # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + # @return [String] + required :currency, String - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. + # @!attribute write_off_overage + # When True, overage beyond the allocation is written off. # - # @return [String, nil] - optional :reference_id, String, nil?: true + # @return [Boolean, nil] + optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - # @!method initialize(cadence:, cumulative_grouped_allocation_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_allocation_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # @!method initialize(amount:, currency:, write_off_overage: nil) + # @param amount [String] The amount of credits granted per active license per cadence. # - # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type - - # The cadence to bill for this price on. + # @param currency [String] The currency of the license allocation. # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation#cumulative_grouped_allocation_config - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute cumulative_allocation - # The overall allocation across all groups - # - # @return [String] - required :cumulative_allocation, String - - # @!attribute group_allocation - # The allocation per individual group - # - # @return [String] - required :group_allocation, String + # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + end - # @!attribute grouping_key - # The event property used to group usage before applying allocations - # - # @return [String] - required :grouping_key, String + # The pricing model type + # + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice#model_type + module ModelType + extend Orb::Internal::Type::Enum - # @!attribute unit_amount - # The amount to charge for each unit outside of the allocation - # - # @return [String] - required :unit_amount, String + UNIT = :unit - # @!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 + # @!method self.values + # @return [Array] + 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 + # New plan price request body params. + # + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice#price + module Price + extend Orb::Internal::Type::Union - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String + discriminator :model_type - # @!attribute write_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 :unit, -> { Orb::NewPlanUnitPrice } - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param 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 :tiered, -> { Orb::NewPlanTieredPrice } - 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] - required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence } + variant :bulk, -> { Orb::NewPlanBulkPrice } - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String + variant :bulk_with_filters, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters } - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted 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 + variant :package, -> { Orb::NewPlanPackagePrice } - # @!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 } + variant :matrix, -> { Orb::NewPlanMatrixPrice } - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :minimum_composite] - required :model_type, const: :minimum_composite + variant :threshold_total_amount, -> { Orb::NewPlanThresholdTotalAmountPrice } - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String + variant :tiered_package, -> { Orb::NewPlanTieredPackagePrice } - # @!attribute billable_metric_id - # The id of 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_with_minimum, -> { Orb::NewPlanTieredWithMinimumPrice } - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance 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 :grouped_tiered, -> { Orb::NewPlanGroupedTieredPrice } - # @!attribute billing_cycle_configuration - # For custom cadence: 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 :tiered_package_with_minimum, -> { Orb::NewPlanTieredPackageWithMinimumPrice } - # @!attribute 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 :package_with_allocation, -> { Orb::NewPlanPackageWithAllocationPrice } - # @!attribute conversion_rate_config - # The configuration for 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::MinimumComposite::ConversionRateConfig - }, - nil?: true + variant :unit_with_percent, -> { Orb::NewPlanUnitWithPercentPrice } - # @!attribute currency - # 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_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice } - # @!attribute dimensional_price_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::BetaCreatePlanVersionParams::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::BetaCreatePlanVersionParams::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::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite} - # 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 license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param minimum_composite_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig] Configuration for minimum_composite pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be 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::BetaCreatePlanVersionParams::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::BetaCreatePlanVersionParams::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::BetaCreatePlanVersionParams::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::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance } - # @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 + 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::BetaCreatePlanVersionParams::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::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 Percent < 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::BulkWithFilters::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence } + enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -18473,20 +2910,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, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation] } - # @!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. @@ -18494,13 +2922,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 +2955,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::BulkWithFilters::ConversionRateConfig }, nil?: true @@ -18602,21 +3023,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::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent} + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters} # for more details. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence] The cadence to bill for this price on. + # @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::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::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 +3064,77 @@ 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::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::Percent#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters#cadence module Cadence extend Orb::Internal::Type::Enum @@ -18663,63 +3148,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::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 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 +3164,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 +3176,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 +3216,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 +3284,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 +3325,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 +3344,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 +3414,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 +3456,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 +3524,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 +3565,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 +3583,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 +3647,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 +3656,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 +3689,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 +3757,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 +3798,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 +3817,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 +3880,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 +3922,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 +3990,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 +4031,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 +4050,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 +4150,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 +4202,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 +4270,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 +4311,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 +4330,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 +4835,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput)] end end end diff --git a/lib/orb/models/changed_subscription_resources.rb b/lib/orb/models/changed_subscription_resources.rb index b6335a99..75a70c0a 100644 --- a/lib/orb/models/changed_subscription_resources.rb +++ b/lib/orb/models/changed_subscription_resources.rb @@ -852,7 +852,7 @@ class LineItem < Orb::Internal::Type::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute quantity @@ -919,7 +919,7 @@ class LineItem < Orb::Internal::Type::BaseModel # # @param partially_invoiced_amount [String] Any amount applied from a partial invoice # - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu # # @param quantity [Float] Either the fixed fee quantity or the usage during the service period. # diff --git a/lib/orb/models/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..fe107ec6 100644 --- a/lib/orb/models/invoice.rb +++ b/lib/orb/models/invoice.rb @@ -806,7 +806,7 @@ class LineItem < Orb::Internal::Type::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute quantity @@ -871,7 +871,7 @@ class LineItem < Orb::Internal::Type::BaseModel # # @param partially_invoiced_amount [String] Any amount applied from a partial invoice # - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu # # @param quantity [Float] Either the fixed fee quantity or the usage during the service period. # diff --git a/lib/orb/models/invoice_fetch_upcoming_response.rb b/lib/orb/models/invoice_fetch_upcoming_response.rb index 29e42ad3..6bb4890f 100644 --- a/lib/orb/models/invoice_fetch_upcoming_response.rb +++ b/lib/orb/models/invoice_fetch_upcoming_response.rb @@ -807,7 +807,7 @@ class LineItem < Orb::Internal::Type::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute quantity @@ -873,7 +873,7 @@ class LineItem < Orb::Internal::Type::BaseModel # # @param partially_invoiced_amount [String] Any amount applied from a partial invoice # - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu # # @param quantity [Float] Either the fixed fee quantity or the usage during the service period. # diff --git a/lib/orb/models/invoice_line_item_create_response.rb b/lib/orb/models/invoice_line_item_create_response.rb index 3b52bb57..c521c507 100644 --- a/lib/orb/models/invoice_line_item_create_response.rb +++ b/lib/orb/models/invoice_line_item_create_response.rb @@ -83,7 +83,7 @@ class InvoiceLineItemCreateResponse < Orb::Internal::Type::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::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::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/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..bf92f133 100644 --- a/lib/orb/models/per_price_cost.rb +++ b/lib/orb/models/per_price_cost.rb @@ -6,7 +6,7 @@ class PerPriceCost < Orb::Internal::Type::BaseModel # @!attribute price # The price object # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::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::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..82ce93e5 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..8f182bc3 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,346 @@ class Price < Orb::Internal::Type::BaseModel # @!attribute price # New plan price request body params. # - # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput, nil] + # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::Models::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::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::PlanCreateParams::Price::LicenseAllocationPrice::Tiered } + variant :tiered, -> { Orb::NewPlanTieredPrice } - variant :bulk, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk } + variant :bulk, -> { Orb::NewPlanBulkPrice } - variant :bulk_with_filters, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters } + variant :bulk_with_filters, -> { Orb::PlanCreateParams::Price::Price::BulkWithFilters } - variant :package, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package } + variant :package, -> { Orb::NewPlanPackagePrice } - variant :matrix, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix } + variant :matrix, -> { Orb::NewPlanMatrixPrice } - variant :threshold_total_amount, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount } + variant :threshold_total_amount, -> { Orb::NewPlanThresholdTotalAmountPrice } - variant :tiered_package, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage } + variant :tiered_package, -> { Orb::NewPlanTieredPackagePrice } - variant :tiered_with_minimum, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum } + variant :tiered_with_minimum, -> { Orb::NewPlanTieredWithMinimumPrice } - variant :grouped_tiered, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered } + variant :grouped_tiered, -> { Orb::NewPlanGroupedTieredPrice } - variant :tiered_package_with_minimum, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum } + variant :tiered_package_with_minimum, -> { Orb::NewPlanTieredPackageWithMinimumPrice } - variant :package_with_allocation, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation } + variant :package_with_allocation, -> { Orb::NewPlanPackageWithAllocationPrice } - variant :unit_with_percent, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent } + variant :unit_with_percent, -> { Orb::NewPlanUnitWithPercentPrice } - variant :matrix_with_allocation, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation } + variant :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice } - 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 :metered_allowance, -> { Orb::PlanCreateParams::Price::Price::MeteredAllowance } - variant :minimum_composite, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite } + 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 +483,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 +495,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 +527,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 +594,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 +634,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 +718,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 TieredWithProration < 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::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. @@ -473,20 +733,11 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::LicenseAllocation] } - # @!attribute model_type # The pricing model type # - # @return [Symbol, :tiered] - required :model_type, const: :tiered + # @return [Symbol, :tiered_with_proration] + required :model_type, const: :tiered_with_proration # @!attribute name # The name of the price. @@ -494,11 +745,12 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute tiered_config - # Configuration for tiered pricing + # @!attribute tiered_with_proration_config + # Configuration for tiered_with_proration pricing # - # @return [Orb::Models::TieredConfig] - required :tiered_config, -> { Orb::TieredConfig } + # @return [Orb::Models::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 @@ -533,7 +785,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::TieredWithProration::ConversionRateConfig }, nil?: true @@ -601,20 +853,18 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered) + # @!method initialize(cadence:, item_id:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration) # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered} for more + # {Orb::Models::PlanCreateParams::Price::Price::TieredWithProration} 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::TieredWithProration::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # - # @param tiered_config [Orb::Models::TieredConfig] Configuration for tiered pricing + # @param tiered_with_proration_config [Orb::Models::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 # @@ -644,11 +894,11 @@ class Tiered < Orb::Internal::Type::BaseModel # # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments # - # @param model_type [Symbol, :tiered] The pricing model type + # @param model_type [Symbol, :tiered_with_proration] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered#cadence + # @see Orb::Models::PlanCreateParams::Price::Price::TieredWithProration#cadence module Cadence extend Orb::Internal::Type::Enum @@ -663,46 +913,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 Bulk < Orb::Internal::Type::BaseModel - # @!attribute bulk_config - # Configuration for bulk pricing - # - # @return [Orb::Models::BulkConfig] - required :bulk_config, -> { Orb::BulkConfig } - + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence] - required :cadence, enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::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. @@ -710,20 +975,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, :grouped_with_min_max_thresholds] + required :model_type, const: :grouped_with_min_max_thresholds # @!attribute name # The name of the price. @@ -764,7 +1020,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::GroupedWithMinMaxThresholds::ConversionRateConfig }, nil?: true @@ -832,19 +1088,17 @@ class Bulk < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(bulk_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk) + # @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds) # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk} for more - # details. + # {Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds} for + # more details. # - # @param bulk_config [Orb::Models::BulkConfig] Configuration for bulk 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::Bulk::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 @@ -875,11 +1129,11 @@ class Bulk < Orb::Internal::Type::BaseModel # # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments # - # @param model_type [Symbol, :bulk] The pricing model type + # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk#cadence + # @see Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds#cadence module Cadence extend Orb::Internal::Type::Enum @@ -894,8078 +1148,58 @@ 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 - end - - class BulkWithFilters < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_filters_config - # Configuration for bulk_with_filters pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig] - required :bulk_with_filters_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk_with_filters] - required :model_type, const: :bulk_with_filters - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_with_filters_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_filters) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters} - # for more details. - # - # @param bulk_with_filters_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk_with_filters] The pricing model type - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters#bulk_with_filters_config - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - # @!attribute filters - # Property filters to apply (all must match) - # - # @return [Array] - required :filters, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter] } - - # @!attribute tiers - # Bulk tiers for rating based on total usage volume - # - # @return [Array] - required :tiers, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] } - - # @!method initialize(filters:, tiers:) - # Configuration for bulk_with_filters pricing - # - # @param filters [Array] Property filters to apply (all must match) - # - # @param tiers [Array] Bulk tiers for rating based on total usage volume - - class Filter < Orb::Internal::Type::BaseModel - # @!attribute property_key - # Event property key to filter on - # - # @return [String] - required :property_key, String - - # @!attribute property_value - # Event property value to match - # - # @return [String] - required :property_value, String - - # @!method initialize(property_key:, property_value:) - # Configuration for a single property filter - # - # @param property_key [String] Event property key to filter on - # - # @param property_value [String] Event property value to match - end - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!attribute tier_lower_bound - # The lower bound for this tier - # - # @return [String, nil] - optional :tier_lower_bound, String, nil?: true - - # @!method initialize(unit_amount:, tier_lower_bound: nil) - # Configuration for a single bulk pricing tier - # - # @param unit_amount [String] Amount per unit - # - # @param tier_lower_bound [String, nil] The lower bound for this tier - end - end - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Package < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence] - required :cadence, enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :package] - required :model_type, const: :package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute package_config - # Configuration for package pricing - # - # @return [Orb::Models::PackageConfig] - required :package_config, -> { Orb::PackageConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, package_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :package) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package} for more - # details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param package_config [Orb::Models::PackageConfig] Configuration for package pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class Matrix < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence] - required :cadence, enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::LicenseAllocation] } - - # @!attribute matrix_config - # Configuration for matrix pricing - # - # @return [Orb::Models::MatrixConfig] - required :matrix_config, -> { Orb::MatrixConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix] - required :model_type, const: :matrix - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix} for more - # details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_config [Orb::Models::MatrixConfig] Configuration for matrix pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :threshold_total_amount] - required :model_type, const: :threshold_total_amount - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute threshold_total_amount_config - # Configuration for threshold_total_amount pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig] - required :threshold_total_amount_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, threshold_total_amount_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :threshold_total_amount) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param threshold_total_amount_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig] Configuration for threshold_total_amount pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :threshold_total_amount] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount#threshold_total_amount_config - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - # @!attribute consumption_table - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - # - # @return [Array] - required :consumption_table, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ] - end - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(consumption_table:, prorate: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig} - # for more details. - # - # Configuration for threshold_total_amount pricing - # - # @param consumption_table [Array] When the quantity consumed passes a provided threshold, the configured total wil - # - # @param prorate [Boolean, nil] If true, the unit price will be prorated to the billing period - - class ConsumptionTable < Orb::Internal::Type::BaseModel - # @!attribute threshold - # - # @return [String] - required :threshold, String - - # @!attribute total_amount - # Total amount for this threshold - # - # @return [String] - required :total_amount, String - - # @!method initialize(threshold:, total_amount:) - # Configuration for a single threshold - # - # @param threshold [String] - # - # @param total_amount [String] Total amount for this threshold - end - end - end - - class TieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_package] - required :model_type, const: :tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_package_config - # Configuration for tiered_package pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig] - required :tiered_package_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_package_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_package_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig] Configuration for tiered_package pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage#tiered_package_config - class TieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - # - # @return [Array] - required :tiers, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] } - - # @!method initialize(package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig} - # for more details. - # - # Configuration for tiered_package pricing - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute per_unit - # Price per package - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(per_unit:, tier_lower_bound:) - # Configuration for a single tier with business logic - # - # @param per_unit [String] Price per package - # - # @param tier_lower_bound [String] - end - end - end - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_with_minimum] - required :model_type, const: :tiered_with_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_minimum_config - # Configuration for tiered_with_minimum pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig] - required :tiered_with_minimum_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_with_minimum_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_with_minimum_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig] Configuration for tiered_with_minimum pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_with_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum#tiered_with_minimum_config - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier] } - - # @!attribute hide_zero_amount_tiers - # If true, tiers with an accrued amount of 0 will not be included in the rating. - # - # @return [Boolean, nil] - optional :hide_zero_amount_tiers, Orb::Internal::Type::Boolean - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean - - # @!method initialize(tiers:, hide_zero_amount_tiers: nil, prorate: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig} - # for more details. - # - # Configuration for tiered_with_minimum pricing - # - # @param tiers [Array] Tiered pricing with a minimum amount dependent on the volume tier. Tiers are def - # - # @param hide_zero_amount_tiers [Boolean] If true, tiers with an accrued amount of 0 will not be included in the rating. - # - # @param prorate [Boolean] If true, the unit price will be prorated to the billing period - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # - # @return [String] - required :minimum_amount, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(minimum_amount:, tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param minimum_amount [String] - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - end - - class GroupedTiered < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence } - - # @!attribute grouped_tiered_config - # Configuration for grouped_tiered pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig] - required :grouped_tiered_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_tiered] - required :model_type, const: :grouped_tiered - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_tiered_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_tiered) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence] The cadence to bill for this price on. - # - # @param grouped_tiered_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig] Configuration for grouped_tiered pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_tiered] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered#grouped_tiered_config - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The billable metric property used to group before tiering - # - # @return [String] - required :grouping_key, String - - # @!attribute tiers - # Apply tiered pricing to each segment generated after grouping with the provided - # key - # - # @return [Array] - required :tiers, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] } - - # @!method initialize(grouping_key:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig} - # for more details. - # - # Configuration for grouped_tiered pricing - # - # @param grouping_key [String] The billable metric property used to group before tiering - # - # @param tiers [Array] Apply tiered pricing to each segment generated after grouping with the provided - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_package_with_minimum] - required :model_type, const: :tiered_package_with_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_package_with_minimum_config - # Configuration for tiered_package_with_minimum pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig] - required :tiered_package_with_minimum_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_package_with_minimum_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_package_with_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_package_with_minimum_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig] Configuration for tiered_package_with_minimum pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_package_with_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum#tiered_package_with_minimum_config - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute package_size - # - # @return [Float] - required :package_size, Float - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - end - - # @!method initialize(package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig} - # for more details. - # - # Configuration for tiered_package_with_minimum pricing - # - # @param package_size [Float] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # - # @return [String] - required :minimum_amount, String - - # @!attribute per_unit - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(minimum_amount:, per_unit:, tier_lower_bound:) - # Configuration for a single tier - # - # @param minimum_amount [String] - # @param per_unit [String] - # @param tier_lower_bound [String] - end - end - end - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :package_with_allocation] - required :model_type, const: :package_with_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute package_with_allocation_config - # Configuration for package_with_allocation pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig] - required :package_with_allocation_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, package_with_allocation_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :package_with_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param package_with_allocation_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig] Configuration for package_with_allocation pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :package_with_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation#package_with_allocation_config - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute allocation - # - # @return [String] - required :allocation, String - - # @!attribute package_amount - # - # @return [String] - required :package_amount, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!method initialize(allocation:, package_amount:, package_size:) - # Configuration for package_with_allocation pricing - # - # @param allocation [String] - # @param package_amount [String] - # @param package_size [String] - end - end - - class UnitWithPercent < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :unit_with_percent] - required :model_type, const: :unit_with_percent - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_with_percent_config - # Configuration for unit_with_percent pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig] - required :unit_with_percent_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_with_percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit_with_percent) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param unit_with_percent_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig] Configuration for unit_with_percent pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :unit_with_percent] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent#unit_with_percent_config - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - # @!attribute percent - # What percent, out of 100, of the calculated total to charge - # - # @return [String] - required :percent, String - - # @!attribute unit_amount - # Rate per unit of usage - # - # @return [String] - required :unit_amount, String - - # @!method initialize(percent:, unit_amount:) - # Configuration for unit_with_percent pricing - # - # @param percent [String] What percent, out of 100, of the calculated total to charge - # - # @param unit_amount [String] Rate per unit of usage - end - end - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation] } - - # @!attribute matrix_with_allocation_config - # Configuration for matrix_with_allocation pricing - # - # @return [Orb::Models::MatrixWithAllocationConfig] - required :matrix_with_allocation_config, -> { Orb::MatrixWithAllocationConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix_with_allocation] - required :model_type, const: :matrix_with_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_with_allocation_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_with_allocation_config [Orb::Models::MatrixWithAllocationConfig] Configuration for matrix_with_allocation pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix_with_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :tiered_with_proration] - required :model_type, const: :tiered_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute tiered_with_proration_config - # Configuration for tiered_with_proration pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig] - required :tiered_with_proration_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param tiered_with_proration_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :tiered_with_proration] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration#tiered_with_proration_config - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Tiers for rating based on total usage quantities into the specified tier with - # proration - # - # @return [Array] - required :tiers, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] } - - # @!method initialize(tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig} - # for more details. - # - # Configuration for tiered_with_proration pricing - # - # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # Inclusive tier starting value - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tiered with proration tier - # - # @param tier_lower_bound [String] Inclusive tier starting value - # - # @param unit_amount [String] Amount per unit - end - end - end - - class UnitWithProration < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :unit_with_proration] - required :model_type, const: :unit_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute unit_with_proration_config - # Configuration for unit_with_proration pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig] - required :unit_with_proration_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param unit_with_proration_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig] Configuration for unit_with_proration pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :unit_with_proration] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration#unit_with_proration_config - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Rate per unit of usage - # - # @return [String] - required :unit_amount, String - - # @!method initialize(unit_amount:) - # Configuration for unit_with_proration pricing - # - # @param unit_amount [String] Rate per unit of usage - end - end - - class GroupedAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence } - - # @!attribute grouped_allocation_config - # Configuration for grouped_allocation pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig] - required :grouped_allocation_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_allocation] - required :model_type, const: :grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_allocation_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param grouped_allocation_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig] Configuration for grouped_allocation pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation#grouped_allocation_config - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute allocation - # Usage allocation per group - # - # @return [String] - required :allocation, String - - # @!attribute grouping_key - # How to determine the groups that should each be allocated some quantity - # - # @return [String] - required :grouping_key, String - - # @!attribute overage_unit_rate - # Unit rate for post-allocation - # - # @return [String] - required :overage_unit_rate, String - - # @!method initialize(allocation:, grouping_key:, overage_unit_rate:) - # Configuration for grouped_allocation pricing - # - # @param allocation [String] Usage allocation per group - # - # @param grouping_key [String] How to determine the groups that should each be allocated some quantity - # - # @param overage_unit_rate [String] Unit rate for post-allocation - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class BulkWithProration < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_proration_config - # Configuration for bulk_with_proration pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig] - required :bulk_with_proration_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :bulk_with_proration] - required :model_type, const: :bulk_with_proration - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(bulk_with_proration_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_proration) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration} - # for more details. - # - # @param bulk_with_proration_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig] Configuration for bulk_with_proration pricing - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :bulk_with_proration] The pricing model type - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration#bulk_with_proration_config - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - # @!attribute tiers - # Bulk tiers for rating based on total usage volume - # - # @return [Array] - required :tiers, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] } - - # @!method initialize(tiers:) - # Configuration for bulk_with_proration pricing - # - # @param tiers [Array] Bulk tiers for rating based on total usage volume - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Cost per unit - # - # @return [String] - required :unit_amount, String - - # @!attribute tier_lower_bound - # The lower bound for this tier - # - # @return [String, nil] - optional :tier_lower_bound, String, nil?: true - - # @!method initialize(unit_amount:, tier_lower_bound: nil) - # Configuration for a single bulk pricing tier with proration - # - # @param unit_amount [String] Cost per unit - # - # @param tier_lower_bound [String, nil] The lower bound for this tier - end - end - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence } - - # @!attribute grouped_with_prorated_minimum_config - # Configuration for grouped_with_prorated_minimum pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig] - required :grouped_with_prorated_minimum_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_prorated_minimum] - required :model_type, const: :grouped_with_prorated_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_prorated_minimum_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_prorated_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_prorated_minimum_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig] Configuration for grouped_with_prorated_minimum pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_prorated_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum#grouped_with_prorated_minimum_config - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # How to determine the groups that should each have a minimum - # - # @return [String] - required :grouping_key, String - - # @!attribute minimum - # The minimum amount to charge per group - # - # @return [String] - required :minimum, String - - # @!attribute unit_rate - # The amount to charge per unit - # - # @return [String] - required :unit_rate, String - - # @!method initialize(grouping_key:, minimum:, unit_rate:) - # Configuration for grouped_with_prorated_minimum pricing - # - # @param grouping_key [String] How to determine the groups that should each have a minimum - # - # @param minimum [String] The minimum amount to charge per group - # - # @param unit_rate [String] The amount to charge per unit - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence } - - # @!attribute grouped_with_metered_minimum_config - # Configuration for grouped_with_metered_minimum pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig] - required :grouped_with_metered_minimum_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_metered_minimum] - required :model_type, const: :grouped_with_metered_minimum - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_metered_minimum_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_metered_minimum) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_metered_minimum_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig] Configuration for grouped_with_metered_minimum pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_metered_minimum] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum#grouped_with_metered_minimum_config - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - # - # @return [String] - required :grouping_key, String - - # @!attribute minimum_unit_amount - # The minimum amount to charge per group per unit - # - # @return [String] - required :minimum_unit_amount, String - - # @!attribute pricing_key - # Used to determine the unit rate - # - # @return [String] - required :pricing_key, String - - # @!attribute scaling_factors - # Scale the unit rates by the scaling factor. - # - # @return [Array] - required :scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ] - end - - # @!attribute scaling_key - # Used to determine the unit rate scaling factor - # - # @return [String] - required :scaling_key, String - - # @!attribute unit_amounts - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - # - # @return [Array] - required :unit_amounts, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - end - - # @!method initialize(grouping_key:, minimum_unit_amount:, pricing_key:, scaling_factors:, scaling_key:, unit_amounts:) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig} - # for more details. - # - # Configuration for grouped_with_metered_minimum pricing - # - # @param grouping_key [String] Used to partition the usage into groups. The minimum amount is applied to each g - # - # @param minimum_unit_amount [String] The minimum amount to charge per group per unit - # - # @param pricing_key [String] Used to determine the unit rate - # - # @param scaling_factors [Array] Scale the unit rates by the scaling factor. - # - # @param scaling_key [String] Used to determine the unit rate scaling factor - # - # @param unit_amounts [Array] Apply per unit pricing to each pricing value. The minimum amount is applied any - - class ScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute scaling_value - # - # @return [String] - required :scaling_value, String - - # @!method initialize(scaling_factor:, scaling_value:) - # Configuration for a scaling factor - # - # @param scaling_factor [String] - # @param scaling_value [String] - end - - class UnitAmount < Orb::Internal::Type::BaseModel - # @!attribute pricing_value - # - # @return [String] - required :pricing_value, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(pricing_value:, unit_amount:) - # Configuration for a unit amount - # - # @param pricing_value [String] - # - # @param unit_amount [String] Per unit amount - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence } - - # @!attribute grouped_with_min_max_thresholds_config - # Configuration for grouped_with_min_max_thresholds pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] - required :grouped_with_min_max_thresholds_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_with_min_max_thresholds] - required :model_type, const: :grouped_with_min_max_thresholds - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_min_max_thresholds_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before applying thresholds - # - # @return [String] - required :grouping_key, String - - # @!attribute maximum_charge - # The maximum amount to charge each group - # - # @return [String] - required :maximum_charge, String - - # @!attribute minimum_charge - # The minimum amount to charge each group, regardless of usage - # - # @return [String] - required :minimum_charge, String - - # @!attribute per_unit_rate - # The base price charged per group - # - # @return [String] - required :per_unit_rate, String - - # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) - # Configuration for grouped_with_min_max_thresholds pricing - # - # @param grouping_key [String] The event property used to group before applying thresholds - # - # @param maximum_charge [String] The maximum amount to charge each group - # - # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage - # - # @param per_unit_rate [String] The base price charged per group - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation] } - - # @!attribute matrix_with_display_name_config - # Configuration for matrix_with_display_name pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig] - required :matrix_with_display_name_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :matrix_with_display_name] - required :model_type, const: :matrix_with_display_name - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, matrix_with_display_name_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_display_name) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param matrix_with_display_name_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig] Configuration for matrix_with_display_name pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :matrix_with_display_name] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName#matrix_with_display_name_config - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - # @!attribute dimension - # Used to determine the unit rate - # - # @return [String] - required :dimension, String - - # @!attribute unit_amounts - # Apply per unit pricing to each dimension value - # - # @return [Array] - required :unit_amounts, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - end - - # @!method initialize(dimension:, unit_amounts:) - # Configuration for matrix_with_display_name pricing - # - # @param dimension [String] Used to determine the unit rate - # - # @param unit_amounts [Array] Apply per unit pricing to each dimension value - - class UnitAmount < Orb::Internal::Type::BaseModel - # @!attribute dimension_value - # The dimension value - # - # @return [String] - required :dimension_value, String - - # @!attribute display_name - # Display name for this dimension value - # - # @return [String] - required :display_name, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(dimension_value:, display_name:, unit_amount:) - # Configuration for a unit amount item - # - # @param dimension_value [String] The dimension value - # - # @param display_name [String] Display name for this dimension value - # - # @param unit_amount [String] Per unit amount - end - end - end - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence } - - # @!attribute grouped_tiered_package_config - # Configuration for grouped_tiered_package pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig] - required :grouped_tiered_package_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_tiered_package] - required :model_type, const: :grouped_tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, grouped_tiered_package_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence] The cadence to bill for this price on. - # - # @param grouped_tiered_package_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig] Configuration for grouped_tiered_package pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :grouped_tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage#grouped_tiered_package_config - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before tiering - # - # @return [String] - required :grouping_key, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - end - - # @!method initialize(grouping_key:, package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig} - # for more details. - # - # Configuration for grouped_tiered_package pricing - # - # @param grouping_key [String] The event property used to group before tiering - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute per_unit - # Per package - # - # @return [String] - required :per_unit, String - - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!method initialize(per_unit:, tier_lower_bound:) - # Configuration for a single tier - # - # @param per_unit [String] Per package - # - # @param tier_lower_bound [String] - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation] } - - # @!attribute max_group_tiered_package_config - # Configuration for max_group_tiered_package pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig] - required :max_group_tiered_package_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :max_group_tiered_package] - required :model_type, const: :max_group_tiered_package - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, max_group_tiered_package_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :max_group_tiered_package) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param max_group_tiered_package_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig] Configuration for max_group_tiered_package pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :max_group_tiered_package] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage#max_group_tiered_package_config - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # The event property used to group before tiering the group with the highest value - # - # @return [String] - required :grouping_key, String - - # @!attribute package_size - # - # @return [String] - required :package_size, String - - # @!attribute tiers - # Apply tiered pricing to the largest group after grouping with the provided key. - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - end - - # @!method initialize(grouping_key:, package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig} - # for more details. - # - # Configuration for max_group_tiered_package pricing - # - # @param grouping_key [String] The event property used to group before tiering the group with the highest value - # - # @param package_size [String] - # - # @param tiers [Array] Apply tiered pricing to the largest group after grouping with the provided key. - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount - end - end - end - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :scalable_matrix_with_unit_pricing] - required :model_type, const: :scalable_matrix_with_unit_pricing - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute scalable_matrix_with_unit_pricing_config - # Configuration for scalable_matrix_with_unit_pricing pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig] - required :scalable_matrix_with_unit_pricing_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, scalable_matrix_with_unit_pricing_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :scalable_matrix_with_unit_pricing) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param scalable_matrix_with_unit_pricing_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig] Configuration for scalable_matrix_with_unit_pricing pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :scalable_matrix_with_unit_pricing] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing#scalable_matrix_with_unit_pricing_config - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - # @!attribute first_dimension - # Used to determine the unit rate - # - # @return [String] - required :first_dimension, String - - # @!attribute matrix_scaling_factors - # Apply a scaling factor to each dimension - # - # @return [Array] - required :matrix_scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ] - end - - # @!attribute unit_price - # The final unit price to rate against the output of the matrix - # - # @return [String] - required :unit_price, String - - # @!attribute grouping_key - # The property used to group this price - # - # @return [String, nil] - optional :grouping_key, String, nil?: true - - # @!attribute prorate - # If true, the unit price will be prorated to the billing period - # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute second_dimension - # Used to determine the unit rate (optional) - # - # @return [String, nil] - optional :second_dimension, String, nil?: true - - # @!method initialize(first_dimension:, matrix_scaling_factors:, unit_price:, grouping_key: nil, prorate: nil, second_dimension: nil) - # Configuration for scalable_matrix_with_unit_pricing pricing - # - # @param first_dimension [String] Used to determine the unit rate - # - # @param matrix_scaling_factors [Array] Apply a scaling factor to each dimension - # - # @param unit_price [String] The final unit price to rate against the output of the matrix - # - # @param grouping_key [String, nil] The property used to group this price - # - # @param prorate [Boolean, nil] If true, the unit price will be prorated to the billing period - # - # @param second_dimension [String, nil] Used to determine the unit rate (optional) - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute first_dimension_value - # - # @return [String] - required :first_dimension_value, String - - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute second_dimension_value - # - # @return [String, nil] - optional :second_dimension_value, String, nil?: true - - # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil) - # Configuration for a single matrix scaling factor - # - # @param first_dimension_value [String] - # @param scaling_factor [String] - # @param second_dimension_value [String, nil] - end - end - end - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :scalable_matrix_with_tiered_pricing] - required :model_type, const: :scalable_matrix_with_tiered_pricing - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute scalable_matrix_with_tiered_pricing_config - # Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig] - required :scalable_matrix_with_tiered_pricing_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, scalable_matrix_with_tiered_pricing_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :scalable_matrix_with_tiered_pricing) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param scalable_matrix_with_tiered_pricing_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig] Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :scalable_matrix_with_tiered_pricing] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing#scalable_matrix_with_tiered_pricing_config - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - # @!attribute first_dimension - # Used for the scalable matrix first dimension - # - # @return [String] - required :first_dimension, String - - # @!attribute matrix_scaling_factors - # Apply a scaling factor to each dimension - # - # @return [Array] - required :matrix_scaling_factors, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ] - end - - # @!attribute tiers - # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ] - end - - # @!attribute second_dimension - # Used for the scalable matrix second dimension (optional) - # - # @return [String, nil] - optional :second_dimension, String, nil?: true - - # @!method initialize(first_dimension:, matrix_scaling_factors:, tiers:, second_dimension: nil) - # Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @param first_dimension [String] Used for the scalable matrix first dimension - # - # @param matrix_scaling_factors [Array] Apply a scaling factor to each dimension - # - # @param tiers [Array] - # - # @param second_dimension [String, nil] Used for the scalable matrix second dimension (optional) - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute first_dimension_value - # - # @return [String] - required :first_dimension_value, String - - # @!attribute scaling_factor - # - # @return [String] - required :scaling_factor, String - - # @!attribute second_dimension_value - # - # @return [String, nil] - optional :second_dimension_value, String, nil?: true - - # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil) - # Configuration for a single matrix scaling factor - # - # @param first_dimension_value [String] - # @param scaling_factor [String] - # @param second_dimension_value [String, nil] - end - - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier entry with business logic - # - # @param tier_lower_bound [String] - # @param unit_amount [String] - end - end - end - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence } - - # @!attribute cumulative_grouped_bulk_config - # Configuration for cumulative_grouped_bulk pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig] - required :cumulative_grouped_bulk_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :cumulative_grouped_bulk] - required :model_type, const: :cumulative_grouped_bulk - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, cumulative_grouped_bulk_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_bulk) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_bulk_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig] Configuration for cumulative_grouped_bulk pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :cumulative_grouped_bulk] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk#cumulative_grouped_bulk_config - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - # @!attribute dimension_values - # Each tier lower bound must have the same group of values. - # - # @return [Array] - required :dimension_values, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ] - end - - # @!attribute group - # - # @return [String] - required :group, String - - # @!method initialize(dimension_values:, group:) - # Configuration for cumulative_grouped_bulk pricing - # - # @param dimension_values [Array] Each tier lower bound must have the same group of values. - # - # @param group [String] - - class DimensionValue < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # Grouping key value - # - # @return [String] - required :grouping_key, String - - # @!attribute tier_lower_bound - # Tier lower bound - # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Unit amount for this combination - # - # @return [String] - required :unit_amount, String - - # @!method initialize(grouping_key:, tier_lower_bound:, unit_amount:) - # Configuration for a dimension value entry - # - # @param grouping_key [String] Grouping key value - # - # @param tier_lower_bound [String] Tier lower bound - # - # @param unit_amount [String] Unit amount for this combination - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence } - - # @!attribute cumulative_grouped_allocation_config - # Configuration for cumulative_grouped_allocation pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] - required :cumulative_grouped_allocation_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :cumulative_grouped_allocation] - required :model_type, const: :cumulative_grouped_allocation - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, cumulative_grouped_allocation_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_allocation) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_allocation_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation#cumulative_grouped_allocation_config - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute cumulative_allocation - # The overall allocation across all groups - # - # @return [String] - required :cumulative_allocation, String - - # @!attribute group_allocation - # The allocation per individual group - # - # @return [String] - required :group_allocation, String - - # @!attribute grouping_key - # The event property used to group usage before applying allocations - # - # @return [String] - required :grouping_key, String - - # @!attribute unit_amount - # The amount to charge for each unit outside of the allocation - # - # @return [String] - required :unit_amount, String - - # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:) - # Configuration for cumulative_grouped_allocation pricing - # - # @param cumulative_allocation [String] The overall allocation across all groups - # - # @param group_allocation [String] The allocation per individual group - # - # @param grouping_key [String] The event property used to group usage before applying allocations - # - # @param unit_amount [String] The amount to charge for each unit outside of the allocation - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - class MinimumComposite < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence] - required :cadence, - enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::LicenseAllocation] } - - # @!attribute minimum_composite_config - # Configuration for minimum_composite pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig] - required :minimum_composite_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :minimum_composite] - required :model_type, const: :minimum_composite - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, minimum_composite_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :minimum_composite) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite} - # for more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param minimum_composite_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig] Configuration for minimum_composite pricing - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :minimum_composite] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite#minimum_composite_config - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - # @!attribute minimum_amount - # The minimum amount to apply - # - # @return [String] - required :minimum_amount, String - - # @!attribute prorated - # If true, subtotals from this price are prorated based on the service period - # - # @return [Boolean, nil] - optional :prorated, Orb::Internal::Type::Boolean - - # @!method initialize(minimum_amount:, prorated: nil) - # Configuration for minimum_composite pricing - # - # @param minimum_amount [String] The minimum amount to apply - # - # @param prorated [Boolean] If true, subtotals from this price are prorated based on the service period - end - end - - class Percent < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence] - required :cadence, enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :percent] - required :model_type, const: :percent - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute percent_config - # Configuration for percent pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::PercentConfig] - required :percent_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::PercentConfig } - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, item_id:, license_allocations:, name:, percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :percent) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent} for more - # details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param percent_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::PercentConfig] Configuration for percent pricing - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :percent] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent#percent_config - class PercentConfig < Orb::Internal::Type::BaseModel - # @!attribute percent - # What percent of the component subtotals to charge - # - # @return [Float] - required :percent, Float - - # @!method initialize(percent:) - # Configuration for percent pricing - # - # @param percent [Float] What percent of the component subtotals to charge - end - end - - class EventOutput < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence] - required :cadence, enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence } - - # @!attribute event_output_config - # Configuration for event_output pricing - # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig] - required :event_output_config, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig } - - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String - - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::LicenseAllocation] } - - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :event_output] - required :model_type, const: :event_output - - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String - - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for the rate of the price currency to the invoicing currency. - # - # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] - optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::ConversionRateConfig - }, - nil?: true - - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute dimensional_price_configuration - # For dimensional price: specifies a price group and dimension values - # - # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] - optional :dimensional_price_configuration, - -> { - Orb::NewDimensionalPriceConfiguration - }, - nil?: true - - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true - - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true - - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true - - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true - - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true - - # @!method initialize(cadence:, event_output_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :event_output) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput} for - # more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence] The cadence to bill for this price on. - # - # @param event_output_config [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig] Configuration for event_output pricing - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # - # @param name [String] The name of the price. - # - # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed - # - # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments - # - # @param model_type [Symbol, :event_output] The pricing model type - - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput#event_output_config - class EventOutputConfig < Orb::Internal::Type::BaseModel - # @!attribute unit_rating_key - # The key in the event data to extract the unit rate from. - # - # @return [String] - required :unit_rating_key, String - - # @!attribute default_unit_rate - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - # - # @return [String, nil] - optional :default_unit_rate, String, nil?: true - - # @!attribute grouping_key - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - # - # @return [String, nil] - optional :grouping_key, String, nil?: true - - # @!method initialize(unit_rating_key:, default_unit_rate: nil, grouping_key: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig} - # for more details. - # - # Configuration for event_output pricing - # - # @param unit_rating_key [String] The key in the event data to extract the unit rate from. - # - # @param default_unit_rate [String, nil] If provided, this amount will be used as the unit rate when an event does not ha - # - # @param grouping_key [String, nil] An optional key in the event data to group by (e.g., event ID). All events will - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end - - # @!method self.variants - # @return [Array(Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput)] - end - - # New plan price request body params. - # - # @see Orb::Models::PlanCreateParams::Price#price - 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) + # @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 # - # @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 + # @return [String] + required :grouping_key, String - # The cadence to bill for this price on. - # - # @see Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters#cadence - module Cadence - extend Orb::Internal::Type::Enum + # @!attribute maximum_charge + # The maximum amount to charge each group + # + # @return [String] + required :maximum_charge, String - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom + # @!attribute minimum_charge + # The minimum amount to charge each group, regardless of usage + # + # @return [String] + required :minimum_charge, String - # @!method self.values - # @return [Array] + # @!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::PlanCreateParams::Price::Price::TieredWithProration::Cadence] - required :cadence, enum: -> { Orb::PlanCreateParams::Price::Price::TieredWithProration::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. @@ -8976,8 +1210,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. @@ -8985,13 +1219,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::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. @@ -9025,7 +1252,7 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::PlanCreateParams::Price::Price::TieredWithProration::ConversionRateConfig + Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::ConversionRateConfig }, nil?: true @@ -9093,19 +1320,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::PlanCreateParams::Price::Price::TieredWithProration} for more - # details. + # {Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation} for + # more details. # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::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 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 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 @@ -9134,11 +1361,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::PlanCreateParams::Price::Price::TieredWithProration#cadence + # @see Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation#cadence module Cadence extend Orb::Internal::Type::Enum @@ -9153,61 +1380,58 @@ module Cadence # @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 + # @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 [Array] - required :tiers, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier] } + # @return [String] + required :cumulative_allocation, String - # @!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 + # @!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::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence] - required :cadence, enum: -> { Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence } + # @return [Symbol, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence] + required :cadence, enum: -> { Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] - required :grouped_with_min_max_thresholds_config, - -> { Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } + # @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. @@ -9218,8 +1442,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. @@ -9260,7 +1484,7 @@ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::ConversionRateConfig + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::ConversionRateConfig }, nil?: true @@ -9328,14 +1552,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::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds} for - # more details. + # {Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance} for more + # details. # - # @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::Price::DailyCreditAllowance::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 daily_credit_allowance_config [Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing # # @param item_id [String] The id of the item the price will be associated with. # @@ -9369,11 +1593,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::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds#cadence + # @see Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -9388,58 +1612,94 @@ module Cadence # @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 + # @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 :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, + -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] } + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. # - # @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::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 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::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 } + # @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. @@ -9447,11 +1707,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::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::PlanCreateParams::Price::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. @@ -9492,7 +1759,7 @@ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::ConversionRateConfig + Orb::PlanCreateParams::Price::Price::MeteredAllowance::ConversionRateConfig }, nil?: true @@ -9560,17 +1827,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::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. + # {Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance} for more + # details. # - # @param cumulative_grouped_allocation_config [Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing + # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # + # @param metered_allowance_config [Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # # @param name [String] The name of the price. # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b @@ -9601,11 +1868,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::PlanCreateParams::Price::Price::CumulativeGroupedAllocation#cadence + # @see Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -9620,42 +1887,67 @@ module Cadence # @return [Array] end - # @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 + # @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 :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::PlanCreateParams::Price::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 @@ -10091,7 +2383,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput)] + # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput)] end end diff --git a/lib/orb/models/plan_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..bbc5a731 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..c2816b1e 100644 --- a/lib/orb/models/price.rb +++ b/lib/orb/models/price.rb @@ -73,6 +73,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 } @@ -11470,6 +11474,886 @@ class LicenseType < Orb::Internal::Type::BaseModel end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute billable_metric + # + # @return [Orb::Models::BillableMetricTiny, nil] + required :billable_metric, -> { Orb::BillableMetricTiny }, nil?: true + + # @!attribute billing_cycle_configuration + # + # @return [Orb::Models::BillingCycleConfiguration] + required :billing_cycle_configuration, -> { Orb::BillingCycleConfiguration } + + # @!attribute billing_mode + # + # @return [Symbol, Orb::Models::Price::DailyCreditAllowance::BillingMode] + required :billing_mode, enum: -> { Orb::Price::DailyCreditAllowance::BillingMode } + + # @!attribute cadence + # + # @return [Symbol, Orb::Models::Price::DailyCreditAllowance::Cadence] + required :cadence, enum: -> { Orb::Price::DailyCreditAllowance::Cadence } + + # @!attribute composite_price_filters + # + # @return [Array, nil] + required :composite_price_filters, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::DailyCreditAllowance::CompositePriceFilter] }, + nil?: true + + # @!attribute conversion_rate + # + # @return [Float, nil] + required :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + required :conversion_rate_config, + union: -> { Orb::Price::DailyCreditAllowance::ConversionRateConfig }, + nil?: true + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_allocation + # + # @return [Orb::Models::Allocation, nil] + required :credit_allocation, -> { Orb::Allocation }, nil?: true + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing + # + # @return [Orb::Models::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } + + # @!attribute discount + # @deprecated + # + # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, nil] + required :discount, union: -> { Orb::Discount }, nil?: true + + # @!attribute external_price_id + # + # @return [String, nil] + required :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # + # @return [Float, nil] + required :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # + # @return [String, nil] + required :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # + # @return [Orb::Models::BillingCycleConfiguration, nil] + required :invoicing_cycle_configuration, -> { Orb::BillingCycleConfiguration }, nil?: true + + # @!attribute item + # A minimal representation of an Item containing only the essential identifying + # information. + # + # @return [Orb::Models::ItemSlim] + required :item, -> { Orb::ItemSlim } + + # @!attribute maximum + # @deprecated + # + # @return [Orb::Models::Maximum, nil] + required :maximum, -> { Orb::Maximum }, nil?: true + + # @!attribute maximum_amount + # @deprecated + # + # @return [String, nil] + required :maximum_amount, String, nil?: true + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::Internal::Type::HashOf[String] + + # @!attribute minimum + # @deprecated + # + # @return [Orb::Models::Minimum, nil] + required :minimum, -> { Orb::Minimum }, nil?: true + + # @!attribute minimum_amount + # @deprecated + # + # @return [String, nil] + required :minimum_amount, String, nil?: true + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute plan_phase_order + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute price_type + # + # @return [Symbol, Orb::Models::Price::DailyCreditAllowance::PriceType] + required :price_type, enum: -> { Orb::Price::DailyCreditAllowance::PriceType } + + # @!attribute replaces_price_id + # The price id this price replaces. This price will take the place of the replaced + # price in plan version migrations. + # + # @return [String, nil] + required :replaces_price_id, String, nil?: true + + # @!attribute dimensional_price_configuration + # + # @return [Orb::Models::DimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, -> { Orb::DimensionalPriceConfiguration }, nil?: true + + # @!attribute license_type + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + # + # @return [Orb::Models::Price::DailyCreditAllowance::LicenseType, nil] + optional :license_type, -> { Orb::Price::DailyCreditAllowance::LicenseType }, nil?: true + + # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, daily_credit_allowance_config:, discount:, external_price_id:, fixed_price_quantity:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :daily_credit_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::DailyCreditAllowance} for more details. + # + # @param id [String] + # + # @param billable_metric [Orb::Models::BillableMetricTiny, nil] + # + # @param billing_cycle_configuration [Orb::Models::BillingCycleConfiguration] + # + # @param billing_mode [Symbol, Orb::Models::Price::DailyCreditAllowance::BillingMode] + # + # @param cadence [Symbol, Orb::Models::Price::DailyCreditAllowance::Cadence] + # + # @param composite_price_filters [Array, nil] + # + # @param conversion_rate [Float, nil] + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + # + # @param created_at [Time] + # + # @param credit_allocation [Orb::Models::Allocation, nil] + # + # @param currency [String] + # + # @param daily_credit_allowance_config [Orb::Models::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing + # + # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, nil] + # + # @param external_price_id [String, nil] + # + # @param fixed_price_quantity [Float, nil] + # + # @param invoice_grouping_key [String, nil] + # + # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfiguration, nil] + # + # @param item [Orb::Models::ItemSlim] A minimal representation of an Item containing only the essential identifying in + # + # @param maximum [Orb::Models::Maximum, nil] + # + # @param maximum_amount [String, nil] + # + # @param metadata [Hash{Symbol=>String}] User specified key-value pairs for the resource. If not present, this defaults t + # + # @param minimum [Orb::Models::Minimum, nil] + # + # @param minimum_amount [String, nil] + # + # @param name [String] + # + # @param plan_phase_order [Integer, nil] + # + # @param price_type [Symbol, Orb::Models::Price::DailyCreditAllowance::PriceType] + # + # @param replaces_price_id [String, nil] The price id this price replaces. This price will take the place of the replaced + # + # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfiguration, nil] + # + # @param license_type [Orb::Models::Price::DailyCreditAllowance::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us + # + # @param model_type [Symbol, :daily_credit_allowance] The pricing model type + + # @see Orb::Models::Price::DailyCreditAllowance#billing_mode + module BillingMode + extend Orb::Internal::Type::Enum + + IN_ADVANCE = :in_advance + IN_ARREAR = :in_arrear + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Price::DailyCreditAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + class CompositePriceFilter < Orb::Internal::Type::BaseModel + # @!attribute field + # The property of the price to filter on. + # + # @return [Symbol, Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::Field] + required :field, enum: -> { Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field } + + # @!attribute operator + # Should prices that match the filter be included or excluded. + # + # @return [Symbol, Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::Operator] + required :operator, enum: -> { Orb::Price::DailyCreditAllowance::CompositePriceFilter::Operator } + + # @!attribute values + # The IDs or values that match this filter. + # + # @return [Array] + required :values, Orb::Internal::Type::ArrayOf[String] + + # @!method initialize(field:, operator:, values:) + # @param field [Symbol, Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::Field] The property of the price to filter on. + # + # @param operator [Symbol, Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. + # + # @param values [Array] The IDs or values that match this filter. + + # The property of the price to filter on. + # + # @see Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter#field + module Field + extend Orb::Internal::Type::Enum + + PRICE_ID = :price_id + ITEM_ID = :item_id + PRICE_TYPE = :price_type + CURRENCY = :currency + PRICING_UNIT_ID = :pricing_unit_id + + # @!method self.values + # @return [Array] + end + + # Should prices that match the filter be included or excluded. + # + # @see Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter#operator + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES = :includes + EXCLUDES = :excludes + + # @!method self.values + # @return [Array] + end + end + + # @see Orb::Models::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @return [String] + required :daily_allowance, String + + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + # + # @return [String] + required :event_day_property, String + + # @!attribute matrix_values + # Per-dimension credit rates + # + # @return [Array] + required :matrix_values, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] } + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} for more + # details. + # + # Configuration for daily_credit_allowance pricing + # + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end + end + + # @see Orb::Models::Price::DailyCreditAllowance#price_type + module PriceType + extend Orb::Internal::Type::Enum + + USAGE_PRICE = :usage_price + FIXED_PRICE = :fixed_price + COMPOSITE_PRICE = :composite_price + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Price::DailyCreditAllowance#license_type + class LicenseType < Orb::Internal::Type::BaseModel + # @!attribute id + # The Orb-assigned unique identifier for the license type. + # + # @return [String] + required :id, String + + # @!attribute grouping_key + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + # + # @return [String] + required :grouping_key, String + + # @!attribute name + # The name of the license type. + # + # @return [String] + required :name, String + + # @!method initialize(id:, grouping_key:, name:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::DailyCreditAllowance::LicenseType} for more details. + # + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + # + # @param id [String] The Orb-assigned unique identifier for the license type. + # + # @param grouping_key [String] The key used for grouping licenses of this type. This is typically a user identi + # + # @param name [String] The name of the license type. + end + end + + class MeteredAllowance < Orb::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute billable_metric + # + # @return [Orb::Models::BillableMetricTiny, nil] + required :billable_metric, -> { Orb::BillableMetricTiny }, nil?: true + + # @!attribute billing_cycle_configuration + # + # @return [Orb::Models::BillingCycleConfiguration] + required :billing_cycle_configuration, -> { Orb::BillingCycleConfiguration } + + # @!attribute billing_mode + # + # @return [Symbol, Orb::Models::Price::MeteredAllowance::BillingMode] + required :billing_mode, enum: -> { Orb::Price::MeteredAllowance::BillingMode } + + # @!attribute cadence + # + # @return [Symbol, Orb::Models::Price::MeteredAllowance::Cadence] + required :cadence, enum: -> { Orb::Price::MeteredAllowance::Cadence } + + # @!attribute composite_price_filters + # + # @return [Array, nil] + required :composite_price_filters, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::MeteredAllowance::CompositePriceFilter] }, + nil?: true + + # @!attribute conversion_rate + # + # @return [Float, nil] + required :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + required :conversion_rate_config, + union: -> { Orb::Price::MeteredAllowance::ConversionRateConfig }, + nil?: true + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_allocation + # + # @return [Orb::Models::Allocation, nil] + required :credit_allocation, -> { Orb::Allocation }, nil?: true + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute discount + # @deprecated + # + # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, nil] + required :discount, union: -> { Orb::Discount }, nil?: true + + # @!attribute external_price_id + # + # @return [String, nil] + required :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # + # @return [Float, nil] + required :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # + # @return [String, nil] + required :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # + # @return [Orb::Models::BillingCycleConfiguration, nil] + required :invoicing_cycle_configuration, -> { Orb::BillingCycleConfiguration }, nil?: true + + # @!attribute item + # A minimal representation of an Item containing only the essential identifying + # information. + # + # @return [Orb::Models::ItemSlim] + required :item, -> { Orb::ItemSlim } + + # @!attribute maximum + # @deprecated + # + # @return [Orb::Models::Maximum, nil] + required :maximum, -> { Orb::Maximum }, nil?: true + + # @!attribute maximum_amount + # @deprecated + # + # @return [String, nil] + required :maximum_amount, String, nil?: true + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::Internal::Type::HashOf[String] + + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, -> { Orb::Price::MeteredAllowance::MeteredAllowanceConfig } + + # @!attribute minimum + # @deprecated + # + # @return [Orb::Models::Minimum, nil] + required :minimum, -> { Orb::Minimum }, nil?: true + + # @!attribute minimum_amount + # @deprecated + # + # @return [String, nil] + required :minimum_amount, String, nil?: true + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute plan_phase_order + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute price_type + # + # @return [Symbol, Orb::Models::Price::MeteredAllowance::PriceType] + required :price_type, enum: -> { Orb::Price::MeteredAllowance::PriceType } + + # @!attribute replaces_price_id + # The price id this price replaces. This price will take the place of the replaced + # price in plan version migrations. + # + # @return [String, nil] + required :replaces_price_id, String, nil?: true + + # @!attribute dimensional_price_configuration + # + # @return [Orb::Models::DimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, -> { Orb::DimensionalPriceConfiguration }, nil?: true + + # @!attribute license_type + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + # + # @return [Orb::Models::Price::MeteredAllowance::LicenseType, nil] + optional :license_type, -> { Orb::Price::MeteredAllowance::LicenseType }, nil?: true + + # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, metered_allowance_config:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :metered_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::MeteredAllowance} for more details. + # + # @param id [String] + # + # @param billable_metric [Orb::Models::BillableMetricTiny, nil] + # + # @param billing_cycle_configuration [Orb::Models::BillingCycleConfiguration] + # + # @param billing_mode [Symbol, Orb::Models::Price::MeteredAllowance::BillingMode] + # + # @param cadence [Symbol, Orb::Models::Price::MeteredAllowance::Cadence] + # + # @param composite_price_filters [Array, nil] + # + # @param conversion_rate [Float, nil] + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + # + # @param created_at [Time] + # + # @param credit_allocation [Orb::Models::Allocation, nil] + # + # @param currency [String] + # + # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, nil] + # + # @param external_price_id [String, nil] + # + # @param fixed_price_quantity [Float, nil] + # + # @param invoice_grouping_key [String, nil] + # + # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfiguration, nil] + # + # @param item [Orb::Models::ItemSlim] A minimal representation of an Item containing only the essential identifying in + # + # @param maximum [Orb::Models::Maximum, nil] + # + # @param maximum_amount [String, nil] + # + # @param metadata [Hash{Symbol=>String}] User specified key-value pairs for the resource. If not present, this defaults t + # + # @param metered_allowance_config [Orb::Models::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # + # @param minimum [Orb::Models::Minimum, nil] + # + # @param minimum_amount [String, nil] + # + # @param name [String] + # + # @param plan_phase_order [Integer, nil] + # + # @param price_type [Symbol, Orb::Models::Price::MeteredAllowance::PriceType] + # + # @param replaces_price_id [String, nil] The price id this price replaces. This price will take the place of the replaced + # + # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfiguration, nil] + # + # @param license_type [Orb::Models::Price::MeteredAllowance::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us + # + # @param model_type [Symbol, :metered_allowance] The pricing model type + + # @see Orb::Models::Price::MeteredAllowance#billing_mode + module BillingMode + extend Orb::Internal::Type::Enum + + IN_ADVANCE = :in_advance + IN_ARREAR = :in_arrear + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Price::MeteredAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + class CompositePriceFilter < Orb::Internal::Type::BaseModel + # @!attribute field + # The property of the price to filter on. + # + # @return [Symbol, Orb::Models::Price::MeteredAllowance::CompositePriceFilter::Field] + required :field, enum: -> { Orb::Price::MeteredAllowance::CompositePriceFilter::Field } + + # @!attribute operator + # Should prices that match the filter be included or excluded. + # + # @return [Symbol, Orb::Models::Price::MeteredAllowance::CompositePriceFilter::Operator] + required :operator, enum: -> { Orb::Price::MeteredAllowance::CompositePriceFilter::Operator } + + # @!attribute values + # The IDs or values that match this filter. + # + # @return [Array] + required :values, Orb::Internal::Type::ArrayOf[String] + + # @!method initialize(field:, operator:, values:) + # @param field [Symbol, Orb::Models::Price::MeteredAllowance::CompositePriceFilter::Field] The property of the price to filter on. + # + # @param operator [Symbol, Orb::Models::Price::MeteredAllowance::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. + # + # @param values [Array] The IDs or values that match this filter. + + # The property of the price to filter on. + # + # @see Orb::Models::Price::MeteredAllowance::CompositePriceFilter#field + module Field + extend Orb::Internal::Type::Enum + + PRICE_ID = :price_id + ITEM_ID = :item_id + PRICE_TYPE = :price_type + CURRENCY = :currency + PRICING_UNIT_ID = :pricing_unit_id + + # @!method self.values + # @return [Array] + end + + # Should prices that match the filter be included or excluded. + # + # @see Orb::Models::Price::MeteredAllowance::CompositePriceFilter#operator + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES = :includes + EXCLUDES = :excludes + + # @!method self.values + # @return [Array] + end + end + + # @see Orb::Models::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + # + # @return [String] + required :allowance_grouping_value, String + + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + # + # @return [String] + required :consumption_grouping_value, String + + # @!attribute grouping_key + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + # + # @return [String] + required :grouping_key, String + + # @!attribute unit_amount + # Per-unit price applied to gross consumption and to the allowance credit. + # + # @return [String] + required :unit_amount, String + + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @return [String, nil] + optional :allowance_display_name, String + + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + # + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::MeteredAllowance::MeteredAllowanceConfig} for more details. + # + # Configuration for metered_allowance pricing + # + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p + # + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + end + + # @see Orb::Models::Price::MeteredAllowance#price_type + module PriceType + extend Orb::Internal::Type::Enum + + USAGE_PRICE = :usage_price + FIXED_PRICE = :fixed_price + COMPOSITE_PRICE = :composite_price + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Price::MeteredAllowance#license_type + class LicenseType < Orb::Internal::Type::BaseModel + # @!attribute id + # The Orb-assigned unique identifier for the license type. + # + # @return [String] + required :id, String + + # @!attribute grouping_key + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + # + # @return [String] + required :grouping_key, String + + # @!attribute name + # The name of the license type. + # + # @return [String] + required :name, String + + # @!method initialize(id:, grouping_key:, name:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::MeteredAllowance::LicenseType} for more details. + # + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + # + # @param id [String] The Orb-assigned unique identifier for the license type. + # + # @param grouping_key [String] The key used for grouping licenses of this type. This is typically a user identi + # + # @param name [String] The name of the license type. + end + end + class MinimumComposite < Orb::Internal::Type::BaseModel # @!attribute id # @@ -12647,7 +13531,7 @@ class LicenseType < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput)] + # @return [Array(Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput)] end end end diff --git a/lib/orb/models/price_create_params.rb b/lib/orb/models/price_create_params.rb index ff7703d6..524c5d49 100644 --- a/lib/orb/models/price_create_params.rb +++ b/lib/orb/models/price_create_params.rb @@ -10,11 +10,11 @@ class PriceCreateParams < Orb::Internal::Type::BaseModel # @!attribute body # New floating price request body params. # - # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] + # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::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::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}] @@ -80,6 +80,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 } @@ -765,6 +769,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 +1671,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput)] + # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::PriceCreateParams::Body::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput)] end end end diff --git a/lib/orb/models/price_evaluate_multiple_params.rb b/lib/orb/models/price_evaluate_multiple_params.rb index d068cc76..477176b7 100644 --- a/lib/orb/models/price_evaluate_multiple_params.rb +++ b/lib/orb/models/price_evaluate_multiple_params.rb @@ -86,7 +86,7 @@ class PriceEvaluation < Orb::Internal::Type::BaseModel # @!attribute price # New floating price request body params. # - # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput, nil] + # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::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::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. @@ -178,6 +178,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 } @@ -881,6 +887,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 +1826,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput)] + # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput)] end end end diff --git a/lib/orb/models/price_evaluate_preview_events_params.rb b/lib/orb/models/price_evaluate_preview_events_params.rb index 9efa6f4c..6a5f2500 100644 --- a/lib/orb/models/price_evaluate_preview_events_params.rb +++ b/lib/orb/models/price_evaluate_preview_events_params.rb @@ -144,7 +144,7 @@ class PriceEvaluation < Orb::Internal::Type::BaseModel # @!attribute price # New floating price request body params. # - # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, nil] + # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::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::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. @@ -241,6 +241,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 } @@ -952,6 +958,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 +1898,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput)] + # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput)] end end end diff --git a/lib/orb/models/price_interval.rb b/lib/orb/models/price_interval.rb index 5dd67808..de7ea9bc 100644 --- a/lib/orb/models/price_interval.rb +++ b/lib/orb/models/price_interval.rb @@ -72,7 +72,7 @@ class PriceInterval < Orb::Internal::Type::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::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::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..e285b2f2 100644 --- a/lib/orb/models/subscription_create_params.rb +++ b/lib/orb/models/subscription_create_params.rb @@ -449,7 +449,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!attribute price # New subscription price request body params. # - # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput, nil] + # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::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::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. # @@ -559,6 +559,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 } @@ -1527,12 +1532,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 +1556,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 +1565,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 +1598,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 +1666,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 +1707,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 +1726,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 +1825,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 +1877,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 +1945,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 +1986,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 +2005,1283 @@ 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 + 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 } - # @deprecated - module ExternalMarketplace - extend Orb::Internal::Type::Enum + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String - GOOGLE = :google - AWS = :aws - AZURE = :azure + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :percent] + required :model_type, const: :percent - # @!method self.values - # @return [Array] - end + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String - 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 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(adjustment_id:) - # @param adjustment_id [String] The id of the adjustment 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 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 billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, 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 billing_cycle_configuration + # For custom cadence: 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(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 conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, 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 conversion_rate_config + # The configuration for 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 - # @!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 currency + # 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 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 dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + 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 external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference 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::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 + + 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::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::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. - discriminator :adjustment_type + # New subscription price request body params. + # + # @see Orb::Models::SubscriptionCreateParams::ReplacePrice#price + module Price + extend Orb::Internal::Type::Union - variant :percentage_discount, -> { Orb::NewPercentageDiscount } + discriminator :model_type - variant :usage_discount, -> { Orb::NewUsageDiscount } + variant :unit, -> { Orb::NewSubscriptionUnitPrice } - variant :amount_discount, -> { Orb::NewAmountDiscount } + variant :tiered, -> { Orb::NewSubscriptionTieredPrice } - variant :minimum, -> { Orb::NewMinimum } + variant :bulk, -> { Orb::NewSubscriptionBulkPrice } - variant :maximum, -> { Orb::NewMaximum } + variant :bulk_with_filters, -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters } - # @!method self.variants - # @return [Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum)] - end - end + variant :package, -> { Orb::NewSubscriptionPackagePrice } - 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 + variant :matrix, -> { Orb::NewSubscriptionMatrixPrice } - # @!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 + variant :threshold_total_amount, -> { Orb::NewSubscriptionThresholdTotalAmountPrice } - # @!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 + variant :tiered_package, -> { Orb::NewSubscriptionTieredPackagePrice } - # @!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 + variant :tiered_with_minimum, -> { Orb::NewSubscriptionTieredWithMinimumPrice } - # @!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 + 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 :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 - # @!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 + # @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 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 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] } - # @!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(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 - # @!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 + class Filter < Orb::Internal::Type::BaseModel + # @!attribute property_key + # Event property key to filter on + # + # @return [String] + required :property_key, String - # @!attribute price_id - # The id of the price to add to the subscription. - # - # @return [String, nil] - optional :price_id, String, nil?: true + # @!attribute property_value + # Event property value to match + # + # @return [String] + required :property_value, 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::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(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 - # New subscription price request body params. - # - # @see Orb::Models::SubscriptionCreateParams::ReplacePrice#price - module Price - extend Orb::Internal::Type::Union + class Tier < Orb::Internal::Type::BaseModel + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String - discriminator :model_type + # @!attribute tier_lower_bound + # The lower bound for this tier + # + # @return [String, nil] + optional :tier_lower_bound, String, nil?: true - variant :unit, -> { Orb::NewSubscriptionUnitPrice } + # @!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 - variant :tiered, -> { Orb::NewSubscriptionTieredPrice } + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters#cadence + module Cadence + extend Orb::Internal::Type::Enum - variant :bulk, -> { Orb::NewSubscriptionBulkPrice } + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom - variant :bulk_with_filters, -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters } + # @!method self.values + # @return [Array] + 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 +3292,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 +3334,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 +3402,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 +3436,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 +3461,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 +3525,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 +3534,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 +3567,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 +3635,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 +3676,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 +3695,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 +3758,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 +3800,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 +3868,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 +3909,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 +3928,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 +4028,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 +4080,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 +4148,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 +4189,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 +4208,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 +4712,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput)] end end end diff --git a/lib/orb/models/subscription_price_intervals_params.rb b/lib/orb/models/subscription_price_intervals_params.rb index 5368b82f..546eddbf 100644 --- a/lib/orb/models/subscription_price_intervals_params.rb +++ b/lib/orb/models/subscription_price_intervals_params.rb @@ -163,7 +163,7 @@ class Add < Orb::Internal::Type::BaseModel # @!attribute price # New floating price request body params. # - # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput, nil] + # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::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::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. # @@ -409,6 +409,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 } @@ -1112,6 +1117,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 +2054,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput)] + # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput)] end end diff --git a/lib/orb/models/subscription_schedule_plan_change_params.rb b/lib/orb/models/subscription_schedule_plan_change_params.rb index 1a7ac6c1..05c2c22c 100644 --- a/lib/orb/models/subscription_schedule_plan_change_params.rb +++ b/lib/orb/models/subscription_schedule_plan_change_params.rb @@ -421,7 +421,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!attribute price # New subscription price request body params. # - # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, nil] + # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::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::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. # @@ -533,6 +533,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 } @@ -1506,13 +1512,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 +1536,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,13 +1545,6 @@ 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. @@ -1572,7 +1578,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 +1646,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 +1687,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 +1706,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 +1806,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 +1858,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 +1926,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 +1967,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 +1986,1308 @@ 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 - - UNCHANGED = :unchanged - PLAN_CHANGE_DATE = :plan_change_date - START_OF_MONTH = :start_of_month + 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 } - # @!method self.values - # @return [Array] - end + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String - 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 model_type + # The pricing model type + # + # @return [Symbol, :percent] + required :model_type, const: :percent - # @!method initialize(adjustment_id:) - # @param adjustment_id [String] The id of the adjustment to remove on the subscription. - end + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String - 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 percent_config + # Configuration for percent pricing + # + # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig] + required :percent_config, + -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig } - # @!attribute price_id - # The id of the price to remove on the subscription. - # - # @return [String, nil] - optional :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 - # @!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 billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance 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 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 billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, 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 + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, 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_config + # The configuration for 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 - # 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 currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true - discriminator :adjustment_type + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference 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::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::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::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 :percentage_discount, -> { Orb::NewPercentageDiscount } + variant :package, -> { Orb::NewSubscriptionPackagePrice } - variant :usage_discount, -> { Orb::NewUsageDiscount } + variant :matrix, -> { Orb::NewSubscriptionMatrixPrice } - variant :amount_discount, -> { Orb::NewAmountDiscount } + variant :threshold_total_amount, -> { Orb::NewSubscriptionThresholdTotalAmountPrice } - variant :minimum, -> { Orb::NewMinimum } + variant :tiered_package, -> { Orb::NewSubscriptionTieredPackagePrice } - variant :maximum, -> { Orb::NewMaximum } + variant :tiered_with_minimum, -> { Orb::NewSubscriptionTieredWithMinimumPrice } - # @!method self.variants - # @return [Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum)] - end - end + variant :grouped_tiered, -> { Orb::NewSubscriptionGroupedTieredPrice } - 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 + variant :tiered_package_with_minimum, -> { Orb::NewSubscriptionTieredPackageWithMinimumPrice } - # @!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 + variant :package_with_allocation, -> { Orb::NewSubscriptionPackageWithAllocationPrice } - # @!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 + variant :unit_with_percent, -> { Orb::NewSubscriptionUnitWithPercentPrice } - # @!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 + variant :matrix_with_allocation, -> { Orb::NewSubscriptionMatrixWithAllocationPrice } - # @!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 + 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 - # @!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 + # @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 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 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 - # @!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(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 - # @!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 Filter < Orb::Internal::Type::BaseModel + # @!attribute property_key + # Event property key to filter on + # + # @return [String] + required :property_key, String - # @!attribute price_id - # The id of the price to add to the subscription. - # - # @return [String, nil] - optional :price_id, String, nil?: true + # @!attribute property_value + # Event property value to match + # + # @return [String] + required :property_value, 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. + # @!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 - # New subscription price request body params. - # - # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice#price - module Price - extend Orb::Internal::Type::Union + class Tier < Orb::Internal::Type::BaseModel + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String - discriminator :model_type + # @!attribute tier_lower_bound + # The lower bound for this tier + # + # @return [String, nil] + optional :tier_lower_bound, String, nil?: true - variant :unit, -> { Orb::NewSubscriptionUnitPrice } + # @!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 - variant :tiered, -> { Orb::NewSubscriptionTieredPrice } + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters#cadence + module Cadence + extend Orb::Internal::Type::Enum - variant :bulk, -> { Orb::NewSubscriptionBulkPrice } + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom - variant :bulk_with_filters, - -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters } + # @!method self.values + # @return [Array] + 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::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig] + required :tiered_with_proration_config, + -> { Orb::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::ConversionRateConfig + }, + nil?: true - variant :tiered_with_proration, - -> { Orb::SubscriptionSchedulePlanChangeParams::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::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 +3298,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 +3340,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 +3408,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 +3449,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 +3467,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 +3531,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 +3540,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 +3573,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 +3641,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 +3682,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 +3701,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 +3764,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 +3806,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 +3874,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 +3915,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 +3934,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 +4034,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 +4086,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 +4154,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 +4195,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 +4214,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 +4720,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput)] end end end diff --git a/lib/orb/resources/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/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/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..fe01296d 100644 --- a/lib/orb/resources/prices.rb +++ b/lib/orb/resources/prices.rb @@ -39,11 +39,11 @@ class Prices # # @overload create(body:, request_options: {}) # - # @param body [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] New floating price request body params. + # @param body [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::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::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::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::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..7e0c93fe 100644 --- a/lib/orb/resources/prices/external_price_id.rb +++ b/lib/orb/resources/prices/external_price_id.rb @@ -29,7 +29,7 @@ class ExternalPriceID # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::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::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/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..ea4d7bc6 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)) } @@ -405,6 +383,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 +399,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: @@ -485,6 +433,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 +460,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: @@ -576,6 +494,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 +507,509 @@ module Orb def to_hash end - # The license allocation price to add to the plan. - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - Variants = + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice, + Orb::Internal::AnyHash ) end - class Unit < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do + # The cadence to bill for this price on. + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations + + # The pricing model type + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::OrSymbol + ) + end + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # Configuration for unit pricing + sig { returns(Orb::UnitConfig) } + attr_reader :unit_config + + sig { params(unit_config: Orb::UnitConfig::OrHash).void } + attr_writer :unit_config + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, - Orb::Internal::AnyHash + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol ) - end - attr_accessor :cadence + ) + end + attr_accessor :conversion_rate_config - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + # The license allocation price to add to the plan. + sig do + params( + cadence: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::OrSymbol, + item_id: String, + license_allocations: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation::OrHash + ], + model_type: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::OrSymbol, + name: String, + unit_config: Orb::UnitConfig::OrHash, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, # License allocations to associate with this price. Each entry defines a # per-license credit pool granted each cadence. Requires license_type_id or # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - + license_allocations:, # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - + model_type:, # The name of the price. - sig { returns(String) } - attr_accessor :name - + name:, # Configuration for unit pricing - sig { returns(Orb::UnitConfig) } - attr_reader :unit_config - - sig { params(unit_config: Orb::UnitConfig::OrHash).void } - attr_writer :unit_config - + unit_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - + billable_metric_id: nil, # If the Price represents a fixed cost, the price will be billed in-advance if # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - + billed_in_advance: nil, # For custom cadence: specifies the duration of the billing period in days or # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - + billing_cycle_configuration: nil, # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - + conversion_rate: nil, # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - + conversion_rate_config: nil, # An ISO 4217 currency string, or custom pricing unit identifier, in which this # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - + currency: nil, # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - + dimensional_price_configuration: nil, # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - + external_price_id: nil, # If the Price represents a fixed cost, this represents the quantity of units # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - + fixed_price_quantity: nil, # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - + invoice_grouping_key: nil, # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - + invoicing_cycle_configuration: nil, # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - + license_type_id: nil, # User-specified key/value pairs for the resource. Individual keys can be removed # by setting the value to `null`, and the entire metadata mapping can be cleared # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - + metadata: nil, # A transient ID that can be used to reference this price when adding adjustments # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id + reference_id: nil + ) + end - sig do - params( + sig do + override.returns( + { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::OrSymbol, item_id: String, license_allocations: T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation::OrHash + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation ], + model_type: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::OrSymbol, name: String, - unit_config: Orb::UnitConfig::OrHash, + unit_config: Orb::UnitConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + T.nilable(Orb::NewBillingCycleConfiguration), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig ) ), currency: T.nilable(String), dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + T.nilable(Orb::NewDimensionalPriceConfiguration), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + T.nilable(Orb::NewBillingCycleConfiguration), license_type_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit pricing - unit_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit + reference_id: T.nilable(String) + } ) - end + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) sig do override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ] ) end - def to_hash + def self.values end + end - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ] + class LicenseAllocation < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation, + Orb::Internal::AnyHash ) end - def self.values - end - end - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation, - Orb::Internal::AnyHash - ) - end + # The amount of credits granted per active license per cadence. + sig { returns(String) } + attr_accessor :amount - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount + # The currency of the license allocation. + sig { returns(String) } + attr_accessor :currency - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # When True, overage beyond the allocation is written off. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :write_off_overage + sig do + params( + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + ).returns(T.attached_class) + end + def self.new( + # The amount of credits granted per active license per cadence. + amount:, + # The currency of the license allocation. + currency:, # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + write_off_overage: nil + ) + end - sig do - params( + sig do + override.returns( + { amount: String, currency: String, write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + } ) - end + end + def to_hash + end + end - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } + # The pricing model type + module ModelType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType ) end - def to_hash - end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNIT = + T.let( + :unit, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ] + ) + end + def self.values end end + end + + # New plan price request body params. + module Price + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::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 +1019,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 +1119,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 +1152,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 +1198,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 +1241,228 @@ module Orb def to_hash end - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol + end + attr_accessor :filters + + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] ) + end + attr_accessor :tiers + + # Configuration for bulk_with_filters pricing + sig do + params( + filters: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + ], + tiers: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Property filters to apply (all must match) + filters:, + # Bulk tiers for rating based on total usage volume + tiers: + ) + end sig do override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ] + { + filters: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + } ) end - def self.values + def to_hash end - end - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation, - Orb::Internal::AnyHash + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Internal::AnyHash + ) + end + + # Event property key to filter on + sig { returns(String) } + attr_accessor :property_key + + # Event property value to match + sig { returns(String) } + attr_accessor :property_value + + # Configuration for a single property filter + sig do + params( + property_key: String, + property_value: String + ).returns(T.attached_class) + end + def self.new( + # Event property key to filter on + property_key:, + # Event property value to match + property_value: + ) + end + + sig do + override.returns( + { property_key: String, property_value: String } ) end + def to_hash + end + end - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::Internal::AnyHash + ) + end - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # The lower bound for this tier + sig { returns(T.nilable(String)) } + attr_accessor :tier_lower_bound - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) + # Configuration for a single bulk pricing tier + sig do + params( + unit_amount: String, + tier_lower_bound: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Amount per unit + unit_amount:, + # The lower bound for this tier + tier_lower_bound: nil + ) + end + + sig do + override.returns( + { + unit_amount: String, + tier_lower_bound: T.nilable(String) + } + ) + end + def to_hash + end end + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) sig do override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ] ) end - def to_hash + def self.values end end end - class Bulk < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Internal::AnyHash ) end - # Configuration for bulk pricing - sig { returns(Orb::BulkConfig) } - attr_reader :bulk_config - - sig { params(bulk_config: Orb::BulkConfig::OrHash).void } - attr_writer :bulk_config - # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol ) end attr_accessor :cadence @@ -1430,18 +1471,6 @@ module Orb sig { returns(String) } attr_accessor :item_id - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -1450,6 +1479,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for tiered_with_proration pricing + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -1550,15 +1595,12 @@ module Orb sig do params( - bulk_config: Orb::BulkConfig::OrHash, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation::OrHash - ], name: String, + tiered_with_proration_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1586,18 +1628,14 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk pricing - bulk_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, + # Configuration for tiered_with_proration pricing + tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -1636,23 +1674,20 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk + model_type: :tiered_with_proration ) end sig do override.returns( { - bulk_config: Orb::BulkConfig, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ], model_type: Symbol, name: String, + tiered_with_proration_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1690,7 +1725,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1698,38 +1733,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ] ) end @@ -1737,107 +1772,135 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # Tiers for rating based on total usage quantities into the specified tier with + # proration + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] + ) + end + attr_accessor :tiers + # Configuration for tiered_with_proration pricing sig do params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + tiers: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash + ] ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # Tiers for rating based on total usage quantities into the specified tier with + # proration + tiers: ) end sig do override.returns( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + tiers: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] } ) end def to_hash end + + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, + Orb::Internal::AnyHash + ) + end + + # Inclusive tier starting value + sig { returns(String) } + attr_accessor :tier_lower_bound + + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount + + # Configuration for a single tiered with proration tier + sig do + params( + tier_lower_bound: String, + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # Inclusive tier starting value + tier_lower_bound:, + # Amount per unit + unit_amount: + ) + end + + sig do + override.returns( + { tier_lower_bound: String, unit_amount: String } + ) + end + def to_hash + end + end end end - class BulkWithFilters < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end - # Configuration for bulk_with_filters pricing + # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol ) end - attr_reader :bulk_with_filters_config + attr_accessor :cadence + # Configuration for grouped_with_min_max_thresholds pricing sig do - params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + ) end - attr_writer :bulk_with_filters_config + attr_reader :grouped_with_min_max_thresholds_config - # The cadence to bill for this price on. sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol - ) + params( + grouped_with_min_max_thresholds_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + ).void end - attr_accessor :cadence + attr_writer :grouped_with_min_max_thresholds_config # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -1946,15 +2009,11 @@ module Orb sig do params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation::OrHash - ], name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -1983,16 +2042,12 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, + # Configuration for grouped_with_min_max_thresholds pricing + grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -2033,22 +2088,18 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk_with_filters + model_type: :grouped_with_min_max_thresholds ) end sig do override.returns( { - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ], model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -2080,299 +2131,159 @@ module Orb def to_hash end - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence ) end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ] + ANNUAL = + T.let( + :annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) - end - attr_accessor :filters - # Bulk tiers for rating based on total usage volume sig do - returns( + override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ] ) end - attr_accessor :tiers + def self.values + end + end - # Configuration for bulk_with_filters pricing + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::Internal::AnyHash + ) + end + + # The event property used to group before applying thresholds + sig { returns(String) } + attr_accessor :grouping_key + + # The maximum amount to charge each group + sig { returns(String) } + attr_accessor :maximum_charge + + # The minimum amount to charge each group, regardless of usage + sig { returns(String) } + attr_accessor :minimum_charge + + # The base price charged per group + sig { returns(String) } + attr_accessor :per_unit_rate + + # Configuration for grouped_with_min_max_thresholds pricing sig do params( - filters: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ).returns(T.attached_class) end def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: + # The event property used to group before applying thresholds + grouping_key:, + # The maximum amount to charge each group + maximum_charge:, + # The minimum amount to charge each group, regardless of usage + minimum_charge:, + # The base price charged per group + per_unit_rate: ) end sig do override.returns( { - filters: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } ) end def to_hash end + end + end - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter, - Orb::Internal::AnyHash - ) - end - - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match - sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params( - property_key: String, - property_value: String - ).returns(T.attached_class) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { - unit_amount: String, - tier_lower_bound: T.nilable(String) - } - ) - end - def to_hash - end - end - end + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::Internal::AnyHash + ) + end # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end end - end - - class Package < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, - Orb::Internal::AnyHash - ) - end + attr_accessor :cadence - # The cadence to bill for this price on. + # Configuration for cumulative_grouped_allocation pricing sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig ) end - attr_accessor :cadence + attr_reader :cumulative_grouped_allocation_config + + sig do + params( + cumulative_grouped_allocation_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + ).void + end + attr_writer :cumulative_grouped_allocation_config # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -2381,13 +2292,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 +2393,11 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation::OrHash - ], name: String, - package_config: Orb::PackageConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2526,16 +2427,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, - # Configuration for package pricing - package_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -2574,7 +2471,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :package + model_type: :cumulative_grouped_allocation ) end @@ -2582,15 +2479,12 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation - ], model_type: Symbol, name: String, - package_config: Orb::PackageConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2628,7 +2522,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2636,38 +2530,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ] ) end @@ -2675,50 +2569,59 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. + # The overall allocation across all groups sig { returns(String) } - attr_accessor :amount + attr_accessor :cumulative_allocation - # The currency of the license allocation. + # The allocation per individual group sig { returns(String) } - attr_accessor :currency + attr_accessor :group_allocation - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # The event property used to group usage before applying allocations + sig { returns(String) } + attr_accessor :grouping_key + + # The amount to charge for each unit outside of the allocation + sig { returns(String) } + attr_accessor :unit_amount + # Configuration for cumulative_grouped_allocation pricing sig do params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # The overall allocation across all groups + cumulative_allocation:, + # The allocation per individual group + group_allocation:, + # The event property used to group usage before applying allocations + grouping_key:, + # The amount to charge for each unit outside of the allocation + unit_amount: ) end sig do override.returns( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } ) end @@ -2727,11 +2630,11 @@ module Orb end end - class Matrix < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -2739,33 +2642,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::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::Matrix::LicenseAllocation - ] + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_accessor :license_allocations + attr_reader :daily_credit_allowance_config - # Configuration for matrix pricing - sig { returns(Orb::MatrixConfig) } - attr_reader :matrix_config + sig do + params( + daily_credit_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + ).void + end + attr_writer :daily_credit_allowance_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 +2776,10 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::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::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 +2810,10 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. 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 +2854,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :matrix + model_type: :daily_credit_allowance ) end @@ -2969,13 +2862,10 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::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::Matrix::LicenseAllocation - ], - matrix_config: Orb::MatrixConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -3015,7 +2905,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3023,38 +2913,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -3062,63 +2952,144 @@ 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::Matrix::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 + attr_accessor :default_unit_amount - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions + + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + sig { returns(String) } + attr_accessor :event_day_property + + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + # Configuration for daily_credit_allowance pricing sig do params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: 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( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -3126,7 +3097,7 @@ 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::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence @@ -3135,17 +3106,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::ThresholdTotalAmount::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) } @@ -3155,22 +3130,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 +3231,11 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation::OrHash - ], + metered_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::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: @@ -3312,14 +3267,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 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 +3309,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :threshold_total_amount + model_type: :metered_allowance ) end @@ -3366,16 +3317,12 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ], + metered_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, 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 +3360,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3421,38 +3368,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -3460,159 +3407,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::ThresholdTotalAmount::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 ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - Orb::Internal::AnyHash - ) - end + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ] - ) - end - attr_accessor :consumption_table + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name - # Configuration for threshold_total_amount pricing + # Configuration for metered_allowance pricing sig do params( - consumption_table: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable::OrHash - ], - prorate: T.nilable(T::Boolean) + 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( - # 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 + # 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( { - consumption_table: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ], - prorate: T.nilable(T::Boolean) + 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 ConsumptionTable < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :threshold - - # Total amount for this threshold - sig { returns(String) } - attr_accessor :total_amount - - # Configuration for a single threshold - sig do - params(threshold: String, total_amount: String).returns( - T.attached_class - ) - end - def self.new( - threshold:, - # Total amount for this threshold - total_amount: - ) - end - - sig do - override.returns( - { threshold: String, total_amount: String } - ) - end - def to_hash - end - end end end - class TieredPackage < Orb::Internal::Type::BaseModel + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Internal::AnyHash ) end @@ -3620,7 +3512,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::Percent::Cadence::OrSymbol ) end attr_accessor :cadence @@ -3629,18 +3521,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::TieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -3649,21 +3529,21 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for tiered_package pricing + # Configuration for percent pricing sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig ) end - attr_reader :tiered_package_config + attr_reader :percent_config sig do params( - tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::OrHash + percent_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash ).void end - attr_writer :tiered_package_config + attr_writer :percent_config # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -3766,15 +3646,11 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation::OrHash - ], name: String, - tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::OrHash, + 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: @@ -3806,14 +3682,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_package pricing - tiered_package_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, @@ -3852,7 +3724,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_package + model_type: :percent ) end @@ -3860,16 +3732,12 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ], model_type: Symbol, name: String, - tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, + 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: @@ -3907,7 +3775,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3915,38 +3783,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ] ) end @@ -3954,188 +3822,69 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class PercentConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # What percent of the component subtotals to charge + sig { returns(Float) } + attr_accessor :percent - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end + # Configuration for percent pricing + sig { params(percent: Float).returns(T.attached_class) } def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # What percent of the component subtotals to charge + percent: ) end - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end + sig { override.returns({ percent: Float }) } def to_hash end end + end - class TieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package pricing - sig do - params( - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - tiers: - ) - end - - sig do - override.returns( - { - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Price per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier with business logic - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Price per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - end - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Internal::AnyHash + 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::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol ) end attr_accessor :cadence - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. + # Configuration for event_output pricing sig do returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ] + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig ) end - attr_accessor :license_allocations + attr_reader :event_output_config + + sig do + params( + event_output_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash + ).void + end + attr_writer :event_output_config + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id # The pricing model type sig { returns(Symbol) } @@ -4145,22 +3894,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for tiered_with_minimum pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig - ) - end - attr_reader :tiered_with_minimum_config - - sig do - params( - tiered_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_with_minimum_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -4262,15 +3995,11 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation::OrHash - ], name: String, - tiered_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4300,16 +4029,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_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, @@ -4348,7 +4073,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_with_minimum + model_type: :event_output ) end @@ -4356,16 +4081,12 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ], model_type: Symbol, name: String, - tiered_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4403,7 +4124,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -4411,38 +4132,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ] ) end @@ -4450,27253 +4171,978 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class EventOutputConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. + # The key in the event data to extract the unit rate from. sig { returns(String) } - attr_accessor :amount + attr_accessor :unit_rating_key - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + sig { returns(T.nilable(String)) } + attr_accessor :default_unit_rate - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + sig { returns(T.nilable(String)) } + attr_accessor :grouping_key + # Configuration for event_output pricing sig do params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # The key in the event data to extract the unit rate from. + unit_rating_key:, + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + default_unit_rate: nil, + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + grouping_key: nil ) end sig do override.returns( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) } ) end def to_hash end end + end - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - Orb::Internal::AnyHash - ) - end + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Variants + ] + ) + end + def self.variants + end + end + 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 + class RemoveAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::RemoveAdjustment, + Orb::Internal::AnyHash + ) + end - # 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 + # The id of the adjustment to remove from on the plan. + sig { returns(String) } + attr_accessor :adjustment_id - sig { params(hide_zero_amount_tiers: T::Boolean).void } - attr_writer :hide_zero_amount_tiers + # The phase to remove this adjustment from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_reader :prorate + 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 { params(prorate: T::Boolean).void } - attr_writer :prorate + sig do + override.returns( + { adjustment_id: String, plan_phase_order: T.nilable(Integer) } + ) + end + def to_hash + end + end - # Configuration for tiered_with_minimum pricing - sig do - params( - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier::OrHash - ], - hide_zero_amount_tiers: T::Boolean, - prorate: T::Boolean - ).returns(T.attached_class) - end - def self.new( - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - tiers:, - # If true, tiers with an accrued amount of 0 will not be included in the rating. - hide_zero_amount_tiers: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil - ) - end + class RemovePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::RemovePrice, + Orb::Internal::AnyHash + ) + end - sig do - override.returns( - { - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ], - hide_zero_amount_tiers: T::Boolean, - prorate: T::Boolean - } - ) - end - def to_hash - end + # The id of the price to remove from the plan. + sig { returns(String) } + attr_accessor :price_id - 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 + # The phase to remove this price from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order - 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 + 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 - # 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( + { price_id: String, plan_phase_order: T.nilable(Integer) } + ) + end + def to_hash + end + end - sig do - override.returns( - { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment, + Orb::Internal::AnyHash + ) end - class GroupedTiered < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, - Orb::Internal::AnyHash - ) - end + # The 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::GroupedTiered::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 - # Configuration for grouped_tiered pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig - ) - end - attr_reader :grouped_tiered_config + # The phase to replace this adjustment from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order - sig do - params( - grouped_tiered_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash - ).void - end - attr_writer :grouped_tiered_config + 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 id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + 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 - # License allocations to associate with this price. Each entry defines a - # 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 - ] + # 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 - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - # The name of the price. - sig { returns(String) } - attr_accessor :name + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Variants + ] + ) + end + def self.variants + end + end + end - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id + class ReplacePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice, + Orb::Internal::AnyHash + ) + end - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance + # The id of the price on the plan to replace in the plan. + sig { returns(String) } + attr_accessor :replaces_price_id - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration + # The allocation price to add to the plan. + sig { returns(T.nilable(Orb::NewAllocationPrice)) } + attr_reader :allocation_price - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration + sig do + params( + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) + ).void + end + attr_writer :allocation_price - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate + # The license allocation price to add to the plan. + sig do + returns( + T.nilable( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice + ) + ) + end + attr_reader :license_allocation_price - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) + sig do + params( + license_allocation_price: + T.nilable( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::OrHash ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency + ).void + end + attr_writer :license_allocation_price - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration + # The phase to replace this price from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered pricing - grouped_tiered_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - Orb::Internal::AnyHash - ) - end - - # The billable metric property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - # Apply tiered pricing to each segment generated after grouping with the provided - # key - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered pricing - sig do - params( - grouping_key: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The billable metric property used to group before tiering - grouping_key:, - # Apply tiered pricing to each segment generated after grouping with the provided - # key - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_package_with_minimum pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig - ) - end - attr_reader :tiered_package_with_minimum_config - - sig do - params( - tiered_package_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_package_with_minimum_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation::OrHash - ], - name: String, - tiered_package_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_package_with_minimum pricing - tiered_package_with_minimum_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_package_with_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_package_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(Float) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package_with_minimum pricing - sig do - params( - package_size: Float, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - package_size: Float, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :minimum_amount - - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params( - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - ).returns(T.attached_class) - end - def self.new(minimum_amount:, per_unit:, tier_lower_bound:) - end - - sig do - override.returns( - { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - ) - end - def to_hash - end - end - end - end - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for package_with_allocation pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig - ) - end - attr_reader :package_with_allocation_config - - sig do - params( - package_with_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash - ).void - end - attr_writer :package_with_allocation_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation::OrHash - ], - name: String, - package_with_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for package_with_allocation pricing - package_with_allocation_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :package_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - package_with_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :allocation - - sig { returns(String) } - attr_accessor :package_amount - - sig { returns(String) } - attr_accessor :package_size - - # Configuration for package_with_allocation pricing - sig do - params( - allocation: String, - package_amount: String, - package_size: String - ).returns(T.attached_class) - end - def self.new(allocation:, package_amount:, package_size:) - end - - sig do - override.returns( - { - allocation: String, - package_amount: String, - package_size: String - } - ) - end - def to_hash - end - end - end - - class UnitWithPercent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_percent pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig - ) - end - attr_reader :unit_with_percent_config - - sig do - params( - unit_with_percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash - ).void - end - attr_writer :unit_with_percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation::OrHash - ], - name: String, - unit_with_percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_percent pricing - unit_with_percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent, out of 100, of the calculated total to charge - sig { returns(String) } - attr_accessor :percent - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_percent pricing - sig do - params(percent: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # What percent, out of 100, of the calculated total to charge - percent:, - # Rate per unit of usage - unit_amount: - ) - end - - sig do - override.returns({ percent: String, unit_amount: String }) - end - def to_hash - end - end - end - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_allocation pricing - sig { returns(Orb::MatrixWithAllocationConfig) } - attr_reader :matrix_with_allocation_config - - sig do - params( - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash - ).void - end - attr_writer :matrix_with_allocation_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation::OrHash - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_allocation pricing - matrix_with_allocation_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation::OrHash - ], - name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class UnitWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_proration pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig - ) - end - attr_reader :unit_with_proration_config - - sig do - params( - unit_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash - ).void - end - attr_writer :unit_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation::OrHash - ], - name: String, - unit_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_proration pricing - unit_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_proration pricing - sig { params(unit_amount: String).returns(T.attached_class) } - def self.new( - # Rate per unit of usage - unit_amount: - ) - end - - sig { override.returns({ unit_amount: String }) } - def to_hash - end - end - end - - class GroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_allocation pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig - ) - end - attr_reader :grouped_allocation_config - - sig do - params( - grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash - ).void - end - attr_writer :grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_allocation pricing - grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # Usage allocation per group - sig { returns(String) } - attr_accessor :allocation - - # How to determine the groups that should each be allocated some quantity - sig { returns(String) } - attr_accessor :grouping_key - - # Unit rate for post-allocation - sig { returns(String) } - attr_accessor :overage_unit_rate - - # Configuration for grouped_allocation pricing - sig do - params( - allocation: String, - grouping_key: String, - overage_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # Usage allocation per group - allocation:, - # How to determine the groups that should each be allocated some quantity - grouping_key:, - # Unit rate for post-allocation - overage_unit_rate: - ) - end - - sig do - override.returns( - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class BulkWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_proration pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig - ) - end - attr_reader :bulk_with_proration_config - - sig do - params( - bulk_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash - ).void - end - attr_writer :bulk_with_proration_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_proration pricing - bulk_with_proration_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_proration - ) - end - - sig do - override.returns( - { - bulk_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Cost per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier with proration - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Cost per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { - unit_amount: String, - tier_lower_bound: T.nilable(String) - } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_prorated_minimum pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - ) - end - attr_reader :grouped_with_prorated_minimum_config - - sig do - params( - grouped_with_prorated_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_prorated_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_prorated_minimum pricing - grouped_with_prorated_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_prorated_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # How to determine the groups that should each have a minimum - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group - sig { returns(String) } - attr_accessor :minimum - - # The amount to charge per unit - sig { returns(String) } - attr_accessor :unit_rate - - # Configuration for grouped_with_prorated_minimum pricing - sig do - params( - grouping_key: String, - minimum: String, - unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # How to determine the groups that should each have a minimum - grouping_key:, - # The minimum amount to charge per group - minimum:, - # The amount to charge per unit - unit_rate: - ) - end - - sig do - override.returns( - { grouping_key: String, minimum: String, unit_rate: String } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_metered_minimum pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig - ) - end - attr_reader :grouped_with_metered_minimum_config - - sig do - params( - grouped_with_metered_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_metered_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_metered_minimum pricing - grouped_with_metered_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_metered_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group per unit - sig { returns(String) } - attr_accessor :minimum_unit_amount - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :pricing_key - - # Scale the unit rates by the scaling factor. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ] - ) - end - attr_accessor :scaling_factors - - # Used to determine the unit rate scaling factor - sig { returns(String) } - attr_accessor :scaling_key - - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for grouped_with_metered_minimum pricing - sig do - params( - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor::OrHash - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - grouping_key:, - # The minimum amount to charge per group per unit - minimum_unit_amount:, - # Used to determine the unit rate - pricing_key:, - # Scale the unit rates by the scaling factor. - scaling_factors:, - # Used to determine the unit rate scaling factor - scaling_key:, - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - unit_amounts: - ) - end - - sig do - override.returns( - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class ScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(String) } - attr_accessor :scaling_value - - # Configuration for a scaling factor - sig do - params( - scaling_factor: String, - scaling_value: String - ).returns(T.attached_class) - end - def self.new(scaling_factor:, scaling_value:) - end - - sig do - override.returns( - { scaling_factor: String, scaling_value: String } - ) - end - def to_hash - end - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :pricing_value - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount - sig do - params(pricing_value: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - pricing_value:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { pricing_value: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_min_max_thresholds - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: - ) - end - - sig do - override.returns( - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_display_name pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig - ) - end - attr_reader :matrix_with_display_name_config - - sig do - params( - matrix_with_display_name_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash - ).void - end - attr_writer :matrix_with_display_name_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation::OrHash - ], - matrix_with_display_name_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_display_name pricing - matrix_with_display_name_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_display_name - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ], - matrix_with_display_name_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :dimension - - # Apply per unit pricing to each dimension value - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for matrix_with_display_name pricing - sig do - params( - dimension: String, - unit_amounts: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - dimension:, - # Apply per unit pricing to each dimension value - unit_amounts: - ) - end - - sig do - override.returns( - { - dimension: String, - unit_amounts: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - # The dimension value - sig { returns(String) } - attr_accessor :dimension_value - - # Display name for this dimension value - sig { returns(String) } - attr_accessor :display_name - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount item - sig do - params( - dimension_value: String, - display_name: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The dimension value - dimension_value:, - # Display name for this dimension value - display_name:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { - dimension_value: String, - display_name: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - end - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_tiered_package pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig - ) - end - attr_reader :grouped_tiered_package_config - - sig do - params( - grouped_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash - ).void - end - attr_writer :grouped_tiered_package_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered_package pricing - grouped_tiered_package_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering - grouping_key:, - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for max_group_tiered_package pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - ) - end - attr_reader :max_group_tiered_package_config - - sig do - params( - max_group_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash - ).void - end - attr_writer :max_group_tiered_package_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation::OrHash - ], - max_group_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for max_group_tiered_package pricing - max_group_tiered_package_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :max_group_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ], - max_group_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering the group with the highest value - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing to the largest group after grouping with the provided key. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for max_group_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering the group with the highest value - grouping_key:, - package_size:, - # Apply tiered pricing to the largest group after grouping with the provided key. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - ) - end - attr_reader :scalable_matrix_with_unit_pricing_config - - sig do - params( - scalable_matrix_with_unit_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_unit_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_unit_pricing pricing - scalable_matrix_with_unit_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_unit_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - # The final unit price to rate against the output of the matrix - sig { returns(String) } - attr_accessor :unit_price - - # The property used to group this price - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate - - # Used to determine the unit rate (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor::OrHash - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - # The final unit price to rate against the output of the matrix - unit_price:, - # The property used to group this price - grouping_key: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil, - # Used to determine the unit rate (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig - ) - end - attr_reader :scalable_matrix_with_tiered_pricing_config - - sig do - params( - scalable_matrix_with_tiered_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_tiered_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_tiered_pricing pricing - scalable_matrix_with_tiered_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_tiered_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used for the scalable matrix first dimension - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Used for the scalable matrix second dimension (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor::OrHash - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier::OrHash - ], - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used for the scalable matrix first dimension - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - tiers:, - # Used for the scalable matrix second dimension (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ], - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier entry with business logic - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new(tier_lower_bound:, unit_amount:) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_bulk pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig - ) - end - attr_reader :cumulative_grouped_bulk_config - - sig do - params( - cumulative_grouped_bulk_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_bulk_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_bulk pricing - cumulative_grouped_bulk_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_bulk - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - Orb::Internal::AnyHash - ) - end - - # Each tier lower bound must have the same group of values. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ] - ) - end - attr_accessor :dimension_values - - sig { returns(String) } - attr_accessor :group - - # Configuration for cumulative_grouped_bulk pricing - sig do - params( - dimension_values: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue::OrHash - ], - group: String - ).returns(T.attached_class) - end - def self.new( - # Each tier lower bound must have the same group of values. - dimension_values:, - group: - ) - end - - sig do - override.returns( - { - dimension_values: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ], - group: String - } - ) - end - def to_hash - end - - class DimensionValue < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue, - Orb::Internal::AnyHash - ) - end - - # Grouping key value - sig { returns(String) } - attr_accessor :grouping_key - - # Tier lower bound - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Unit amount for this combination - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a dimension value entry - sig do - params( - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # Grouping key value - grouping_key:, - # Tier lower bound - tier_lower_bound:, - # Unit amount for this combination - unit_amount: - ) - end - - sig do - override.returns( - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_allocation pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - ) - end - attr_reader :cumulative_grouped_allocation_config - - sig do - params( - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # The overall allocation across all groups - sig { returns(String) } - attr_accessor :cumulative_allocation - - # The allocation per individual group - sig { returns(String) } - attr_accessor :group_allocation - - # The event property used to group usage before applying allocations - sig { returns(String) } - attr_accessor :grouping_key - - # The amount to charge for each unit outside of the allocation - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for cumulative_grouped_allocation pricing - sig do - params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations - grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: - ) - end - - sig do - override.returns( - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MinimumComposite < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for minimum_composite pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig - ) - end - attr_reader :minimum_composite_config - - sig do - params( - minimum_composite_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash - ).void - end - attr_writer :minimum_composite_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation::OrHash - ], - minimum_composite_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for minimum_composite pricing - minimum_composite_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :minimum_composite - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ], - minimum_composite_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - Orb::Internal::AnyHash - ) - end - - # The minimum amount to apply - sig { returns(String) } - attr_accessor :minimum_amount - - # If true, subtotals from this price are prorated based on the service period - sig { returns(T.nilable(T::Boolean)) } - attr_reader :prorated - - sig { params(prorated: T::Boolean).void } - attr_writer :prorated - - # Configuration for minimum_composite pricing - sig do - params(minimum_amount: String, prorated: T::Boolean).returns( - T.attached_class - ) - end - def self.new( - # The minimum amount to apply - minimum_amount:, - # If true, subtotals from this price are prorated based on the service period - prorated: nil - ) - end - - sig do - override.returns( - { minimum_amount: String, prorated: T::Boolean } - ) - end - def to_hash - end - end - end - - class Percent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for percent pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig - ) - end - attr_reader :percent_config - - sig do - params( - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation::OrHash - ], - name: String, - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for percent pricing - percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation - ], - model_type: Symbol, - name: String, - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent - - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } - def self.new( - # What percent of the component subtotals to charge - percent: - ) - end - - sig { override.returns({ percent: Float }) } - def to_hash - end - end - end - - class EventOutput < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for event_output pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for event_output pricing - event_output_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :event_output - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class EventOutputConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - Orb::Internal::AnyHash - ) - end - - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil - ) - end - - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Variants - ] - ) - end - def self.variants - end - end - - # New plan price request body params. - module Price - extend Orb::Internal::Type::Union - - Variants = - T.type_alias do - T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, - Orb::NewPlanMinimumCompositePrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput - ) - end - - class BulkWithFilters < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_filters pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig - ) - end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_filters - ) - end - - sig do - override.returns( - { - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash - ) - end - - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - ) - end - attr_accessor :filters - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_filters pricing - sig do - params( - filters: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - filters: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - } - ) - end - def to_hash - end - - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, - Orb::Internal::AnyHash - ) - end - - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match - sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params( - property_key: String, - property_value: String - ).returns(T.attached_class) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { - unit_amount: String, - tier_lower_bound: T.nilable(String) - } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, - item_id: String, - name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, - item_id: String, - model_type: Symbol, - name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_min_max_thresholds - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: - ) - end - - sig do - override.returns( - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - ) - end - def to_hash - end - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_allocation pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - ) - end - attr_reader :cumulative_grouped_allocation_config - - sig do - params( - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # The overall allocation across all groups - sig { returns(String) } - attr_accessor :cumulative_allocation - - # The allocation per individual group - sig { returns(String) } - attr_accessor :group_allocation - - # The event property used to group usage before applying allocations - sig { returns(String) } - attr_accessor :grouping_key - - # The amount to charge for each unit outside of the allocation - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for cumulative_grouped_allocation pricing - sig do - params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations - grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: - ) - end - - sig do - override.returns( - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - - class Percent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for percent pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig - ) - end - attr_reader :percent_config - - sig do - params( - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, - item_id: String, - name: String, - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # Configuration for percent pricing - percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, - item_id: String, - model_type: Symbol, - name: String, - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class PercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent - - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } - def self.new( - # What percent of the component subtotals to charge - percent: - ) - end - - sig { override.returns({ percent: Float }) } - def to_hash - end - end - end - - class EventOutput < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for event_output pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for event_output pricing - event_output_config:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :event_output - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class EventOutputConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, - Orb::Internal::AnyHash - ) - end - - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil - ) - end - - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end - def to_hash - end - end - end - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Variants - ] - ) - end - def self.variants - end - end - end - - class RemoveAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::RemoveAdjustment, - Orb::Internal::AnyHash - ) - end - - # The id of the adjustment to remove from on the plan. - sig { returns(String) } - attr_accessor :adjustment_id - - # The phase to remove this adjustment from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order - - sig do - params( - adjustment_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The id of the adjustment to remove from on the plan. - adjustment_id:, - # The phase to remove this adjustment from. - plan_phase_order: nil - ) - end - - sig do - override.returns( - { adjustment_id: String, plan_phase_order: T.nilable(Integer) } - ) - end - def to_hash - end - end - - class RemovePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::RemovePrice, - Orb::Internal::AnyHash - ) - end - - # The id of the price to remove from the plan. - sig { returns(String) } - attr_accessor :price_id - - # The phase to remove this price from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order - - sig do - params( - price_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The id of the price to remove from the plan. - price_id:, - # The phase to remove this price from. - plan_phase_order: nil - ) - end - - sig do - override.returns( - { price_id: String, plan_phase_order: T.nilable(Integer) } - ) - end - def to_hash - end - end - - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment, - Orb::Internal::AnyHash - ) - end - - # The definition of a new adjustment to create and add to the plan. - sig do - returns( - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - ) - end - attr_accessor :adjustment - - # The id of the adjustment on the plan to replace in the plan. - sig { returns(String) } - attr_accessor :replaces_adjustment_id - - # The phase to replace this adjustment from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order - - sig do - params( - adjustment: - T.any( - Orb::NewPercentageDiscount::OrHash, - Orb::NewUsageDiscount::OrHash, - Orb::NewAmountDiscount::OrHash, - Orb::NewMinimum::OrHash, - Orb::NewMaximum::OrHash - ), - replaces_adjustment_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The definition of a new adjustment to create and add to the plan. - adjustment:, - # The id of the adjustment on the plan to replace in the plan. - replaces_adjustment_id:, - # The phase to replace this adjustment from. - plan_phase_order: nil - ) - end - - sig do - override.returns( - { - adjustment: - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ), - replaces_adjustment_id: String, - plan_phase_order: T.nilable(Integer) - } - ) - end - def to_hash - end - - # The definition of a new adjustment to create and add to the plan. - module Adjustment - extend Orb::Internal::Type::Union - - Variants = - T.type_alias do - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - end - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Variants - ] - ) - end - def self.variants - end - end - end - - class ReplacePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice, - Orb::Internal::AnyHash - ) - end - - # The id of the price on the plan to replace in the plan. - sig { returns(String) } - attr_accessor :replaces_price_id - - # The allocation price to add to the plan. - sig { returns(T.nilable(Orb::NewAllocationPrice)) } - attr_reader :allocation_price - - sig do - params( - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) - ).void - end - attr_writer :allocation_price - - # The license allocation price to add to the plan. - sig do - returns( - T.nilable( - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput - ) - ) - ) - end - attr_accessor :license_allocation_price - - # The phase to replace this price from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order - - # New plan price request body params. - sig do - returns( - T.nilable( - T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewPlanMinimumCompositePrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput - ) - ) - ) - end - attr_accessor :price - - sig do - params( - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), - license_allocation_price: - T.nilable( - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::OrHash - ) - ), - plan_phase_order: T.nilable(Integer), - price: - T.nilable( - T.any( - Orb::NewPlanUnitPrice::OrHash, - Orb::NewPlanTieredPrice::OrHash, - Orb::NewPlanBulkPrice::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::OrHash, - Orb::NewPlanPackagePrice::OrHash, - Orb::NewPlanMatrixPrice::OrHash, - Orb::NewPlanThresholdTotalAmountPrice::OrHash, - Orb::NewPlanTieredPackagePrice::OrHash, - Orb::NewPlanTieredWithMinimumPrice::OrHash, - Orb::NewPlanGroupedTieredPrice::OrHash, - Orb::NewPlanTieredPackageWithMinimumPrice::OrHash, - Orb::NewPlanPackageWithAllocationPrice::OrHash, - Orb::NewPlanUnitWithPercentPrice::OrHash, - Orb::NewPlanMatrixWithAllocationPrice::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::OrHash, - Orb::NewPlanUnitWithProrationPrice::OrHash, - Orb::NewPlanGroupedAllocationPrice::OrHash, - Orb::NewPlanBulkWithProrationPrice::OrHash, - Orb::NewPlanGroupedWithProratedMinimumPrice::OrHash, - Orb::NewPlanGroupedWithMeteredMinimumPrice::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::OrHash, - Orb::NewPlanMatrixWithDisplayNamePrice::OrHash, - Orb::NewPlanGroupedTieredPackagePrice::OrHash, - Orb::NewPlanMaxGroupTieredPackagePrice::OrHash, - Orb::NewPlanScalableMatrixWithUnitPricingPrice::OrHash, - Orb::NewPlanScalableMatrixWithTieredPricingPrice::OrHash, - Orb::NewPlanCumulativeGroupedBulkPrice::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, - Orb::NewPlanMinimumCompositePrice::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput::OrHash - ) - ) - ).returns(T.attached_class) - end - def self.new( - # The id of the price on the plan to replace in the plan. - replaces_price_id:, - # The allocation price to add to the plan. - allocation_price: nil, - # The license allocation price to add to the plan. - license_allocation_price: nil, - # The phase to replace this price from. - plan_phase_order: nil, - # New plan price request body params. - price: nil - ) - end - - sig do - override.returns( - { - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice), - license_allocation_price: - T.nilable( - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput - ) - ), - plan_phase_order: T.nilable(Integer), - price: - T.nilable( - T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewPlanMinimumCompositePrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput - ) - ) - } - ) - end - def to_hash - end - - # The license allocation price to add to the plan. - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - Variants = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput - ) - end - - class Unit < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit pricing - sig { returns(Orb::UnitConfig) } - attr_reader :unit_config - - sig { params(unit_config: Orb::UnitConfig::OrHash).void } - attr_writer :unit_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation::OrHash - ], - name: String, - unit_config: Orb::UnitConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit pricing - unit_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Tiered < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered pricing - sig { returns(Orb::TieredConfig) } - attr_reader :tiered_config - - sig { params(tiered_config: Orb::TieredConfig::OrHash).void } - attr_writer :tiered_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation::OrHash - ], - name: String, - tiered_config: Orb::TieredConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered pricing - tiered_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_config: Orb::TieredConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Bulk < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk pricing - sig { returns(Orb::BulkConfig) } - attr_reader :bulk_config - - sig { params(bulk_config: Orb::BulkConfig::OrHash).void } - attr_writer :bulk_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_config: Orb::BulkConfig::OrHash, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk pricing - bulk_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk - ) - end - - sig do - override.returns( - { - bulk_config: Orb::BulkConfig, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class BulkWithFilters < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_filters pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig - ) - end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_filters - ) - end - - sig do - override.returns( - { - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash - ) - end - - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - ) - end - attr_accessor :filters - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_filters pricing - sig do - params( - filters: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - filters: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - } - ) - end - def to_hash - end - - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter, - Orb::Internal::AnyHash - ) - end - - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match - sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params( - property_key: String, - property_value: String - ).returns(T.attached_class) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { - unit_amount: String, - tier_lower_bound: T.nilable(String) - } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Package < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for package pricing - sig { returns(Orb::PackageConfig) } - attr_reader :package_config - - sig { params(package_config: Orb::PackageConfig::OrHash).void } - attr_writer :package_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation::OrHash - ], - name: String, - package_config: Orb::PackageConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for package pricing - package_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :package - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation - ], - model_type: Symbol, - name: String, - package_config: Orb::PackageConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Matrix < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix pricing - sig { returns(Orb::MatrixConfig) } - attr_reader :matrix_config - - sig { params(matrix_config: Orb::MatrixConfig::OrHash).void } - attr_writer :matrix_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation::OrHash - ], - matrix_config: Orb::MatrixConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix pricing - matrix_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation - ], - matrix_config: Orb::MatrixConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for threshold_total_amount pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig - ) - end - attr_reader :threshold_total_amount_config - - sig do - params( - threshold_total_amount_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash - ).void - end - attr_writer :threshold_total_amount_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation::OrHash - ], - name: String, - threshold_total_amount_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for threshold_total_amount pricing - threshold_total_amount_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :threshold_total_amount - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ], - model_type: Symbol, - name: String, - threshold_total_amount_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - Orb::Internal::AnyHash - ) - end - - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ] - ) - end - attr_accessor :consumption_table - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate - - # Configuration for threshold_total_amount pricing - sig do - params( - consumption_table: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable::OrHash - ], - prorate: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - consumption_table:, - # If true, the unit price will be prorated to the billing period - prorate: nil - ) - end - - sig do - override.returns( - { - consumption_table: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ], - prorate: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - - class ConsumptionTable < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :threshold - - # Total amount for this threshold - sig { returns(String) } - attr_accessor :total_amount - - # Configuration for a single threshold - sig do - params(threshold: String, total_amount: String).returns( - T.attached_class - ) - end - def self.new( - threshold:, - # Total amount for this threshold - total_amount: - ) - end - - sig do - override.returns( - { threshold: String, total_amount: String } - ) - end - def to_hash - end - end - end - end - - class TieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_package pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig - ) - end - attr_reader :tiered_package_config - - sig do - params( - tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::OrHash - ).void - end - attr_writer :tiered_package_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation::OrHash - ], - name: String, - tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_package pricing - tiered_package_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package pricing - sig do - params( - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - tiers: - ) - end - - sig do - override.returns( - { - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Price per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier with business logic - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Price per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - end - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_minimum pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig - ) - end - attr_reader :tiered_with_minimum_config - - sig do - params( - tiered_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_with_minimum_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation::OrHash - ], - name: String, - tiered_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_with_minimum pricing - tiered_with_minimum_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ] - ) - end - attr_accessor :tiers - - # If true, tiers with an accrued amount of 0 will not be included in the rating. - sig { returns(T.nilable(T::Boolean)) } - attr_reader :hide_zero_amount_tiers - - sig { params(hide_zero_amount_tiers: T::Boolean).void } - attr_writer :hide_zero_amount_tiers - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_reader :prorate - - sig { params(prorate: T::Boolean).void } - attr_writer :prorate - - # Configuration for tiered_with_minimum pricing - sig do - params( - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier::OrHash - ], - hide_zero_amount_tiers: T::Boolean, - prorate: T::Boolean - ).returns(T.attached_class) - end - def self.new( - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - tiers:, - # If true, tiers with an accrued amount of 0 will not be included in the rating. - hide_zero_amount_tiers: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ], - hide_zero_amount_tiers: T::Boolean, - prorate: T::Boolean - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :minimum_amount - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params( - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - minimum_amount:, - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - end - - class GroupedTiered < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_tiered pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig - ) - end - attr_reader :grouped_tiered_config - - sig do - params( - grouped_tiered_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash - ).void - end - attr_writer :grouped_tiered_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered pricing - grouped_tiered_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - Orb::Internal::AnyHash - ) - end - - # The billable metric property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - # Apply tiered pricing to each segment generated after grouping with the provided - # key - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered pricing - sig do - params( - grouping_key: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The billable metric property used to group before tiering - grouping_key:, - # Apply tiered pricing to each segment generated after grouping with the provided - # key - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_package_with_minimum pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig - ) - end - attr_reader :tiered_package_with_minimum_config - - sig do - params( - tiered_package_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_package_with_minimum_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation::OrHash - ], - name: String, - tiered_package_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_package_with_minimum pricing - tiered_package_with_minimum_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_package_with_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_package_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(Float) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package_with_minimum pricing - sig do - params( - package_size: Float, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - package_size: Float, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :minimum_amount - - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params( - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - ).returns(T.attached_class) - end - def self.new(minimum_amount:, per_unit:, tier_lower_bound:) - end - - sig do - override.returns( - { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - ) - end - def to_hash - end - end - end - end - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for package_with_allocation pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig - ) - end - attr_reader :package_with_allocation_config - - sig do - params( - package_with_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash - ).void - end - attr_writer :package_with_allocation_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation::OrHash - ], - name: String, - package_with_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for package_with_allocation pricing - package_with_allocation_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :package_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - package_with_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :allocation - - sig { returns(String) } - attr_accessor :package_amount - - sig { returns(String) } - attr_accessor :package_size - - # Configuration for package_with_allocation pricing - sig do - params( - allocation: String, - package_amount: String, - package_size: String - ).returns(T.attached_class) - end - def self.new(allocation:, package_amount:, package_size:) - end - - sig do - override.returns( - { - allocation: String, - package_amount: String, - package_size: String - } - ) - end - def to_hash - end - end - end - - class UnitWithPercent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_percent pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig - ) - end - attr_reader :unit_with_percent_config - - sig do - params( - unit_with_percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash - ).void - end - attr_writer :unit_with_percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation::OrHash - ], - name: String, - unit_with_percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_percent pricing - unit_with_percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent, out of 100, of the calculated total to charge - sig { returns(String) } - attr_accessor :percent - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_percent pricing - sig do - params(percent: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # What percent, out of 100, of the calculated total to charge - percent:, - # Rate per unit of usage - unit_amount: - ) - end - - sig do - override.returns({ percent: String, unit_amount: String }) - end - def to_hash - end - end - end - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_allocation pricing - sig { returns(Orb::MatrixWithAllocationConfig) } - attr_reader :matrix_with_allocation_config - - sig do - params( - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash - ).void - end - attr_writer :matrix_with_allocation_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation::OrHash - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_allocation pricing - matrix_with_allocation_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation::OrHash - ], - name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class UnitWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_proration pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig - ) - end - attr_reader :unit_with_proration_config - - sig do - params( - unit_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash - ).void - end - attr_writer :unit_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation::OrHash - ], - name: String, - unit_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_proration pricing - unit_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_proration pricing - sig { params(unit_amount: String).returns(T.attached_class) } - def self.new( - # Rate per unit of usage - unit_amount: - ) - end - - sig { override.returns({ unit_amount: String }) } - def to_hash - end - end - end - - class GroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_allocation pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig - ) - end - attr_reader :grouped_allocation_config - - sig do - params( - grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash - ).void - end - attr_writer :grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_allocation pricing - grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # Usage allocation per group - sig { returns(String) } - attr_accessor :allocation - - # How to determine the groups that should each be allocated some quantity - sig { returns(String) } - attr_accessor :grouping_key - - # Unit rate for post-allocation - sig { returns(String) } - attr_accessor :overage_unit_rate - - # Configuration for grouped_allocation pricing - sig do - params( - allocation: String, - grouping_key: String, - overage_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # Usage allocation per group - allocation:, - # How to determine the groups that should each be allocated some quantity - grouping_key:, - # Unit rate for post-allocation - overage_unit_rate: - ) - end - - sig do - override.returns( - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class BulkWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_proration pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig - ) - end - attr_reader :bulk_with_proration_config - - sig do - params( - bulk_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash - ).void - end - attr_writer :bulk_with_proration_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_proration pricing - bulk_with_proration_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_proration - ) - end - - sig do - override.returns( - { - bulk_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Cost per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier with proration - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Cost per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { - unit_amount: String, - tier_lower_bound: T.nilable(String) - } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_prorated_minimum pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - ) - end - attr_reader :grouped_with_prorated_minimum_config - - sig do - params( - grouped_with_prorated_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_prorated_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_prorated_minimum pricing - grouped_with_prorated_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_prorated_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # How to determine the groups that should each have a minimum - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group - sig { returns(String) } - attr_accessor :minimum - - # The amount to charge per unit - sig { returns(String) } - attr_accessor :unit_rate - - # Configuration for grouped_with_prorated_minimum pricing - sig do - params( - grouping_key: String, - minimum: String, - unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # How to determine the groups that should each have a minimum - grouping_key:, - # The minimum amount to charge per group - minimum:, - # The amount to charge per unit - unit_rate: - ) - end - - sig do - override.returns( - { grouping_key: String, minimum: String, unit_rate: String } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_metered_minimum pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig - ) - end - attr_reader :grouped_with_metered_minimum_config - - sig do - params( - grouped_with_metered_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_metered_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_metered_minimum pricing - grouped_with_metered_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_metered_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group per unit - sig { returns(String) } - attr_accessor :minimum_unit_amount - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :pricing_key - - # Scale the unit rates by the scaling factor. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ] - ) - end - attr_accessor :scaling_factors - - # Used to determine the unit rate scaling factor - sig { returns(String) } - attr_accessor :scaling_key - - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for grouped_with_metered_minimum pricing - sig do - params( - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor::OrHash - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - grouping_key:, - # The minimum amount to charge per group per unit - minimum_unit_amount:, - # Used to determine the unit rate - pricing_key:, - # Scale the unit rates by the scaling factor. - scaling_factors:, - # Used to determine the unit rate scaling factor - scaling_key:, - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - unit_amounts: - ) - end - - sig do - override.returns( - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class ScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(String) } - attr_accessor :scaling_value - - # Configuration for a scaling factor - sig do - params( - scaling_factor: String, - scaling_value: String - ).returns(T.attached_class) - end - def self.new(scaling_factor:, scaling_value:) - end - - sig do - override.returns( - { scaling_factor: String, scaling_value: String } - ) - end - def to_hash - end - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :pricing_value - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount - sig do - params(pricing_value: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - pricing_value:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { pricing_value: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_min_max_thresholds - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: - ) - end - - sig do - override.returns( - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_display_name pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig - ) - end - attr_reader :matrix_with_display_name_config - - sig do - params( - matrix_with_display_name_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash - ).void - end - attr_writer :matrix_with_display_name_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation::OrHash - ], - matrix_with_display_name_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_display_name pricing - matrix_with_display_name_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_display_name - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ], - matrix_with_display_name_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :dimension - - # Apply per unit pricing to each dimension value - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for matrix_with_display_name pricing - sig do - params( - dimension: String, - unit_amounts: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - dimension:, - # Apply per unit pricing to each dimension value - unit_amounts: - ) - end - - sig do - override.returns( - { - dimension: String, - unit_amounts: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - # The dimension value - sig { returns(String) } - attr_accessor :dimension_value - - # Display name for this dimension value - sig { returns(String) } - attr_accessor :display_name - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount item - sig do - params( - dimension_value: String, - display_name: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The dimension value - dimension_value:, - # Display name for this dimension value - display_name:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { - dimension_value: String, - display_name: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - end - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_tiered_package pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig - ) - end - attr_reader :grouped_tiered_package_config - - sig do - params( - grouped_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash - ).void - end - attr_writer :grouped_tiered_package_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered_package pricing - grouped_tiered_package_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering - grouping_key:, - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for max_group_tiered_package pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - ) - end - attr_reader :max_group_tiered_package_config - - sig do - params( - max_group_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash - ).void - end - attr_writer :max_group_tiered_package_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation::OrHash - ], - max_group_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for max_group_tiered_package pricing - max_group_tiered_package_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :max_group_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ], - max_group_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering the group with the highest value - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing to the largest group after grouping with the provided key. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for max_group_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering the group with the highest value - grouping_key:, - package_size:, - # Apply tiered pricing to the largest group after grouping with the provided key. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - ) - end - attr_reader :scalable_matrix_with_unit_pricing_config - - sig do - params( - scalable_matrix_with_unit_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_unit_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_unit_pricing pricing - scalable_matrix_with_unit_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_unit_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - # The final unit price to rate against the output of the matrix - sig { returns(String) } - attr_accessor :unit_price - - # The property used to group this price - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate - - # Used to determine the unit rate (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor::OrHash - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - # The final unit price to rate against the output of the matrix - unit_price:, - # The property used to group this price - grouping_key: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil, - # Used to determine the unit rate (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig - ) - end - attr_reader :scalable_matrix_with_tiered_pricing_config - - sig do - params( - scalable_matrix_with_tiered_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_tiered_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_tiered_pricing pricing - scalable_matrix_with_tiered_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_tiered_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used for the scalable matrix first dimension - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Used for the scalable matrix second dimension (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor::OrHash - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier::OrHash - ], - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used for the scalable matrix first dimension - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - tiers:, - # Used for the scalable matrix second dimension (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ], - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier entry with business logic - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new(tier_lower_bound:, unit_amount:) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_bulk pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig - ) - end - attr_reader :cumulative_grouped_bulk_config - - sig do - params( - cumulative_grouped_bulk_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_bulk_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_bulk pricing - cumulative_grouped_bulk_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_bulk - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - Orb::Internal::AnyHash - ) - end - - # Each tier lower bound must have the same group of values. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ] - ) - end - attr_accessor :dimension_values - - sig { returns(String) } - attr_accessor :group - - # Configuration for cumulative_grouped_bulk pricing - sig do - params( - dimension_values: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue::OrHash - ], - group: String - ).returns(T.attached_class) - end - def self.new( - # Each tier lower bound must have the same group of values. - dimension_values:, - group: - ) - end - - sig do - override.returns( - { - dimension_values: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ], - group: String - } - ) - end - def to_hash - end - - class DimensionValue < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue, - Orb::Internal::AnyHash - ) - end - - # Grouping key value - sig { returns(String) } - attr_accessor :grouping_key - - # Tier lower bound - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Unit amount for this combination - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a dimension value entry - sig do - params( - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # Grouping key value - grouping_key:, - # Tier lower bound - tier_lower_bound:, - # Unit amount for this combination - unit_amount: - ) - end - - sig do - override.returns( - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_allocation pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - ) - end - attr_reader :cumulative_grouped_allocation_config - - sig do - params( - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } + # 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::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 - - # 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 - ) + ) + ) + end + attr_accessor :price - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::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::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 ) - end - def self.values - end - end + ) + ).returns(T.attached_class) + end + def self.new( + # The id of the price on the plan to replace in the plan. + replaces_price_id:, + # The allocation price to add to the plan. + allocation_price: nil, + # The license allocation price to add to the plan. + license_allocation_price: nil, + # The phase to replace this price from. + plan_phase_order: nil, + # New plan price request body params. + price: nil + ) + end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do + 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::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - Orb::Internal::AnyHash + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewPlanMinimumCompositePrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput ) - end - - # The 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 + def to_hash + end + + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice, + Orb::Internal::AnyHash + ) end - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end + # The cadence to bill for this price on. + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol + ) + end + attr_accessor :cadence - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # License allocations to associate with this price. Each entry defines a + # 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 - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # The pricing model type + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol + ) + end + attr_accessor :model_type - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license 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 name of the price. + sig { returns(String) } + attr_accessor :name - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end + # 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 - class MinimumComposite < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_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::ReplacePrice::LicenseAllocationPrice::MinimumComposite, - Orb::Internal::AnyHash + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::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 - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration - # Configuration for minimum_composite pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig - ) - end - attr_reader :minimum_composite_config + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration - sig do - params( - minimum_composite_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash - ).void - end - attr_writer :minimum_composite_config + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity - # The name of the price. - sig { returns(String) } - attr_accessor :name + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_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 - # If the Price represents a fixed cost, the price will be billed 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( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the 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 conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate + # A transient ID that 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 configuration for the rate of the price currency to the invoicing currency. - sig do - returns( + # 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, - Orb::TieredConversionRateConfig + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash ) - ) - ) - end - attr_accessor :conversion_rate_config - + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + license_allocations:, + # The pricing model type + model_type:, + # The name of the price. + name:, + # Configuration for unit pricing + unit_config:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, # An ISO 4217 currency string, or custom pricing unit identifier, in which this # price is billed. - 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::MinimumComposite::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, item_id: String, license_allocations: T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation::OrHash + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation ], - minimum_composite_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash, + 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:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. 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 + 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::MinimumComposite::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ], - minimum_composite_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } + 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::MinimumComposite::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ] + 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 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 amount of credits 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 - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end 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 + # The pricing model type + module ModelType + extend Orb::Internal::Type::Enum - # Configuration for minimum_composite pricing - sig do - params(minimum_amount: String, prorated: T::Boolean).returns( - T.attached_class + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType ) 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 + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNIT = + T.let( + :unit, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol ) - end - sig do - override.returns( - { minimum_amount: String, prorated: T::Boolean } - ) - end - def to_hash - end + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ] + ) + end + def self.values end end + end - class Percent < Orb::Internal::Type::BaseModel + # New plan price request body params. + module Price + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewPlanMinimumCompositePrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput + ) + end + + class BulkWithFilters < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, + 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::Percent::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation - ] + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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) } attr_accessor :model_type - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for percent pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig - ) - end - attr_reader :percent_config - - sig do - params( - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_config + # The name of the price. + sig { returns(String) } + attr_accessor :name # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -31798,16 +5244,12 @@ module Orb sig do params( + bulk_with_filters_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation::OrHash - ], name: String, - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -31835,18 +5277,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 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,24 +5323,20 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :percent + 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::Percent::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation - ], model_type: Symbol, name: String, - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -31932,6 +5366,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 @@ -31940,7 +5527,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -31948,172 +5535,67 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::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::Percent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent - - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } - def self.new( - # What percent of the component subtotals to charge - percent: - ) - end - - sig { override.returns({ percent: Float }) } - def to_hash - end - end end - class EventOutput < Orb::Internal::Type::BaseModel + 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 +5604,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for tiered_with_proration pricing + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -32223,15 +5721,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 +5755,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 +5799,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 +5807,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 +5850,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 +5858,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 +5897,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 +6134,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 +6159,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 +6264,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 +6272,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 +6384,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 +6417,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 +6518,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 +6552,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 +6596,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 +6604,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 +6647,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 +6655,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 +6694,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 +6767,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 +6901,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 +6935,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 +6979,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 +6987,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 +7030,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 +7038,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 +7077,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 +7222,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 +7356,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 +7390,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 +7434,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 +7442,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 +7485,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 +7493,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 +7532,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..a684dceb 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)) } @@ -357,6 +335,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 +351,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: @@ -437,6 +385,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 +412,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: @@ -528,6 +446,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 +459,509 @@ module Orb def to_hash end - # The license allocation price to add to the plan. - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - Variants = + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice, + Orb::Internal::AnyHash ) end - class Unit < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do + # The cadence to bill for this price on. + sig do + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations + + # The pricing model type + sig do + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::OrSymbol + ) + end + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # Configuration for unit pricing + sig { returns(Orb::UnitConfig) } + attr_reader :unit_config + + sig { params(unit_config: Orb::UnitConfig::OrHash).void } + attr_writer :unit_config + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, - Orb::Internal::AnyHash + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol ) - end - attr_accessor :cadence + ) + end + attr_accessor :conversion_rate_config - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + # The license allocation price to add to the plan. + sig do + params( + cadence: + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::OrSymbol, + item_id: String, + license_allocations: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation::OrHash + ], + model_type: + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::OrSymbol, + name: String, + unit_config: Orb::UnitConfig::OrHash, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, # License allocations to associate with this price. Each entry defines a # per-license credit pool granted each cadence. Requires license_type_id or # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - + license_allocations:, # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - + model_type:, # The name of the price. - sig { returns(String) } - attr_accessor :name - + name:, # Configuration for unit pricing - sig { returns(Orb::UnitConfig) } - attr_reader :unit_config - - sig { params(unit_config: Orb::UnitConfig::OrHash).void } - attr_writer :unit_config - + unit_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - + billable_metric_id: nil, # If the Price represents a fixed cost, the price will be billed in-advance if # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - + billed_in_advance: nil, # For custom cadence: specifies the duration of the billing period in days or # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - + billing_cycle_configuration: nil, # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - + conversion_rate: nil, # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - + conversion_rate_config: nil, # An ISO 4217 currency string, or custom pricing unit identifier, in which this # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - + currency: nil, # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - + dimensional_price_configuration: nil, # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - + external_price_id: nil, # If the Price represents a fixed cost, this represents the quantity of units # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - + fixed_price_quantity: nil, # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - + invoice_grouping_key: nil, # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - + invoicing_cycle_configuration: nil, # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - + license_type_id: nil, # User-specified key/value pairs for the resource. Individual keys can be removed # by setting the value to `null`, and the entire metadata mapping can be cleared # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - + metadata: nil, # A transient ID that can be used to reference this price when adding adjustments # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id + reference_id: nil + ) + end - sig do - params( + sig do + override.returns( + { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::OrSymbol, item_id: String, license_allocations: T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation::OrHash + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation ], + model_type: + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::OrSymbol, name: String, - unit_config: Orb::UnitConfig::OrHash, + unit_config: Orb::UnitConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + T.nilable(Orb::NewBillingCycleConfiguration), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig ) ), currency: T.nilable(String), dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + T.nilable(Orb::NewDimensionalPriceConfiguration), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + T.nilable(Orb::NewBillingCycleConfiguration), license_type_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit pricing - unit_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit + reference_id: T.nilable(String) + } ) - end + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) sig do override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ] ) end - def to_hash + def self.values end + end - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ] + class LicenseAllocation < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation, + Orb::Internal::AnyHash ) end - def self.values - end - end - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation, - Orb::Internal::AnyHash - ) - end + # The amount of credits granted per active license per cadence. + sig { returns(String) } + attr_accessor :amount - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount + # The currency of the license allocation. + sig { returns(String) } + attr_accessor :currency - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # When True, overage beyond the allocation is written off. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :write_off_overage + sig do + params( + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + ).returns(T.attached_class) + end + def self.new( + # The amount of credits granted per active license per cadence. + amount:, + # The currency of the license allocation. + currency:, # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + write_off_overage: nil + ) + end - sig do - params( + sig do + override.returns( + { amount: String, currency: String, write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + } ) - end + end + def to_hash + end + end - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } + # The pricing model type + module ModelType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType ) end - def to_hash - end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNIT = + T.let( + :unit, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ] + ) + end + def self.values end end + end + + # New plan price request body params. + module Price + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::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 +971,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 +1071,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 +1104,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 +1150,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 +1193,224 @@ module Orb def to_hash end - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol + end + attr_accessor :filters + + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] ) + end + attr_accessor :tiers + + # Configuration for bulk_with_filters pricing + sig do + params( + filters: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + ], + tiers: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Property filters to apply (all must match) + filters:, + # Bulk tiers for rating based on total usage volume + tiers: + ) + end sig do override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ] + { + filters: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + } ) end - def self.values + def to_hash end - end - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation, - Orb::Internal::AnyHash + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Internal::AnyHash + ) + end + + # Event property key to filter on + sig { returns(String) } + attr_accessor :property_key + + # Event property value to match + sig { returns(String) } + attr_accessor :property_value + + # Configuration for a single property filter + sig do + params(property_key: String, property_value: String).returns( + T.attached_class ) end + def self.new( + # Event property key to filter on + property_key:, + # Event property value to match + property_value: + ) + end - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount + sig do + override.returns( + { property_key: String, property_value: String } + ) + end + def to_hash + end + end - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::Internal::AnyHash + ) + end - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) + # The lower bound for this tier + sig { returns(T.nilable(String)) } + attr_accessor :tier_lower_bound + + # Configuration for a single bulk pricing tier + sig do + params( + unit_amount: String, + tier_lower_bound: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Amount per unit + unit_amount:, + # The lower bound for this tier + tier_lower_bound: nil + ) + end + + sig do + override.returns( + { unit_amount: String, tier_lower_bound: T.nilable(String) } + ) + end + def to_hash + end end + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) sig do override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ] ) end - def to_hash + def self.values end end end - class Bulk < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Internal::AnyHash ) end - # Configuration for bulk pricing - sig { returns(Orb::BulkConfig) } - attr_reader :bulk_config - - sig { params(bulk_config: Orb::BulkConfig::OrHash).void } - attr_writer :bulk_config - # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol ) end attr_accessor :cadence @@ -1382,18 +1419,6 @@ module Orb sig { returns(String) } attr_accessor :item_id - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -1402,6 +1427,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for tiered_with_proration pricing + sig do + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -1502,15 +1543,12 @@ module Orb sig do params( - bulk_config: Orb::BulkConfig::OrHash, cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation::OrHash - ], name: String, + tiered_with_proration_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1538,18 +1576,14 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk pricing - bulk_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, + # Configuration for tiered_with_proration pricing + tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -1588,23 +1622,20 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk + model_type: :tiered_with_proration ) end sig do override.returns( { - bulk_config: Orb::BulkConfig, cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ], model_type: Symbol, name: String, + tiered_with_proration_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1642,7 +1673,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1650,38 +1681,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ] ) end @@ -1689,107 +1720,134 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - + # Tiers for rating based on total usage quantities into the specified tier with + # proration + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] + ) + end + attr_accessor :tiers + + # Configuration for tiered_with_proration pricing sig do params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + tiers: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash + ] ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # Tiers for rating based on total usage quantities into the specified tier with + # proration + tiers: ) end sig do override.returns( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + tiers: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] } ) end def to_hash end + + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, + Orb::Internal::AnyHash + ) + end + + # Inclusive tier starting value + sig { returns(String) } + attr_accessor :tier_lower_bound + + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount + + # Configuration for a single tiered with proration tier + sig do + params(tier_lower_bound: String, unit_amount: String).returns( + T.attached_class + ) + end + def self.new( + # Inclusive tier starting value + tier_lower_bound:, + # Amount per unit + unit_amount: + ) + end + + sig do + override.returns( + { tier_lower_bound: String, unit_amount: String } + ) + end + def to_hash + end + end end end - class BulkWithFilters < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end - # Configuration for bulk_with_filters pricing + # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol ) end - attr_reader :bulk_with_filters_config + attr_accessor :cadence + # Configuration for grouped_with_min_max_thresholds pricing sig do - params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + ) end - attr_writer :bulk_with_filters_config + attr_reader :grouped_with_min_max_thresholds_config - # The cadence to bill for this price on. sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol - ) + params( + grouped_with_min_max_thresholds_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + ).void end - attr_accessor :cadence + attr_writer :grouped_with_min_max_thresholds_config # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -1898,15 +1956,11 @@ module Orb sig do params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation::OrHash - ], name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -1935,16 +1989,12 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, + # Configuration for grouped_with_min_max_thresholds pricing + grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -1985,22 +2035,18 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk_with_filters + model_type: :grouped_with_min_max_thresholds ) end sig do override.returns( { - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ], model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -2032,295 +2078,159 @@ module Orb def to_hash end - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence ) end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ] + ANNUAL = + T.let( + :annual, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) - end - attr_accessor :filters - # Bulk tiers for rating based on total usage volume sig do - returns( + override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ] ) end - attr_accessor :tiers + def self.values + end + end - # Configuration for bulk_with_filters pricing + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::Internal::AnyHash + ) + end + + # The event property used to group before applying thresholds + sig { returns(String) } + attr_accessor :grouping_key + + # The maximum amount to charge each group + sig { returns(String) } + attr_accessor :maximum_charge + + # The minimum amount to charge each group, regardless of usage + sig { returns(String) } + attr_accessor :minimum_charge + + # The base price charged per group + sig { returns(String) } + attr_accessor :per_unit_rate + + # Configuration for grouped_with_min_max_thresholds pricing sig do params( - filters: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ).returns(T.attached_class) end def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: + # The event property used to group before applying thresholds + grouping_key:, + # The maximum amount to charge each group + maximum_charge:, + # The minimum amount to charge each group, regardless of usage + minimum_charge:, + # The base price charged per group + per_unit_rate: ) end sig do override.returns( { - filters: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } ) end def to_hash end + end + end - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter, - Orb::Internal::AnyHash - ) - end - - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match - sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params(property_key: String, property_value: String).returns( - T.attached_class - ) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } - ) - end - def to_hash - end - end - end + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::Internal::AnyHash + ) + end # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + sig do + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end end - end - - class Package < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, - Orb::Internal::AnyHash - ) - end + attr_accessor :cadence - # The cadence to bill for this price on. + # Configuration for cumulative_grouped_allocation pricing sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig ) end - attr_accessor :cadence + attr_reader :cumulative_grouped_allocation_config + + sig do + params( + cumulative_grouped_allocation_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + ).void + end + attr_writer :cumulative_grouped_allocation_config # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -2329,13 +2239,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 +2340,11 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation::OrHash - ], name: String, - package_config: Orb::PackageConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2474,16 +2374,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, - # Configuration for package pricing - package_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -2522,7 +2418,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :package + model_type: :cumulative_grouped_allocation ) end @@ -2530,15 +2426,12 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation - ], model_type: Symbol, name: String, - package_config: Orb::PackageConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2576,7 +2469,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2584,38 +2477,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ] ) end @@ -2623,50 +2516,59 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. + # The overall allocation across all groups sig { returns(String) } - attr_accessor :amount + attr_accessor :cumulative_allocation - # The currency of the license allocation. + # The allocation per individual group sig { returns(String) } - attr_accessor :currency + attr_accessor :group_allocation - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # The event property used to group usage before applying allocations + sig { returns(String) } + attr_accessor :grouping_key + + # The amount to charge for each unit outside of the allocation + sig { returns(String) } + attr_accessor :unit_amount + # Configuration for cumulative_grouped_allocation pricing sig do params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # The overall allocation across all groups + cumulative_allocation:, + # The allocation per individual group + group_allocation:, + # The event property used to group usage before applying allocations + grouping_key:, + # The amount to charge for each unit outside of the allocation + unit_amount: ) end sig do override.returns( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } ) end @@ -2675,11 +2577,11 @@ module Orb end end - class Matrix < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -2687,33 +2589,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::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::Matrix::LicenseAllocation - ] + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_accessor :license_allocations - - # Configuration for matrix pricing - sig { returns(Orb::MatrixConfig) } - attr_reader :matrix_config + attr_reader :daily_credit_allowance_config - sig { params(matrix_config: Orb::MatrixConfig::OrHash).void } - attr_writer :matrix_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) } @@ -2824,13 +2723,10 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::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::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 +2757,10 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. 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 +2801,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :matrix + model_type: :daily_credit_allowance ) end @@ -2917,13 +2809,10 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::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::Matrix::LicenseAllocation - ], - matrix_config: Orb::MatrixConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -2963,7 +2852,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2971,38 +2860,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -3010,63 +2899,144 @@ 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::Matrix::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 + attr_accessor :default_unit_amount - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions + + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + sig { returns(String) } + attr_accessor :event_day_property + + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + # Configuration for daily_credit_allowance pricing sig do params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: 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( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -3074,7 +3044,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence @@ -3083,17 +3053,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::ThresholdTotalAmount::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) } @@ -3103,22 +3077,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 +3178,11 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation::OrHash - ], + metered_allowance_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::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: @@ -3260,14 +3214,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 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 +3256,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :threshold_total_amount + model_type: :metered_allowance ) end @@ -3314,16 +3264,12 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ], + metered_allowance_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, 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 +3307,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3369,38 +3315,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -3408,157 +3354,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::ThresholdTotalAmount::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 ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - Orb::Internal::AnyHash - ) - end + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ] - ) - end - attr_accessor :consumption_table + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name - # Configuration for threshold_total_amount pricing + # Configuration for metered_allowance pricing sig do params( - consumption_table: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable::OrHash - ], - prorate: T.nilable(T::Boolean) + 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( - # 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 + # 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( { - consumption_table: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ], - prorate: T.nilable(T::Boolean) + 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 ConsumptionTable < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :threshold - - # Total amount for this threshold - sig { returns(String) } - attr_accessor :total_amount - - # Configuration for a single threshold - sig do - params(threshold: String, total_amount: String).returns( - T.attached_class - ) - end - def self.new( - threshold:, - # Total amount for this threshold - total_amount: - ) - end - - sig do - override.returns({ threshold: String, total_amount: String }) - end - def to_hash - end - end end end - class TieredPackage < Orb::Internal::Type::BaseModel + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Internal::AnyHash ) end @@ -3566,7 +3459,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::Percent::Cadence::OrSymbol ) end attr_accessor :cadence @@ -3575,18 +3468,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::TieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -3595,21 +3476,21 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for tiered_package pricing + # Configuration for percent pricing sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig ) end - attr_reader :tiered_package_config + attr_reader :percent_config sig do params( - tiered_package_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::OrHash + percent_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash ).void end - attr_writer :tiered_package_config + attr_writer :percent_config # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -3712,15 +3593,11 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation::OrHash - ], name: String, - tiered_package_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::OrHash, + 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: @@ -3752,14 +3629,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_package pricing - tiered_package_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, @@ -3798,7 +3671,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_package + model_type: :percent ) end @@ -3806,16 +3679,12 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ], model_type: Symbol, name: String, - tiered_package_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, + percent_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3853,7 +3722,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3861,38 +3730,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ] ) end @@ -3900,188 +3769,69 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class PercentConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # What percent of the component subtotals to charge + sig { returns(Float) } + attr_accessor :percent - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end + # Configuration for percent pricing + sig { params(percent: Float).returns(T.attached_class) } def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # What percent of the component subtotals to charge + percent: ) end - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end + sig { override.returns({ percent: Float }) } def to_hash end end + end - class TieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package pricing - sig do - params( - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - tiers: - ) - end - - sig do - override.returns( - { - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Price per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier with business logic - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Price per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - end - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Internal::AnyHash + 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::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol ) end attr_accessor :cadence - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. + # Configuration for event_output pricing sig do returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ] + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig ) end - attr_accessor :license_allocations + attr_reader :event_output_config + + sig do + params( + event_output_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash + ).void + end + attr_writer :event_output_config + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id # The pricing model type sig { returns(Symbol) } @@ -4091,22 +3841,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for tiered_with_minimum pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig - ) - end - attr_reader :tiered_with_minimum_config - - sig do - params( - tiered_with_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_with_minimum_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -4208,15 +3942,11 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation::OrHash - ], name: String, - tiered_with_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4246,16 +3976,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_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, @@ -4294,7 +4020,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_with_minimum + model_type: :event_output ) end @@ -4302,16 +4028,12 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ], model_type: Symbol, name: String, - tiered_with_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4349,7 +4071,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -4357,38 +4079,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ] ) end @@ -4396,27222 +4118,978 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class EventOutputConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. + # The key in the event data to extract the unit rate from. sig { returns(String) } - attr_accessor :amount + attr_accessor :unit_rating_key - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + sig { returns(T.nilable(String)) } + attr_accessor :default_unit_rate - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + sig { returns(T.nilable(String)) } + attr_accessor :grouping_key + # Configuration for event_output pricing sig do params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # The key in the event data to extract the unit rate from. + unit_rating_key:, + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + default_unit_rate: nil, + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + grouping_key: nil ) end sig do override.returns( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) } ) end def to_hash end end + end - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ] - ) - end - attr_accessor :tiers - - # If true, tiers with an accrued amount of 0 will not be included in the rating. - sig { returns(T.nilable(T::Boolean)) } - attr_reader :hide_zero_amount_tiers + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Variants + ] + ) + end + def self.variants + end + end + end - sig { params(hide_zero_amount_tiers: T::Boolean).void } - attr_writer :hide_zero_amount_tiers + class RemoveAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::RemoveAdjustment, + Orb::Internal::AnyHash + ) + end - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_reader :prorate + # The id of the adjustment to remove from on the plan. + sig { returns(String) } + attr_accessor :adjustment_id - sig { params(prorate: T::Boolean).void } - attr_writer :prorate + # The phase to remove this adjustment from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order - # Configuration for tiered_with_minimum pricing - sig do - params( - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier::OrHash - ], - hide_zero_amount_tiers: T::Boolean, - prorate: T::Boolean - ).returns(T.attached_class) - end - def self.new( - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - tiers:, - # If true, tiers with an accrued amount of 0 will not be included in the rating. - hide_zero_amount_tiers: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil - ) - end + sig do + 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( - { - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ], - hide_zero_amount_tiers: T::Boolean, - prorate: T::Boolean - } - ) - end - def to_hash - end + sig do + override.returns( + { adjustment_id: String, plan_phase_order: T.nilable(Integer) } + ) + end + def to_hash + end + 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 + class RemovePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::RemovePrice, + Orb::Internal::AnyHash + ) + end - sig { returns(String) } - attr_accessor :minimum_amount + # The id of the price to remove from the plan. + sig { returns(String) } + attr_accessor :price_id - sig { returns(String) } - attr_accessor :tier_lower_bound + # The phase to remove this price from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount + 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 - # 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( + { price_id: String, plan_phase_order: T.nilable(Integer) } + ) + end + def to_hash + end + end - sig do - override.returns( - { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplaceAdjustment, + Orb::Internal::AnyHash + ) end - class GroupedTiered < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, - 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::GroupedTiered::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 - # Configuration for grouped_tiered pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig - ) - end - attr_reader :grouped_tiered_config + # The phase to replace this adjustment from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order - sig do - params( - grouped_tiered_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash - ).void - end - attr_writer :grouped_tiered_config + 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 id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + 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 - # License allocations to associate with this price. Each entry defines a - # 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 - ] + # 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 - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - # The name of the price. - sig { returns(String) } - attr_accessor :name + 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 license allocation price to add to the plan. + sig do + returns( + T.nilable( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice + ) + ) + end + attr_reader :license_allocation_price - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) + sig do + params( + license_allocation_price: + T.nilable( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::OrHash ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration + ).void + end + attr_writer :license_allocation_price - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration + # The phase to replace this price from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered pricing - grouped_tiered_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - Orb::Internal::AnyHash - ) - end - - # The billable metric property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - # Apply tiered pricing to each segment generated after grouping with the provided - # key - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered pricing - sig do - params( - grouping_key: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The billable metric property used to group before tiering - grouping_key:, - # Apply tiered pricing to each segment generated after grouping with the provided - # key - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_package_with_minimum pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig - ) - end - attr_reader :tiered_package_with_minimum_config - - sig do - params( - tiered_package_with_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_package_with_minimum_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation::OrHash - ], - name: String, - tiered_package_with_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_package_with_minimum pricing - tiered_package_with_minimum_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_package_with_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_package_with_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(Float) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package_with_minimum pricing - sig do - params( - package_size: Float, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - package_size: Float, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :minimum_amount - - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params( - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - ).returns(T.attached_class) - end - def self.new(minimum_amount:, per_unit:, tier_lower_bound:) - end - - sig do - override.returns( - { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - ) - end - def to_hash - end - end - end - end - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for package_with_allocation pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig - ) - end - attr_reader :package_with_allocation_config - - sig do - params( - package_with_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash - ).void - end - attr_writer :package_with_allocation_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation::OrHash - ], - name: String, - package_with_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for package_with_allocation pricing - package_with_allocation_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :package_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - package_with_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :allocation - - sig { returns(String) } - attr_accessor :package_amount - - sig { returns(String) } - attr_accessor :package_size - - # Configuration for package_with_allocation pricing - sig do - params( - allocation: String, - package_amount: String, - package_size: String - ).returns(T.attached_class) - end - def self.new(allocation:, package_amount:, package_size:) - end - - sig do - override.returns( - { - allocation: String, - package_amount: String, - package_size: String - } - ) - end - def to_hash - end - end - end - - class UnitWithPercent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_percent pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig - ) - end - attr_reader :unit_with_percent_config - - sig do - params( - unit_with_percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash - ).void - end - attr_writer :unit_with_percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation::OrHash - ], - name: String, - unit_with_percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_percent pricing - unit_with_percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent, out of 100, of the calculated total to charge - sig { returns(String) } - attr_accessor :percent - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_percent pricing - sig do - params(percent: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # What percent, out of 100, of the calculated total to charge - percent:, - # Rate per unit of usage - unit_amount: - ) - end - - sig { override.returns({ percent: String, unit_amount: String }) } - def to_hash - end - end - end - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_allocation pricing - sig { returns(Orb::MatrixWithAllocationConfig) } - attr_reader :matrix_with_allocation_config - - sig do - params( - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash - ).void - end - attr_writer :matrix_with_allocation_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation::OrHash - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_allocation pricing - matrix_with_allocation_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation::OrHash - ], - name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class UnitWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_proration pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig - ) - end - attr_reader :unit_with_proration_config - - sig do - params( - unit_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash - ).void - end - attr_writer :unit_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation::OrHash - ], - name: String, - unit_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_proration pricing - unit_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_proration pricing - sig { params(unit_amount: String).returns(T.attached_class) } - def self.new( - # Rate per unit of usage - unit_amount: - ) - end - - sig { override.returns({ unit_amount: String }) } - def to_hash - end - end - end - - class GroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_allocation pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig - ) - end - attr_reader :grouped_allocation_config - - sig do - params( - grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash - ).void - end - attr_writer :grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_allocation pricing - grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # Usage allocation per group - sig { returns(String) } - attr_accessor :allocation - - # How to determine the groups that should each be allocated some quantity - sig { returns(String) } - attr_accessor :grouping_key - - # Unit rate for post-allocation - sig { returns(String) } - attr_accessor :overage_unit_rate - - # Configuration for grouped_allocation pricing - sig do - params( - allocation: String, - grouping_key: String, - overage_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # Usage allocation per group - allocation:, - # How to determine the groups that should each be allocated some quantity - grouping_key:, - # Unit rate for post-allocation - overage_unit_rate: - ) - end - - sig do - override.returns( - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class BulkWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_proration pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig - ) - end - attr_reader :bulk_with_proration_config - - sig do - params( - bulk_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash - ).void - end - attr_writer :bulk_with_proration_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash, - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_proration pricing - bulk_with_proration_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_proration - ) - end - - sig do - override.returns( - { - bulk_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Cost per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier with proration - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Cost per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_prorated_minimum pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - ) - end - attr_reader :grouped_with_prorated_minimum_config - - sig do - params( - grouped_with_prorated_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_prorated_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_prorated_minimum pricing - grouped_with_prorated_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_prorated_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # How to determine the groups that should each have a minimum - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group - sig { returns(String) } - attr_accessor :minimum - - # The amount to charge per unit - sig { returns(String) } - attr_accessor :unit_rate - - # Configuration for grouped_with_prorated_minimum pricing - sig do - params( - grouping_key: String, - minimum: String, - unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # How to determine the groups that should each have a minimum - grouping_key:, - # The minimum amount to charge per group - minimum:, - # The amount to charge per unit - unit_rate: - ) - end - - sig do - override.returns( - { grouping_key: String, minimum: String, unit_rate: String } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_metered_minimum pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig - ) - end - attr_reader :grouped_with_metered_minimum_config - - sig do - params( - grouped_with_metered_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_metered_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_metered_minimum pricing - grouped_with_metered_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_metered_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group per unit - sig { returns(String) } - attr_accessor :minimum_unit_amount - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :pricing_key - - # Scale the unit rates by the scaling factor. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ] - ) - end - attr_accessor :scaling_factors - - # Used to determine the unit rate scaling factor - sig { returns(String) } - attr_accessor :scaling_key - - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for grouped_with_metered_minimum pricing - sig do - params( - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor::OrHash - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - grouping_key:, - # The minimum amount to charge per group per unit - minimum_unit_amount:, - # Used to determine the unit rate - pricing_key:, - # Scale the unit rates by the scaling factor. - scaling_factors:, - # Used to determine the unit rate scaling factor - scaling_key:, - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - unit_amounts: - ) - end - - sig do - override.returns( - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class ScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(String) } - attr_accessor :scaling_value - - # Configuration for a scaling factor - sig do - params(scaling_factor: String, scaling_value: String).returns( - T.attached_class - ) - end - def self.new(scaling_factor:, scaling_value:) - end - - sig do - override.returns( - { scaling_factor: String, scaling_value: String } - ) - end - def to_hash - end - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :pricing_value - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount - sig do - params(pricing_value: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - pricing_value:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { pricing_value: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_min_max_thresholds - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: - ) - end - - sig do - override.returns( - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_display_name pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig - ) - end - attr_reader :matrix_with_display_name_config - - sig do - params( - matrix_with_display_name_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash - ).void - end - attr_writer :matrix_with_display_name_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation::OrHash - ], - matrix_with_display_name_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_display_name pricing - matrix_with_display_name_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_display_name - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ], - matrix_with_display_name_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :dimension - - # Apply per unit pricing to each dimension value - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for matrix_with_display_name pricing - sig do - params( - dimension: String, - unit_amounts: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - dimension:, - # Apply per unit pricing to each dimension value - unit_amounts: - ) - end - - sig do - override.returns( - { - dimension: String, - unit_amounts: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - # The dimension value - sig { returns(String) } - attr_accessor :dimension_value - - # Display name for this dimension value - sig { returns(String) } - attr_accessor :display_name - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount item - sig do - params( - dimension_value: String, - display_name: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The dimension value - dimension_value:, - # Display name for this dimension value - display_name:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { - dimension_value: String, - display_name: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - end - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_tiered_package pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig - ) - end - attr_reader :grouped_tiered_package_config - - sig do - params( - grouped_tiered_package_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash - ).void - end - attr_writer :grouped_tiered_package_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered_package pricing - grouped_tiered_package_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering - grouping_key:, - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for max_group_tiered_package pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - ) - end - attr_reader :max_group_tiered_package_config - - sig do - params( - max_group_tiered_package_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash - ).void - end - attr_writer :max_group_tiered_package_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation::OrHash - ], - max_group_tiered_package_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for max_group_tiered_package pricing - max_group_tiered_package_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :max_group_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ], - max_group_tiered_package_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering the group with the highest value - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing to the largest group after grouping with the provided key. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for max_group_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering the group with the highest value - grouping_key:, - package_size:, - # Apply tiered pricing to the largest group after grouping with the provided key. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - ) - end - attr_reader :scalable_matrix_with_unit_pricing_config - - sig do - params( - scalable_matrix_with_unit_pricing_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_unit_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_unit_pricing pricing - scalable_matrix_with_unit_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_unit_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - # The final unit price to rate against the output of the matrix - sig { returns(String) } - attr_accessor :unit_price - - # The property used to group this price - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate - - # Used to determine the unit rate (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor::OrHash - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - # The final unit price to rate against the output of the matrix - unit_price:, - # The property used to group this price - grouping_key: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil, - # Used to determine the unit rate (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig - ) - end - attr_reader :scalable_matrix_with_tiered_pricing_config - - sig do - params( - scalable_matrix_with_tiered_pricing_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_tiered_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_tiered_pricing pricing - scalable_matrix_with_tiered_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_tiered_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used for the scalable matrix first dimension - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Used for the scalable matrix second dimension (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor::OrHash - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier::OrHash - ], - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used for the scalable matrix first dimension - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - tiers:, - # Used for the scalable matrix second dimension (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ], - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier entry with business logic - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new(tier_lower_bound:, unit_amount:) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_bulk pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig - ) - end - attr_reader :cumulative_grouped_bulk_config - - sig do - params( - cumulative_grouped_bulk_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_bulk_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_bulk pricing - cumulative_grouped_bulk_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_bulk - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - Orb::Internal::AnyHash - ) - end - - # Each tier lower bound must have the same group of values. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ] - ) - end - attr_accessor :dimension_values - - sig { returns(String) } - attr_accessor :group - - # Configuration for cumulative_grouped_bulk pricing - sig do - params( - dimension_values: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue::OrHash - ], - group: String - ).returns(T.attached_class) - end - def self.new( - # Each tier lower bound must have the same group of values. - dimension_values:, - group: - ) - end - - sig do - override.returns( - { - dimension_values: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ], - group: String - } - ) - end - def to_hash - end - - class DimensionValue < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue, - Orb::Internal::AnyHash - ) - end - - # Grouping key value - sig { returns(String) } - attr_accessor :grouping_key - - # Tier lower bound - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Unit amount for this combination - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a dimension value entry - sig do - params( - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # Grouping key value - grouping_key:, - # Tier lower bound - tier_lower_bound:, - # Unit amount for this combination - unit_amount: - ) - end - - sig do - override.returns( - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_allocation pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - ) - end - attr_reader :cumulative_grouped_allocation_config - - sig do - params( - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # The overall allocation across all groups - sig { returns(String) } - attr_accessor :cumulative_allocation - - # The allocation per individual group - sig { returns(String) } - attr_accessor :group_allocation - - # The event property used to group usage before applying allocations - sig { returns(String) } - attr_accessor :grouping_key - - # The amount to charge for each unit outside of the allocation - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for cumulative_grouped_allocation pricing - sig do - params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations - grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: - ) - end - - sig do - override.returns( - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MinimumComposite < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for minimum_composite pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig - ) - end - attr_reader :minimum_composite_config - - sig do - params( - minimum_composite_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash - ).void - end - attr_writer :minimum_composite_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation::OrHash - ], - minimum_composite_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for minimum_composite pricing - minimum_composite_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :minimum_composite - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ], - minimum_composite_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - Orb::Internal::AnyHash - ) - end - - # The minimum amount to apply - sig { returns(String) } - attr_accessor :minimum_amount - - # If true, subtotals from this price are prorated based on the service period - sig { returns(T.nilable(T::Boolean)) } - attr_reader :prorated - - sig { params(prorated: T::Boolean).void } - attr_writer :prorated - - # Configuration for minimum_composite pricing - sig do - params(minimum_amount: String, prorated: T::Boolean).returns( - T.attached_class - ) - end - def self.new( - # The minimum amount to apply - minimum_amount:, - # If true, subtotals from this price are prorated based on the service period - prorated: nil - ) - end - - sig do - override.returns( - { minimum_amount: String, prorated: T::Boolean } - ) - end - def to_hash - end - end - end - - class Percent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for percent pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig - ) - end - attr_reader :percent_config - - sig do - params( - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation::OrHash - ], - name: String, - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for percent pricing - percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation - ], - model_type: Symbol, - name: String, - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent - - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } - def self.new( - # What percent of the component subtotals to charge - percent: - ) - end - - sig { override.returns({ percent: Float }) } - def to_hash - end - end - end - - class EventOutput < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for event_output pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for event_output pricing - event_output_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :event_output - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class EventOutputConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - Orb::Internal::AnyHash - ) - end - - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil - ) - end - - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Variants - ] - ) - end - def self.variants - end - end - - # New plan price request body params. - module Price - extend Orb::Internal::Type::Union - - Variants = - T.type_alias do - T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, - Orb::NewPlanMinimumCompositePrice, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput - ) - end - - class BulkWithFilters < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_filters pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig - ) - end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_filters - ) - end - - sig do - override.returns( - { - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash - ) - end - - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - ) - end - attr_accessor :filters - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_filters pricing - sig do - params( - filters: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - filters: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - } - ) - end - def to_hash - end - - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, - Orb::Internal::AnyHash - ) - end - - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match - sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params(property_key: String, property_value: String).returns( - T.attached_class - ) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, - item_id: String, - name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, - item_id: String, - model_type: Symbol, - name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_min_max_thresholds - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: - ) - end - - sig do - override.returns( - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - ) - end - def to_hash - end - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_allocation pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - ) - end - attr_reader :cumulative_grouped_allocation_config - - sig do - params( - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # The overall allocation across all groups - sig { returns(String) } - attr_accessor :cumulative_allocation - - # The allocation per individual group - sig { returns(String) } - attr_accessor :group_allocation - - # The event property used to group usage before applying allocations - sig { returns(String) } - attr_accessor :grouping_key - - # The amount to charge for each unit outside of the allocation - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for cumulative_grouped_allocation pricing - sig do - params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations - grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: - ) - end - - sig do - override.returns( - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - - class Percent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for percent pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig - ) - end - attr_reader :percent_config - - sig do - params( - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, - item_id: String, - name: String, - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # Configuration for percent pricing - percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, - item_id: String, - model_type: Symbol, - name: String, - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class PercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent - - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } - def self.new( - # What percent of the component subtotals to charge - percent: - ) - end - - sig { override.returns({ percent: Float }) } - def to_hash - end - end - end - - class EventOutput < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for event_output pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for event_output pricing - event_output_config:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :event_output - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class EventOutputConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, - Orb::Internal::AnyHash - ) - end - - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil - ) - end - - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end - def to_hash - end - end - end - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Variants - ] - ) - end - def self.variants - end - end - end - - class RemoveAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::RemoveAdjustment, - Orb::Internal::AnyHash - ) - end - - # The id of the adjustment to remove from on the plan. - sig { returns(String) } - attr_accessor :adjustment_id - - # The phase to remove this adjustment from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order - - sig do - params( - adjustment_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The id of the adjustment to remove from on the plan. - adjustment_id:, - # The phase to remove this adjustment from. - plan_phase_order: nil - ) - end - - sig do - override.returns( - { adjustment_id: String, plan_phase_order: T.nilable(Integer) } - ) - end - def to_hash - end - end - - class RemovePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::RemovePrice, - Orb::Internal::AnyHash - ) - end - - # The id of the price to remove from the plan. - sig { returns(String) } - attr_accessor :price_id - - # The phase to remove this price from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order - - sig do - params( - price_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The id of the price to remove from the plan. - price_id:, - # The phase to remove this price from. - plan_phase_order: nil - ) - end - - sig do - override.returns( - { price_id: String, plan_phase_order: T.nilable(Integer) } - ) - end - def to_hash - end - end - - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplaceAdjustment, - Orb::Internal::AnyHash - ) - end - - # The definition of a new adjustment to create and add to the plan. - sig do - returns( - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - ) - end - attr_accessor :adjustment - - # The id of the adjustment on the plan to replace in the plan. - sig { returns(String) } - attr_accessor :replaces_adjustment_id - - # The phase to replace this adjustment from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order - - sig do - params( - adjustment: - T.any( - Orb::NewPercentageDiscount::OrHash, - Orb::NewUsageDiscount::OrHash, - Orb::NewAmountDiscount::OrHash, - Orb::NewMinimum::OrHash, - Orb::NewMaximum::OrHash - ), - replaces_adjustment_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The definition of a new adjustment to create and add to the plan. - adjustment:, - # The id of the adjustment on the plan to replace in the plan. - replaces_adjustment_id:, - # The phase to replace this adjustment from. - plan_phase_order: nil - ) - end - - sig do - override.returns( - { - adjustment: - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ), - replaces_adjustment_id: String, - plan_phase_order: T.nilable(Integer) - } - ) - end - def to_hash - end - - # The definition of a new adjustment to create and add to the plan. - module Adjustment - extend Orb::Internal::Type::Union - - Variants = - T.type_alias do - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - end - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Variants - ] - ) - end - def self.variants - end - end - end - - class ReplacePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice, - Orb::Internal::AnyHash - ) - end - - # The id of the price on the plan to replace in the plan. - sig { returns(String) } - attr_accessor :replaces_price_id - - # The allocation price to add to the plan. - sig { returns(T.nilable(Orb::NewAllocationPrice)) } - attr_reader :allocation_price - - sig do - params( - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) - ).void - end - attr_writer :allocation_price - - # The license allocation price to add to the plan. - sig do - returns( - T.nilable( - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput - ) - ) - ) - end - attr_accessor :license_allocation_price - - # The phase to replace this price from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order - - # New plan price request body params. - sig do - returns( - T.nilable( - T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewPlanMinimumCompositePrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput - ) - ) - ) - end - attr_accessor :price - - sig do - params( - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), - license_allocation_price: - T.nilable( - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::OrHash - ) - ), - plan_phase_order: T.nilable(Integer), - price: - T.nilable( - T.any( - Orb::NewPlanUnitPrice::OrHash, - Orb::NewPlanTieredPrice::OrHash, - Orb::NewPlanBulkPrice::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::OrHash, - Orb::NewPlanPackagePrice::OrHash, - Orb::NewPlanMatrixPrice::OrHash, - Orb::NewPlanThresholdTotalAmountPrice::OrHash, - Orb::NewPlanTieredPackagePrice::OrHash, - Orb::NewPlanTieredWithMinimumPrice::OrHash, - Orb::NewPlanGroupedTieredPrice::OrHash, - Orb::NewPlanTieredPackageWithMinimumPrice::OrHash, - Orb::NewPlanPackageWithAllocationPrice::OrHash, - Orb::NewPlanUnitWithPercentPrice::OrHash, - Orb::NewPlanMatrixWithAllocationPrice::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::OrHash, - Orb::NewPlanUnitWithProrationPrice::OrHash, - Orb::NewPlanGroupedAllocationPrice::OrHash, - Orb::NewPlanBulkWithProrationPrice::OrHash, - Orb::NewPlanGroupedWithProratedMinimumPrice::OrHash, - Orb::NewPlanGroupedWithMeteredMinimumPrice::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::OrHash, - Orb::NewPlanMatrixWithDisplayNamePrice::OrHash, - Orb::NewPlanGroupedTieredPackagePrice::OrHash, - Orb::NewPlanMaxGroupTieredPackagePrice::OrHash, - Orb::NewPlanScalableMatrixWithUnitPricingPrice::OrHash, - Orb::NewPlanScalableMatrixWithTieredPricingPrice::OrHash, - Orb::NewPlanCumulativeGroupedBulkPrice::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, - Orb::NewPlanMinimumCompositePrice::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput::OrHash - ) - ) - ).returns(T.attached_class) - end - def self.new( - # The id of the price on the plan to replace in the plan. - replaces_price_id:, - # The allocation price to add to the plan. - allocation_price: nil, - # The license allocation price to add to the plan. - license_allocation_price: nil, - # The phase to replace this price from. - plan_phase_order: nil, - # New plan price request body params. - price: nil - ) - end - - sig do - override.returns( - { - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice), - license_allocation_price: - T.nilable( - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput - ) - ), - plan_phase_order: T.nilable(Integer), - price: - T.nilable( - T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewPlanMinimumCompositePrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput - ) - ) - } - ) - end - def to_hash - end - - # The license allocation price to add to the plan. - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - Variants = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput - ) - end - - class Unit < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit pricing - sig { returns(Orb::UnitConfig) } - attr_reader :unit_config - - sig { params(unit_config: Orb::UnitConfig::OrHash).void } - attr_writer :unit_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation::OrHash - ], - name: String, - unit_config: Orb::UnitConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit pricing - unit_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Tiered < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered pricing - sig { returns(Orb::TieredConfig) } - attr_reader :tiered_config - - sig { params(tiered_config: Orb::TieredConfig::OrHash).void } - attr_writer :tiered_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation::OrHash - ], - name: String, - tiered_config: Orb::TieredConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered pricing - tiered_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_config: Orb::TieredConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Bulk < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk pricing - sig { returns(Orb::BulkConfig) } - attr_reader :bulk_config - - sig { params(bulk_config: Orb::BulkConfig::OrHash).void } - attr_writer :bulk_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_config: Orb::BulkConfig::OrHash, - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk pricing - bulk_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk - ) - end - - sig do - override.returns( - { - bulk_config: Orb::BulkConfig, - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class BulkWithFilters < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_filters pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig - ) - end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash, - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_filters - ) - end - - sig do - override.returns( - { - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash - ) - end - - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - ) - end - attr_accessor :filters - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_filters pricing - sig do - params( - filters: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - filters: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - } - ) - end - def to_hash - end - - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter, - Orb::Internal::AnyHash - ) - end - - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match - sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params(property_key: String, property_value: String).returns( - T.attached_class - ) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Package < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for package pricing - sig { returns(Orb::PackageConfig) } - attr_reader :package_config - - sig { params(package_config: Orb::PackageConfig::OrHash).void } - attr_writer :package_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation::OrHash - ], - name: String, - package_config: Orb::PackageConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for package pricing - package_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :package - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation - ], - model_type: Symbol, - name: String, - package_config: Orb::PackageConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Matrix < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix pricing - sig { returns(Orb::MatrixConfig) } - attr_reader :matrix_config - - sig { params(matrix_config: Orb::MatrixConfig::OrHash).void } - attr_writer :matrix_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation::OrHash - ], - matrix_config: Orb::MatrixConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix pricing - matrix_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation - ], - matrix_config: Orb::MatrixConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for threshold_total_amount pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig - ) - end - attr_reader :threshold_total_amount_config - - sig do - params( - threshold_total_amount_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash - ).void - end - attr_writer :threshold_total_amount_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation::OrHash - ], - name: String, - threshold_total_amount_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for threshold_total_amount pricing - threshold_total_amount_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :threshold_total_amount - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ], - model_type: Symbol, - name: String, - threshold_total_amount_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - Orb::Internal::AnyHash - ) - end - - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ] - ) - end - attr_accessor :consumption_table - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate - - # Configuration for threshold_total_amount pricing - sig do - params( - consumption_table: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable::OrHash - ], - prorate: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - consumption_table:, - # If true, the unit price will be prorated to the billing period - prorate: nil - ) - end - - sig do - override.returns( - { - consumption_table: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ], - prorate: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - - class ConsumptionTable < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :threshold - - # Total amount for this threshold - sig { returns(String) } - attr_accessor :total_amount - - # Configuration for a single threshold - sig do - params(threshold: String, total_amount: String).returns( - T.attached_class - ) - end - def self.new( - threshold:, - # Total amount for this threshold - total_amount: - ) - end - - sig do - override.returns({ threshold: String, total_amount: String }) - end - def to_hash - end - end - end - end - - class TieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_package pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig - ) - end - attr_reader :tiered_package_config - - sig do - params( - tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::OrHash - ).void - end - attr_writer :tiered_package_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation::OrHash - ], - name: String, - tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_package pricing - tiered_package_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package pricing - sig do - params( - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - tiers: - ) - end - - sig do - override.returns( - { - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Price per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier with business logic - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Price per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - end - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_minimum pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig - ) - end - attr_reader :tiered_with_minimum_config - - sig do - params( - tiered_with_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_with_minimum_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation::OrHash - ], - name: String, - tiered_with_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_with_minimum pricing - tiered_with_minimum_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_with_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ] - ) - end - attr_accessor :tiers - - # If true, tiers with an accrued amount of 0 will not be included in the rating. - sig { returns(T.nilable(T::Boolean)) } - attr_reader :hide_zero_amount_tiers - - sig { params(hide_zero_amount_tiers: T::Boolean).void } - attr_writer :hide_zero_amount_tiers - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_reader :prorate - - sig { params(prorate: T::Boolean).void } - attr_writer :prorate - - # Configuration for tiered_with_minimum pricing - sig do - params( - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier::OrHash - ], - hide_zero_amount_tiers: T::Boolean, - prorate: T::Boolean - ).returns(T.attached_class) - end - def self.new( - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - tiers:, - # If true, tiers with an accrued amount of 0 will not be included in the rating. - hide_zero_amount_tiers: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ], - hide_zero_amount_tiers: T::Boolean, - prorate: T::Boolean - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :minimum_amount - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params( - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - minimum_amount:, - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - end - - class GroupedTiered < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_tiered pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig - ) - end - attr_reader :grouped_tiered_config - - sig do - params( - grouped_tiered_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash - ).void - end - attr_writer :grouped_tiered_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered pricing - grouped_tiered_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - Orb::Internal::AnyHash - ) - end - - # The billable metric property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - # Apply tiered pricing to each segment generated after grouping with the provided - # key - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered pricing - sig do - params( - grouping_key: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The billable metric property used to group before tiering - grouping_key:, - # Apply tiered pricing to each segment generated after grouping with the provided - # key - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_package_with_minimum pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig - ) - end - attr_reader :tiered_package_with_minimum_config - - sig do - params( - tiered_package_with_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_package_with_minimum_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation::OrHash - ], - name: String, - tiered_package_with_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_package_with_minimum pricing - tiered_package_with_minimum_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_package_with_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_package_with_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(Float) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package_with_minimum pricing - sig do - params( - package_size: Float, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - package_size: Float, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :minimum_amount - - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params( - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - ).returns(T.attached_class) - end - def self.new(minimum_amount:, per_unit:, tier_lower_bound:) - end - - sig do - override.returns( - { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - ) - end - def to_hash - end - end - end - end - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for package_with_allocation pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig - ) - end - attr_reader :package_with_allocation_config - - sig do - params( - package_with_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash - ).void - end - attr_writer :package_with_allocation_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation::OrHash - ], - name: String, - package_with_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for package_with_allocation pricing - package_with_allocation_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :package_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - package_with_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :allocation - - sig { returns(String) } - attr_accessor :package_amount - - sig { returns(String) } - attr_accessor :package_size - - # Configuration for package_with_allocation pricing - sig do - params( - allocation: String, - package_amount: String, - package_size: String - ).returns(T.attached_class) - end - def self.new(allocation:, package_amount:, package_size:) - end - - sig do - override.returns( - { - allocation: String, - package_amount: String, - package_size: String - } - ) - end - def to_hash - end - end - end - - class UnitWithPercent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_percent pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig - ) - end - attr_reader :unit_with_percent_config - - sig do - params( - unit_with_percent_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash - ).void - end - attr_writer :unit_with_percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation::OrHash - ], - name: String, - unit_with_percent_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_percent pricing - unit_with_percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_percent_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent, out of 100, of the calculated total to charge - sig { returns(String) } - attr_accessor :percent - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_percent pricing - sig do - params(percent: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # What percent, out of 100, of the calculated total to charge - percent:, - # Rate per unit of usage - unit_amount: - ) - end - - sig { override.returns({ percent: String, unit_amount: String }) } - def to_hash - end - end - end - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_allocation pricing - sig { returns(Orb::MatrixWithAllocationConfig) } - attr_reader :matrix_with_allocation_config - - sig do - params( - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash - ).void - end - attr_writer :matrix_with_allocation_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation::OrHash - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_allocation pricing - matrix_with_allocation_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation::OrHash - ], - name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class UnitWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_proration pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig - ) - end - attr_reader :unit_with_proration_config - - sig do - params( - unit_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash - ).void - end - attr_writer :unit_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation::OrHash - ], - name: String, - unit_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_proration pricing - unit_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_proration pricing - sig { params(unit_amount: String).returns(T.attached_class) } - def self.new( - # Rate per unit of usage - unit_amount: - ) - end - - sig { override.returns({ unit_amount: String }) } - def to_hash - end - end - end - - class GroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_allocation pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig - ) - end - attr_reader :grouped_allocation_config - - sig do - params( - grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash - ).void - end - attr_writer :grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_allocation pricing - grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # Usage allocation per group - sig { returns(String) } - attr_accessor :allocation - - # How to determine the groups that should each be allocated some quantity - sig { returns(String) } - attr_accessor :grouping_key - - # Unit rate for post-allocation - sig { returns(String) } - attr_accessor :overage_unit_rate - - # Configuration for grouped_allocation pricing - sig do - params( - allocation: String, - grouping_key: String, - overage_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # Usage allocation per group - allocation:, - # How to determine the groups that should each be allocated some quantity - grouping_key:, - # Unit rate for post-allocation - overage_unit_rate: - ) - end - - sig do - override.returns( - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class BulkWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_proration pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig - ) - end - attr_reader :bulk_with_proration_config - - sig do - params( - bulk_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash - ).void - end - attr_writer :bulk_with_proration_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash, - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_proration pricing - bulk_with_proration_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_proration - ) - end - - sig do - override.returns( - { - bulk_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Cost per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier with proration - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Cost per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_prorated_minimum pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - ) - end - attr_reader :grouped_with_prorated_minimum_config - - sig do - params( - grouped_with_prorated_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_prorated_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_prorated_minimum pricing - grouped_with_prorated_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_prorated_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # How to determine the groups that should each have a minimum - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group - sig { returns(String) } - attr_accessor :minimum - - # The amount to charge per unit - sig { returns(String) } - attr_accessor :unit_rate - - # Configuration for grouped_with_prorated_minimum pricing - sig do - params( - grouping_key: String, - minimum: String, - unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # How to determine the groups that should each have a minimum - grouping_key:, - # The minimum amount to charge per group - minimum:, - # The amount to charge per unit - unit_rate: - ) - end - - sig do - override.returns( - { grouping_key: String, minimum: String, unit_rate: String } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_metered_minimum pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig - ) - end - attr_reader :grouped_with_metered_minimum_config - - sig do - params( - grouped_with_metered_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_metered_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_metered_minimum pricing - grouped_with_metered_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_metered_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group per unit - sig { returns(String) } - attr_accessor :minimum_unit_amount - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :pricing_key - - # Scale the unit rates by the scaling factor. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ] - ) - end - attr_accessor :scaling_factors - - # Used to determine the unit rate scaling factor - sig { returns(String) } - attr_accessor :scaling_key - - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for grouped_with_metered_minimum pricing - sig do - params( - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor::OrHash - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - grouping_key:, - # The minimum amount to charge per group per unit - minimum_unit_amount:, - # Used to determine the unit rate - pricing_key:, - # Scale the unit rates by the scaling factor. - scaling_factors:, - # Used to determine the unit rate scaling factor - scaling_key:, - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - unit_amounts: - ) - end - - sig do - override.returns( - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class ScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(String) } - attr_accessor :scaling_value - - # Configuration for a scaling factor - sig do - params(scaling_factor: String, scaling_value: String).returns( - T.attached_class - ) - end - def self.new(scaling_factor:, scaling_value:) - end - - sig do - override.returns( - { scaling_factor: String, scaling_value: String } - ) - end - def to_hash - end - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :pricing_value - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount - sig do - params(pricing_value: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - pricing_value:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { pricing_value: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_min_max_thresholds - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: - ) - end - - sig do - override.returns( - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_display_name pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig - ) - end - attr_reader :matrix_with_display_name_config - - sig do - params( - matrix_with_display_name_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash - ).void - end - attr_writer :matrix_with_display_name_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation::OrHash - ], - matrix_with_display_name_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_display_name pricing - matrix_with_display_name_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_display_name - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ], - matrix_with_display_name_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :dimension - - # Apply per unit pricing to each dimension value - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for matrix_with_display_name pricing - sig do - params( - dimension: String, - unit_amounts: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - dimension:, - # Apply per unit pricing to each dimension value - unit_amounts: - ) - end - - sig do - override.returns( - { - dimension: String, - unit_amounts: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - # The dimension value - sig { returns(String) } - attr_accessor :dimension_value - - # Display name for this dimension value - sig { returns(String) } - attr_accessor :display_name - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount item - sig do - params( - dimension_value: String, - display_name: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The dimension value - dimension_value:, - # Display name for this dimension value - display_name:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { - dimension_value: String, - display_name: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - end - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_tiered_package pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig - ) - end - attr_reader :grouped_tiered_package_config - - sig do - params( - grouped_tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash - ).void - end - attr_writer :grouped_tiered_package_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered_package pricing - grouped_tiered_package_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering - grouping_key:, - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for max_group_tiered_package pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - ) - end - attr_reader :max_group_tiered_package_config - - sig do - params( - max_group_tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash - ).void - end - attr_writer :max_group_tiered_package_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation::OrHash - ], - max_group_tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for max_group_tiered_package pricing - max_group_tiered_package_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :max_group_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ], - max_group_tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering the group with the highest value - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing to the largest group after grouping with the provided key. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for max_group_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering the group with the highest value - grouping_key:, - package_size:, - # Apply tiered pricing to the largest group after grouping with the provided key. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - ) - end - attr_reader :scalable_matrix_with_unit_pricing_config - - sig do - params( - scalable_matrix_with_unit_pricing_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_unit_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_unit_pricing pricing - scalable_matrix_with_unit_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_unit_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - # The final unit price to rate against the output of the matrix - sig { returns(String) } - attr_accessor :unit_price - - # The property used to group this price - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate - - # Used to determine the unit rate (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor::OrHash - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - # The final unit price to rate against the output of the matrix - unit_price:, - # The property used to group this price - grouping_key: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil, - # Used to determine the unit rate (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig - ) - end - attr_reader :scalable_matrix_with_tiered_pricing_config - - sig do - params( - scalable_matrix_with_tiered_pricing_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_tiered_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_tiered_pricing pricing - scalable_matrix_with_tiered_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_tiered_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used for the scalable matrix first dimension - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Used for the scalable matrix second dimension (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor::OrHash - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier::OrHash - ], - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used for the scalable matrix first dimension - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - tiers:, - # Used for the scalable matrix second dimension (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ], - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier entry with business logic - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new(tier_lower_bound:, unit_amount:) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_bulk pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig - ) - end - attr_reader :cumulative_grouped_bulk_config - - sig do - params( - cumulative_grouped_bulk_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_bulk_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_bulk pricing - cumulative_grouped_bulk_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_bulk - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - Orb::Internal::AnyHash - ) - end - - # Each tier lower bound must have the same group of values. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ] - ) - end - attr_accessor :dimension_values - - sig { returns(String) } - attr_accessor :group - - # Configuration for cumulative_grouped_bulk pricing - sig do - params( - dimension_values: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue::OrHash - ], - group: String - ).returns(T.attached_class) - end - def self.new( - # Each tier lower bound must have the same group of values. - dimension_values:, - group: - ) - end - - sig do - override.returns( - { - dimension_values: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ], - group: String - } - ) - end - def to_hash - end - - class DimensionValue < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue, - Orb::Internal::AnyHash - ) - end - - # Grouping key value - sig { returns(String) } - attr_accessor :grouping_key - - # Tier lower bound - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Unit amount for this combination - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a dimension value entry - sig do - params( - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # Grouping key value - grouping_key:, - # Tier lower bound - tier_lower_bound:, - # Unit amount for this combination - unit_amount: - ) - end - - sig do - override.returns( - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_allocation pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - ) - end - attr_reader :cumulative_grouped_allocation_config - - sig do - params( - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } + # 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::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewPlanMinimumCompositePrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput ) - end - def to_hash - end - - # 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 - ) + ) + ) + end + attr_accessor :price - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::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::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 ) - end - def self.values - end - end + ) + ).returns(T.attached_class) + end + def self.new( + # The id of the price on the plan to replace in the plan. + replaces_price_id:, + # The allocation price to add to the plan. + allocation_price: nil, + # The license allocation price to add to the plan. + license_allocation_price: nil, + # The phase to replace this price from. + plan_phase_order: nil, + # New plan price request body params. + price: nil + ) + end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do + 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::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - Orb::Internal::AnyHash + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewPlanMinimumCompositePrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput ) - end - - # The 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 + 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 LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end + # The cadence to bill for this price on. + sig do + returns( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol + ) + end + attr_accessor :cadence - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # License allocations to associate with this price. Each entry defines a + # 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 - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # The pricing model type + sig do + returns( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol + ) + end + attr_accessor :model_type - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license 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 name of the price. + sig { returns(String) } + attr_accessor :name - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end + # 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 - class MinimumComposite < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_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::ReplacePrice::LicenseAllocationPrice::MinimumComposite, - Orb::Internal::AnyHash + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::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 - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration - # Configuration for minimum_composite pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig - ) - end - attr_reader :minimum_composite_config + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration - sig do - params( - minimum_composite_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash - ).void - end - attr_writer :minimum_composite_config + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity - # The name of the price. - sig { returns(String) } - attr_accessor :name + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_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 - # If the Price represents a fixed cost, the price will be billed 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( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the 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 conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate + # A transient ID that 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 configuration for the rate of the price currency to the invoicing currency. - sig do - returns( + # 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, - Orb::TieredConversionRateConfig + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash ) - ) - ) - end - attr_accessor :conversion_rate_config - + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + license_allocations:, + # The pricing model type + model_type:, + # The name of the price. + name:, + # Configuration for unit pricing + unit_config:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, # An ISO 4217 currency string, or custom pricing unit identifier, in which this # price is billed. - 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::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, item_id: String, license_allocations: T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation::OrHash + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation ], - minimum_composite_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash, + 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:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. 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 + 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::MinimumComposite::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ], - minimum_composite_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } + 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::MinimumComposite::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ] + 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 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 amount of credits 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 - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end 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 + # The pricing model type + module ModelType + extend Orb::Internal::Type::Enum - # Configuration for minimum_composite pricing - sig do - params(minimum_amount: String, prorated: T::Boolean).returns( - T.attached_class + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType ) 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 + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNIT = + T.let( + :unit, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol ) - end - sig do - override.returns( - { minimum_amount: String, prorated: T::Boolean } - ) - end - def to_hash - end + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ] + ) + end + def self.values end end + end - class Percent < Orb::Internal::Type::BaseModel + # New plan price request body params. + module Price + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewPlanMinimumCompositePrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput + ) + end + + class BulkWithFilters < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, + 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::Percent::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::Percent::LicenseAllocation - ] - ) + params( + bulk_with_filters_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name + attr_writer :bulk_with_filters_config - # Configuration for percent pricing + # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol ) end - attr_reader :percent_config + attr_accessor :cadence - sig do - params( - percent_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_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. @@ -31713,16 +5191,12 @@ module Orb sig do params( + bulk_with_filters_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation::OrHash - ], name: String, - percent_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -31750,18 +5224,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 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,24 +5270,20 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :percent + 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::Percent::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation - ], model_type: Symbol, name: String, - percent_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -31847,6 +5313,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 @@ -31855,7 +5470,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -31863,172 +5478,67 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::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::Percent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent - - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } - def self.new( - # What percent of the component subtotals to charge - percent: - ) - end - - sig { override.returns({ percent: Float }) } - def to_hash - end - end end - class EventOutput < Orb::Internal::Type::BaseModel + 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 +5547,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for tiered_with_proration pricing + sig do + returns( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -32138,15 +5664,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 +5698,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 +5742,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 +5750,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 +5793,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 +5801,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 +5840,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 +6076,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 +6097,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 +6206,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 +6214,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 +6326,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 +6359,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 +6460,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 +6494,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 +6538,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 +6546,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 +6589,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 +6597,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 +6636,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 +6709,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 +6843,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 +6877,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 +6921,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 +6929,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 +6972,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 +6980,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 +7019,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 +7164,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 +7298,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 +7332,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 +7376,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 +7384,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 +7427,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 +7435,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 +7474,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..a4d30b95 100644 --- a/rbi/orb/models/changed_subscription_resources.rbi +++ b/rbi/orb/models/changed_subscription_resources.rbi @@ -1412,6 +1412,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/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..036fdc3b 100644 --- a/rbi/orb/models/invoice.rbi +++ b/rbi/orb/models/invoice.rbi @@ -1217,6 +1217,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..2baf2a60 100644 --- a/rbi/orb/models/invoice_fetch_upcoming_response.rbi +++ b/rbi/orb/models/invoice_fetch_upcoming_response.rbi @@ -1320,6 +1320,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_line_item_create_response.rbi b/rbi/orb/models/invoice_line_item_create_response.rbi index a3098fb4..2c8b8d17 100644 --- a/rbi/orb/models/invoice_line_item_create_response.rbi +++ b/rbi/orb/models/invoice_line_item_create_response.rbi @@ -159,6 +159,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/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..e361ee40 100644 --- a/rbi/orb/models/per_price_cost.rbi +++ b/rbi/orb/models/per_price_cost.rbi @@ -57,6 +57,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..27eb4943 100644 --- a/rbi/orb/models/plan.rbi +++ b/rbi/orb/models/plan.rbi @@ -191,6 +191,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..637045c7 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)) } @@ -224,6 +208,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 +224,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: @@ -304,6 +258,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 +284,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( @@ -395,6 +317,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 +330,509 @@ 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::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 +842,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 +942,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 +975,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 +1021,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 +1064,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 TieredWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk, + Orb::PlanCreateParams::Price::Price::TieredWithProration, Orb::Internal::AnyHash ) end - # Configuration for bulk pricing - sig { returns(Orb::BulkConfig) } - attr_reader :bulk_config - - sig { params(bulk_config: Orb::BulkConfig::OrHash).void } - attr_writer :bulk_config - # The cadence to bill for this price on. sig do returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::OrSymbol + Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::OrSymbol ) end attr_accessor :cadence @@ -1249,18 +1290,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::Bulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -1269,6 +1298,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)) } @@ -1369,15 +1414,12 @@ module Orb sig do params( - bulk_config: Orb::BulkConfig::OrHash, cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, + Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::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: @@ -1405,18 +1447,14 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk pricing - bulk_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, + # Configuration for tiered_with_proration pricing + tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -1455,23 +1493,20 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk + model_type: :tiered_with_proration ) end sig do override.returns( { - bulk_config: Orb::BulkConfig, cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, + Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::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: @@ -1509,7 +1544,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence + Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1517,38 +1552,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol ] ) end @@ -1556,107 +1591,134 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::LicenseAllocation, + Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - + # Tiers for rating based on total usage quantities into the specified tier with + # proration sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + returns( + T::Array[ + Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] + ) + end + attr_accessor :tiers + + # Configuration for tiered_with_proration pricing + sig do + params( + tiers: + T::Array[ + Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash + ] ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # Tiers for rating based on total usage quantities into the specified tier with + # proration + tiers: ) end sig do override.returns( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + tiers: + T::Array[ + Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] } ) 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 BulkWithFilters < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters, + Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end - # Configuration for bulk_with_filters pricing + # The cadence to bill for this price on. sig do returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig + Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void + returns( + Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol - ) + params( + grouped_with_min_max_thresholds_config: + Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + ).void end - attr_accessor :cadence + attr_writer :grouped_with_min_max_thresholds_config # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -1765,15 +1827,11 @@ 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::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::BulkWithFilters::LicenseAllocation::OrHash - ], name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -1790,13579 +1848,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:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_filters - ) - end - - sig do - override.returns( - { - bulk_with_filters_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash - ) - end - - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - ) - end - attr_accessor :filters - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_filters pricing - sig do - params( - filters: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - filters: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ], - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - } - ) - end - def to_hash - end - - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter, - Orb::Internal::AnyHash - ) - end - - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match - sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params(property_key: String, property_value: String).returns( - T.attached_class - ) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Package < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for package pricing - sig { returns(Orb::PackageConfig) } - attr_reader :package_config - - sig { params(package_config: Orb::PackageConfig::OrHash).void } - attr_writer :package_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::LicenseAllocation::OrHash - ], - name: String, - package_config: Orb::PackageConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for package pricing - package_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :package - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::LicenseAllocation - ], - model_type: Symbol, - name: String, - package_config: Orb::PackageConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Matrix < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix pricing - sig { returns(Orb::MatrixConfig) } - attr_reader :matrix_config - - sig { params(matrix_config: Orb::MatrixConfig::OrHash).void } - attr_writer :matrix_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::LicenseAllocation::OrHash - ], - matrix_config: Orb::MatrixConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix pricing - matrix_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::LicenseAllocation - ], - matrix_config: Orb::MatrixConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for threshold_total_amount pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig - ) - end - attr_reader :threshold_total_amount_config - - sig do - params( - threshold_total_amount_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash - ).void - end - attr_writer :threshold_total_amount_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation::OrHash - ], - name: String, - threshold_total_amount_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for threshold_total_amount pricing - threshold_total_amount_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :threshold_total_amount - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ], - model_type: Symbol, - name: String, - threshold_total_amount_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - Orb::Internal::AnyHash - ) - end - - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ] - ) - end - attr_accessor :consumption_table - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate - - # Configuration for threshold_total_amount pricing - sig do - params( - consumption_table: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable::OrHash - ], - prorate: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - consumption_table:, - # If true, the unit price will be prorated to the billing period - prorate: nil - ) - end - - sig do - override.returns( - { - consumption_table: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ], - prorate: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - - class ConsumptionTable < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :threshold - - # Total amount for this threshold - sig { returns(String) } - attr_accessor :total_amount - - # Configuration for a single threshold - sig do - params(threshold: String, total_amount: String).returns( - T.attached_class - ) - end - def self.new( - threshold:, - # Total amount for this threshold - total_amount: - ) - end - - sig do - override.returns({ threshold: String, total_amount: String }) - end - def to_hash - end - end - end - end - - class TieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_package pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig - ) - end - attr_reader :tiered_package_config - - sig do - params( - tiered_package_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::OrHash - ).void - end - attr_writer :tiered_package_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::LicenseAllocation::OrHash - ], - name: String, - tiered_package_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_package pricing - tiered_package_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_package_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package pricing - sig do - params( - package_size: String, - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - tiers: - ) - end - - sig do - override.returns( - { - package_size: String, - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Price per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier with business logic - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Price per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - end - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_minimum pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig - ) - end - attr_reader :tiered_with_minimum_config - - sig do - params( - tiered_with_minimum_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_with_minimum_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation::OrHash - ], - name: String, - tiered_with_minimum_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_with_minimum pricing - tiered_with_minimum_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_with_minimum_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ] - ) - end - attr_accessor :tiers - - # If true, tiers with an accrued amount of 0 will not be included in the rating. - sig { returns(T.nilable(T::Boolean)) } - attr_reader :hide_zero_amount_tiers - - sig { params(hide_zero_amount_tiers: T::Boolean).void } - attr_writer :hide_zero_amount_tiers - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_reader :prorate - - sig { params(prorate: T::Boolean).void } - attr_writer :prorate - - # Configuration for tiered_with_minimum pricing - sig do - params( - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier::OrHash - ], - hide_zero_amount_tiers: T::Boolean, - prorate: T::Boolean - ).returns(T.attached_class) - end - def self.new( - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - tiers:, - # If true, tiers with an accrued amount of 0 will not be included in the rating. - hide_zero_amount_tiers: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ], - hide_zero_amount_tiers: T::Boolean, - prorate: T::Boolean - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :minimum_amount - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params( - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - minimum_amount:, - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - end - - class GroupedTiered < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_tiered pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig - ) - end - attr_reader :grouped_tiered_config - - sig do - params( - grouped_tiered_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash - ).void - end - attr_writer :grouped_tiered_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered pricing - grouped_tiered_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - Orb::Internal::AnyHash - ) - end - - # The billable metric property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - # Apply tiered pricing to each segment generated after grouping with the provided - # key - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered pricing - sig do - params( - grouping_key: String, - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The billable metric property used to group before tiering - grouping_key:, - # Apply tiered pricing to each segment generated after grouping with the provided - # key - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_package_with_minimum pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig - ) - end - attr_reader :tiered_package_with_minimum_config - - sig do - params( - tiered_package_with_minimum_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_package_with_minimum_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation::OrHash - ], - name: String, - tiered_package_with_minimum_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_package_with_minimum pricing - tiered_package_with_minimum_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_package_with_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_package_with_minimum_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(Float) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package_with_minimum pricing - sig do - params( - package_size: Float, - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - package_size: Float, - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :minimum_amount - - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params( - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - ).returns(T.attached_class) - end - def self.new(minimum_amount:, per_unit:, tier_lower_bound:) - end - - sig do - override.returns( - { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - ) - end - def to_hash - end - end - end - end - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for package_with_allocation pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig - ) - end - attr_reader :package_with_allocation_config - - sig do - params( - package_with_allocation_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash - ).void - end - attr_writer :package_with_allocation_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation::OrHash - ], - name: String, - package_with_allocation_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for package_with_allocation pricing - package_with_allocation_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :package_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - package_with_allocation_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :allocation - - sig { returns(String) } - attr_accessor :package_amount - - sig { returns(String) } - attr_accessor :package_size - - # Configuration for package_with_allocation pricing - sig do - params( - allocation: String, - package_amount: String, - package_size: String - ).returns(T.attached_class) - end - def self.new(allocation:, package_amount:, package_size:) - end - - sig do - override.returns( - { - allocation: String, - package_amount: String, - package_size: String - } - ) - end - def to_hash - end - end - end - - class UnitWithPercent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_percent pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig - ) - end - attr_reader :unit_with_percent_config - - sig do - params( - unit_with_percent_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash - ).void - end - attr_writer :unit_with_percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation::OrHash - ], - name: String, - unit_with_percent_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_percent pricing - unit_with_percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_percent_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent, out of 100, of the calculated total to charge - sig { returns(String) } - attr_accessor :percent - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_percent pricing - sig do - params(percent: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # What percent, out of 100, of the calculated total to charge - percent:, - # Rate per unit of usage - unit_amount: - ) - end - - sig { override.returns({ percent: String, unit_amount: String }) } - def to_hash - end - end - end - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_allocation pricing - sig { returns(Orb::MatrixWithAllocationConfig) } - attr_reader :matrix_with_allocation_config - - sig do - params( - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash - ).void - end - attr_writer :matrix_with_allocation_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation::OrHash - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_allocation pricing - matrix_with_allocation_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::LicenseAllocation::OrHash - ], - name: String, - tiered_with_proration_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_with_proration_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class UnitWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_proration pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig - ) - end - attr_reader :unit_with_proration_config - - sig do - params( - unit_with_proration_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash - ).void - end - attr_writer :unit_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::LicenseAllocation::OrHash - ], - name: String, - unit_with_proration_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_proration pricing - unit_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_proration_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_proration pricing - sig { params(unit_amount: String).returns(T.attached_class) } - def self.new( - # Rate per unit of usage - unit_amount: - ) - end - - sig { override.returns({ unit_amount: String }) } - def to_hash - end - end - end - - class GroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_allocation pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig - ) - end - attr_reader :grouped_allocation_config - - sig do - params( - grouped_allocation_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash - ).void - end - attr_writer :grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_allocation pricing - grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # Usage allocation per group - sig { returns(String) } - attr_accessor :allocation - - # How to determine the groups that should each be allocated some quantity - sig { returns(String) } - attr_accessor :grouping_key - - # Unit rate for post-allocation - sig { returns(String) } - attr_accessor :overage_unit_rate - - # Configuration for grouped_allocation pricing - sig do - params( - allocation: String, - grouping_key: String, - overage_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # Usage allocation per group - allocation:, - # How to determine the groups that should each be allocated some quantity - grouping_key:, - # Unit rate for post-allocation - overage_unit_rate: - ) - end - - sig do - override.returns( - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class BulkWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_proration pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig - ) - end - attr_reader :bulk_with_proration_config - - sig do - params( - bulk_with_proration_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash - ).void - end - attr_writer :bulk_with_proration_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_proration_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash, - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_proration pricing - bulk_with_proration_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_proration - ) - end - - sig do - override.returns( - { - bulk_with_proration_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Cost per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier with proration - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Cost per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_prorated_minimum pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - ) - end - attr_reader :grouped_with_prorated_minimum_config - - sig do - params( - grouped_with_prorated_minimum_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_prorated_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_prorated_minimum pricing - grouped_with_prorated_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_prorated_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # How to determine the groups that should each have a minimum - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group - sig { returns(String) } - attr_accessor :minimum - - # The amount to charge per unit - sig { returns(String) } - attr_accessor :unit_rate - - # Configuration for grouped_with_prorated_minimum pricing - sig do - params( - grouping_key: String, - minimum: String, - unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # How to determine the groups that should each have a minimum - grouping_key:, - # The minimum amount to charge per group - minimum:, - # The amount to charge per unit - unit_rate: - ) - end - - sig do - override.returns( - { grouping_key: String, minimum: String, unit_rate: String } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_metered_minimum pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig - ) - end - attr_reader :grouped_with_metered_minimum_config - - sig do - params( - grouped_with_metered_minimum_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_metered_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_metered_minimum pricing - grouped_with_metered_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_metered_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group per unit - sig { returns(String) } - attr_accessor :minimum_unit_amount - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :pricing_key - - # Scale the unit rates by the scaling factor. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ] - ) - end - attr_accessor :scaling_factors - - # Used to determine the unit rate scaling factor - sig { returns(String) } - attr_accessor :scaling_key - - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for grouped_with_metered_minimum pricing - sig do - params( - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor::OrHash - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - grouping_key:, - # The minimum amount to charge per group per unit - minimum_unit_amount:, - # Used to determine the unit rate - pricing_key:, - # Scale the unit rates by the scaling factor. - scaling_factors:, - # Used to determine the unit rate scaling factor - scaling_key:, - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - unit_amounts: - ) - end - - sig do - override.returns( - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class ScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(String) } - attr_accessor :scaling_value - - # Configuration for a scaling factor - sig do - params(scaling_factor: String, scaling_value: String).returns( - T.attached_class - ) - end - def self.new(scaling_factor:, scaling_value:) - end - - sig do - override.returns( - { scaling_factor: String, scaling_value: String } - ) - end - def to_hash - end - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :pricing_value - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount - sig do - params(pricing_value: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - pricing_value:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { pricing_value: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_min_max_thresholds - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: - ) - end - - sig do - override.returns( - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_display_name pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig - ) - end - attr_reader :matrix_with_display_name_config - - sig do - params( - matrix_with_display_name_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash - ).void - end - attr_writer :matrix_with_display_name_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation::OrHash - ], - matrix_with_display_name_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_display_name pricing - matrix_with_display_name_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_display_name - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ], - matrix_with_display_name_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :dimension - - # Apply per unit pricing to each dimension value - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for matrix_with_display_name pricing - sig do - params( - dimension: String, - unit_amounts: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - dimension:, - # Apply per unit pricing to each dimension value - unit_amounts: - ) - end - - sig do - override.returns( - { - dimension: String, - unit_amounts: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - # The dimension value - sig { returns(String) } - attr_accessor :dimension_value - - # Display name for this dimension value - sig { returns(String) } - attr_accessor :display_name - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount item - sig do - params( - dimension_value: String, - display_name: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The dimension value - dimension_value:, - # Display name for this dimension value - display_name:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { - dimension_value: String, - display_name: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - end - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_tiered_package pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig - ) - end - attr_reader :grouped_tiered_package_config - - sig do - params( - grouped_tiered_package_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash - ).void - end - attr_writer :grouped_tiered_package_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered_package pricing - grouped_tiered_package_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering - grouping_key:, - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for max_group_tiered_package pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - ) - end - attr_reader :max_group_tiered_package_config - - sig do - params( - max_group_tiered_package_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash - ).void - end - attr_writer :max_group_tiered_package_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation::OrHash - ], - max_group_tiered_package_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for max_group_tiered_package pricing - max_group_tiered_package_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :max_group_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ], - max_group_tiered_package_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering the group with the highest value - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing to the largest group after grouping with the provided key. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for max_group_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering the group with the highest value - grouping_key:, - package_size:, - # Apply tiered pricing to the largest group after grouping with the provided key. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - ) - end - attr_reader :scalable_matrix_with_unit_pricing_config - - sig do - params( - scalable_matrix_with_unit_pricing_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_unit_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_unit_pricing pricing - scalable_matrix_with_unit_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_unit_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - # The final unit price to rate against the output of the matrix - sig { returns(String) } - attr_accessor :unit_price - - # The property used to group this price - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate - - # Used to determine the unit rate (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor::OrHash - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - # The final unit price to rate against the output of the matrix - unit_price:, - # The property used to group this price - grouping_key: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil, - # Used to determine the unit rate (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig - ) - end - attr_reader :scalable_matrix_with_tiered_pricing_config - - sig do - params( - scalable_matrix_with_tiered_pricing_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_tiered_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_tiered_pricing pricing - scalable_matrix_with_tiered_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_tiered_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used for the scalable matrix first dimension - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Used for the scalable matrix second dimension (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor::OrHash - ], - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier::OrHash - ], - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used for the scalable matrix first dimension - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - tiers:, - # Used for the scalable matrix second dimension (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ], - tiers: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ], - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier entry with business logic - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new(tier_lower_bound:, unit_amount:) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_bulk pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig - ) - end - attr_reader :cumulative_grouped_bulk_config - - sig do - params( - cumulative_grouped_bulk_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_bulk_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_bulk pricing - cumulative_grouped_bulk_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_bulk - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - Orb::Internal::AnyHash - ) - end - - # Each tier lower bound must have the same group of values. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ] - ) - end - attr_accessor :dimension_values - - sig { returns(String) } - attr_accessor :group - - # Configuration for cumulative_grouped_bulk pricing - sig do - params( - dimension_values: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue::OrHash - ], - group: String - ).returns(T.attached_class) - end - def self.new( - # Each tier lower bound must have the same group of values. - dimension_values:, - group: - ) - end - - sig do - override.returns( - { - dimension_values: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ], - group: String - } - ) - end - def to_hash - end - - class DimensionValue < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue, - Orb::Internal::AnyHash - ) - end - - # Grouping key value - sig { returns(String) } - attr_accessor :grouping_key - - # Tier lower bound - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Unit amount for this combination - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a dimension value entry - sig do - params( - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # Grouping key value - grouping_key:, - # Tier lower bound - tier_lower_bound:, - # Unit amount for this combination - unit_amount: - ) - end - - sig do - override.returns( - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_allocation pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - ) - end - attr_reader :cumulative_grouped_allocation_config - - sig do - params( - cumulative_grouped_allocation_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # The overall allocation across all groups - sig { returns(String) } - attr_accessor :cumulative_allocation - - # The allocation per individual group - sig { returns(String) } - attr_accessor :group_allocation - - # The event property used to group usage before applying allocations - sig { returns(String) } - attr_accessor :grouping_key - - # The amount to charge for each unit outside of the allocation - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for cumulative_grouped_allocation pricing - sig do - params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations - grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: - ) - end - - sig do - override.returns( - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MinimumComposite < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for minimum_composite pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig - ) - end - attr_reader :minimum_composite_config - - sig do - params( - minimum_composite_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash - ).void - end - attr_writer :minimum_composite_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::LicenseAllocation::OrHash - ], - minimum_composite_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for minimum_composite pricing - minimum_composite_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :minimum_composite - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ], - minimum_composite_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - Orb::Internal::AnyHash - ) - end - - # The minimum amount to apply - sig { returns(String) } - attr_accessor :minimum_amount - - # If true, subtotals from this price are prorated based on the service period - sig { returns(T.nilable(T::Boolean)) } - attr_reader :prorated - - sig { params(prorated: T::Boolean).void } - attr_writer :prorated - - # Configuration for minimum_composite pricing - sig do - params(minimum_amount: String, prorated: T::Boolean).returns( - T.attached_class - ) - end - def self.new( - # The minimum amount to apply - minimum_amount:, - # If true, subtotals from this price are prorated based on the service period - prorated: nil - ) - end - - sig do - override.returns( - { minimum_amount: String, prorated: T::Boolean } - ) - end - def to_hash - end - end - end - - class Percent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for percent pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::PercentConfig - ) - end - attr_reader :percent_config - - sig do - params( - percent_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::LicenseAllocation::OrHash - ], - name: String, - percent_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::PercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for percent pricing - percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::LicenseAllocation - ], - model_type: Symbol, - name: String, - percent_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::PercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::PercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent - - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } - def self.new( - # What percent of the component subtotals to charge - percent: - ) - end - - sig { override.returns({ percent: Float }) } - def to_hash - end - end - end - - class EventOutput < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for event_output pricing - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for event_output pricing - event_output_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :event_output - ) - end - - sig do - override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class EventOutputConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig, - Orb::Internal::AnyHash - ) - end - - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil - ) - end - - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - sig do - override.returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Variants - ] - ) - end - def self.variants - end - end - - # New plan price request body params. - module Price - extend Orb::Internal::Type::Union - - 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 +1957,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 +1965,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 +2077,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 +2110,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 +2211,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 +2245,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 +2289,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 +2297,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 +2340,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 +2348,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 +2387,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 +2460,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 +2594,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 +2628,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 +2672,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 +2680,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 +2723,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 +2731,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 +2770,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 +2915,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 +3049,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 +3083,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 +3127,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 +3135,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 +3178,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 +3186,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 +3225,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..2d774f12 100644 --- a/rbi/orb/models/plan_version.rbi +++ b/rbi/orb/models/plan_version.rbi @@ -71,6 +71,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..52544d43 100644 --- a/rbi/orb/models/price.rbi +++ b/rbi/orb/models/price.rbi @@ -46,6 +46,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 @@ -20060,6 +20062,1524 @@ module Orb end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(Orb::Price::DailyCreditAllowance, Orb::Internal::AnyHash) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(T.nilable(Orb::BillableMetricTiny)) } + attr_reader :billable_metric + + sig do + params( + billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash) + ).void + end + attr_writer :billable_metric + + sig { returns(Orb::BillingCycleConfiguration) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash + ).void + end + attr_writer :billing_cycle_configuration + + sig do + returns(Orb::Price::DailyCreditAllowance::BillingMode::TaggedSymbol) + end + attr_accessor :billing_mode + + sig { returns(Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol) } + attr_accessor :cadence + + sig do + returns( + T.nilable( + T::Array[Orb::Price::DailyCreditAllowance::CompositePriceFilter] + ) + ) + end + attr_accessor :composite_price_filters + + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + sig do + returns( + T.nilable( + Orb::Price::DailyCreditAllowance::ConversionRateConfig::Variants + ) + ) + end + attr_accessor :conversion_rate_config + + sig { returns(Time) } + attr_accessor :created_at + + sig { returns(T.nilable(Orb::Allocation)) } + attr_reader :credit_allocation + + sig do + params(credit_allocation: T.nilable(Orb::Allocation::OrHash)).void + end + attr_writer :credit_allocation + + sig { returns(String) } + attr_accessor :currency + + # Configuration for daily_credit_allowance pricing + sig do + returns(Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig) + end + attr_reader :daily_credit_allowance_config + + sig do + params( + daily_credit_allowance_config: + Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + ).void + end + attr_writer :daily_credit_allowance_config + + sig { returns(T.nilable(Orb::Discount::Variants)) } + attr_accessor :discount + + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + sig { returns(T.nilable(Orb::BillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::BillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # A minimal representation of an Item containing only the essential identifying + # information. + sig { returns(Orb::ItemSlim) } + attr_reader :item + + sig { params(item: Orb::ItemSlim::OrHash).void } + attr_writer :item + + sig { returns(T.nilable(Orb::Maximum)) } + attr_reader :maximum + + sig { params(maximum: T.nilable(Orb::Maximum::OrHash)).void } + attr_writer :maximum + + sig { returns(T.nilable(String)) } + attr_accessor :maximum_amount + + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + sig { returns(T::Hash[Symbol, String]) } + attr_accessor :metadata + + sig { returns(T.nilable(Orb::Minimum)) } + attr_reader :minimum + + sig { params(minimum: T.nilable(Orb::Minimum::OrHash)).void } + attr_writer :minimum + + sig { returns(T.nilable(String)) } + attr_accessor :minimum_amount + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + sig { returns(String) } + attr_accessor :name + + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order + + sig do + returns(Orb::Price::DailyCreditAllowance::PriceType::TaggedSymbol) + end + attr_accessor :price_type + + # The price id this price replaces. This price will take the place of the replaced + # price in plan version migrations. + sig { returns(T.nilable(String)) } + attr_accessor :replaces_price_id + + sig { returns(T.nilable(Orb::DimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::DimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + sig do + returns(T.nilable(Orb::Price::DailyCreditAllowance::LicenseType)) + end + attr_reader :license_type + + sig do + params( + license_type: + T.nilable(Orb::Price::DailyCreditAllowance::LicenseType::OrHash) + ).void + end + attr_writer :license_type + + sig do + params( + id: String, + billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash), + billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash, + billing_mode: + Orb::Price::DailyCreditAllowance::BillingMode::OrSymbol, + cadence: Orb::Price::DailyCreditAllowance::Cadence::OrSymbol, + composite_price_filters: + T.nilable( + T::Array[ + Orb::Price::DailyCreditAllowance::CompositePriceFilter::OrHash + ] + ), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + created_at: Time, + credit_allocation: T.nilable(Orb::Allocation::OrHash), + currency: String, + daily_credit_allowance_config: + Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, + discount: + T.nilable( + T.any( + Orb::PercentageDiscount::OrHash, + Orb::TrialDiscount::OrHash, + Orb::UsageDiscount::OrHash, + Orb::AmountDiscount::OrHash + ) + ), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::BillingCycleConfiguration::OrHash), + item: Orb::ItemSlim::OrHash, + maximum: T.nilable(Orb::Maximum::OrHash), + maximum_amount: T.nilable(String), + metadata: T::Hash[Symbol, String], + minimum: T.nilable(Orb::Minimum::OrHash), + minimum_amount: T.nilable(String), + name: String, + plan_phase_order: T.nilable(Integer), + price_type: Orb::Price::DailyCreditAllowance::PriceType::OrSymbol, + replaces_price_id: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::DimensionalPriceConfiguration::OrHash), + license_type: + T.nilable(Orb::Price::DailyCreditAllowance::LicenseType::OrHash), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + id:, + billable_metric:, + billing_cycle_configuration:, + billing_mode:, + cadence:, + composite_price_filters:, + conversion_rate:, + conversion_rate_config:, + created_at:, + credit_allocation:, + currency:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, + discount:, + external_price_id:, + fixed_price_quantity:, + invoice_grouping_key:, + invoicing_cycle_configuration:, + # A minimal representation of an Item containing only the essential identifying + # information. + item:, + maximum:, + maximum_amount:, + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + metadata:, + minimum:, + minimum_amount:, + name:, + plan_phase_order:, + price_type:, + # The price id this price replaces. This price will take the place of the replaced + # price in plan version migrations. + replaces_price_id:, + dimensional_price_configuration: nil, + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + license_type: nil, + # The pricing model type + model_type: :daily_credit_allowance + ) + end + + sig do + override.returns( + { + id: String, + billable_metric: T.nilable(Orb::BillableMetricTiny), + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: + Orb::Price::DailyCreditAllowance::BillingMode::TaggedSymbol, + cadence: Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol, + composite_price_filters: + T.nilable( + T::Array[ + Orb::Price::DailyCreditAllowance::CompositePriceFilter + ] + ), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + Orb::Price::DailyCreditAllowance::ConversionRateConfig::Variants + ), + created_at: Time, + credit_allocation: T.nilable(Orb::Allocation), + currency: String, + daily_credit_allowance_config: + Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + discount: T.nilable(Orb::Discount::Variants), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::BillingCycleConfiguration), + item: Orb::ItemSlim, + maximum: T.nilable(Orb::Maximum), + maximum_amount: T.nilable(String), + metadata: T::Hash[Symbol, String], + minimum: T.nilable(Orb::Minimum), + minimum_amount: T.nilable(String), + model_type: Symbol, + name: String, + plan_phase_order: T.nilable(Integer), + price_type: + Orb::Price::DailyCreditAllowance::PriceType::TaggedSymbol, + replaces_price_id: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::DimensionalPriceConfiguration), + license_type: + T.nilable(Orb::Price::DailyCreditAllowance::LicenseType) + } + ) + end + def to_hash + end + + module BillingMode + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::Price::DailyCreditAllowance::BillingMode) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + IN_ADVANCE = + T.let( + :in_advance, + Orb::Price::DailyCreditAllowance::BillingMode::TaggedSymbol + ) + IN_ARREAR = + T.let( + :in_arrear, + Orb::Price::DailyCreditAllowance::BillingMode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::DailyCreditAllowance::BillingMode::TaggedSymbol + ] + ) + end + def self.values + end + end + + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::Price::DailyCreditAllowance::Cadence) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ONE_TIME = + T.let( + :one_time, + Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + ANNUAL = + T.let( + :annual, + Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol] + ) + end + def self.values + end + end + + class CompositePriceFilter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::DailyCreditAllowance::CompositePriceFilter, + Orb::Internal::AnyHash + ) + end + + # The property of the price to filter on. + sig do + returns( + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::TaggedSymbol + ) + end + attr_accessor :field + + # Should prices that match the filter be included or excluded. + sig do + returns( + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Operator::TaggedSymbol + ) + end + attr_accessor :operator + + # The IDs or values that match this filter. + sig { returns(T::Array[String]) } + attr_accessor :values + + sig do + params( + field: + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::OrSymbol, + operator: + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Operator::OrSymbol, + values: T::Array[String] + ).returns(T.attached_class) + end + def self.new( + # The property of the price to filter on. + field:, + # Should prices that match the filter be included or excluded. + operator:, + # The IDs or values that match this filter. + values: + ) + end + + sig do + override.returns( + { + field: + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::TaggedSymbol, + operator: + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Operator::TaggedSymbol, + values: T::Array[String] + } + ) + end + def to_hash + end + + # The property of the price to filter on. + module Field + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PRICE_ID = + T.let( + :price_id, + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::TaggedSymbol + ) + ITEM_ID = + T.let( + :item_id, + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::TaggedSymbol + ) + PRICE_TYPE = + T.let( + :price_type, + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::TaggedSymbol + ) + CURRENCY = + T.let( + :currency, + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::TaggedSymbol + ) + PRICING_UNIT_ID = + T.let( + :pricing_unit_id, + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Should prices that match the filter be included or excluded. + module Operator + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Operator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + INCLUDES = + T.let( + :includes, + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Operator::TaggedSymbol + ) + EXCLUDES = + T.let( + :excludes, + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Operator::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Operator::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::Internal::AnyHash + ) + end + + # Credits granted per day. Lose-it-or-use-it; does not roll over. + sig { returns(String) } + attr_accessor :daily_allowance + + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + sig { returns(String) } + attr_accessor :default_unit_amount + + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions + + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + sig { returns(String) } + attr_accessor :event_day_property + + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing + sig do + params( + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: + ) + end + + sig do + override.returns( + { + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end + end + + module PriceType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::Price::DailyCreditAllowance::PriceType) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + USAGE_PRICE = + T.let( + :usage_price, + Orb::Price::DailyCreditAllowance::PriceType::TaggedSymbol + ) + FIXED_PRICE = + T.let( + :fixed_price, + Orb::Price::DailyCreditAllowance::PriceType::TaggedSymbol + ) + COMPOSITE_PRICE = + T.let( + :composite_price, + Orb::Price::DailyCreditAllowance::PriceType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::DailyCreditAllowance::PriceType::TaggedSymbol + ] + ) + end + def self.values + end + end + + class LicenseType < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::DailyCreditAllowance::LicenseType, + Orb::Internal::AnyHash + ) + end + + # The Orb-assigned unique identifier for the license type. + sig { returns(String) } + attr_accessor :id + + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + sig { returns(String) } + attr_accessor :grouping_key + + # The name of the license type. + sig { returns(String) } + attr_accessor :name + + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + sig do + params(id: String, grouping_key: String, name: String).returns( + T.attached_class + ) + end + def self.new( + # The Orb-assigned unique identifier for the license type. + id:, + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + grouping_key:, + # The name of the license type. + name: + ) + end + + sig do + override.returns({ id: String, grouping_key: String, name: String }) + end + def to_hash + end + end + end + + class MeteredAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(Orb::Price::MeteredAllowance, Orb::Internal::AnyHash) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(T.nilable(Orb::BillableMetricTiny)) } + attr_reader :billable_metric + + sig do + params( + billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash) + ).void + end + attr_writer :billable_metric + + sig { returns(Orb::BillingCycleConfiguration) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash + ).void + end + attr_writer :billing_cycle_configuration + + sig { returns(Orb::Price::MeteredAllowance::BillingMode::TaggedSymbol) } + attr_accessor :billing_mode + + sig { returns(Orb::Price::MeteredAllowance::Cadence::TaggedSymbol) } + attr_accessor :cadence + + sig do + returns( + T.nilable( + T::Array[Orb::Price::MeteredAllowance::CompositePriceFilter] + ) + ) + end + attr_accessor :composite_price_filters + + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + sig do + returns( + T.nilable( + Orb::Price::MeteredAllowance::ConversionRateConfig::Variants + ) + ) + end + attr_accessor :conversion_rate_config + + sig { returns(Time) } + attr_accessor :created_at + + sig { returns(T.nilable(Orb::Allocation)) } + attr_reader :credit_allocation + + sig do + params(credit_allocation: T.nilable(Orb::Allocation::OrHash)).void + end + attr_writer :credit_allocation + + sig { returns(String) } + attr_accessor :currency + + sig { returns(T.nilable(Orb::Discount::Variants)) } + attr_accessor :discount + + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + sig { returns(T.nilable(Orb::BillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::BillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # A minimal representation of an Item containing only the essential identifying + # information. + sig { returns(Orb::ItemSlim) } + attr_reader :item + + sig { params(item: Orb::ItemSlim::OrHash).void } + attr_writer :item + + sig { returns(T.nilable(Orb::Maximum)) } + attr_reader :maximum + + sig { params(maximum: T.nilable(Orb::Maximum::OrHash)).void } + attr_writer :maximum + + sig { returns(T.nilable(String)) } + attr_accessor :maximum_amount + + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + sig { returns(T::Hash[Symbol, String]) } + attr_accessor :metadata + + # Configuration for metered_allowance pricing + sig { returns(Orb::Price::MeteredAllowance::MeteredAllowanceConfig) } + attr_reader :metered_allowance_config + + sig do + params( + metered_allowance_config: + Orb::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash + ).void + end + attr_writer :metered_allowance_config + + sig { returns(T.nilable(Orb::Minimum)) } + attr_reader :minimum + + sig { params(minimum: T.nilable(Orb::Minimum::OrHash)).void } + attr_writer :minimum + + sig { returns(T.nilable(String)) } + attr_accessor :minimum_amount + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + sig { returns(String) } + attr_accessor :name + + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order + + sig { returns(Orb::Price::MeteredAllowance::PriceType::TaggedSymbol) } + attr_accessor :price_type + + # The price id this price replaces. This price will take the place of the replaced + # price in plan version migrations. + sig { returns(T.nilable(String)) } + attr_accessor :replaces_price_id + + sig { returns(T.nilable(Orb::DimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::DimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + sig { returns(T.nilable(Orb::Price::MeteredAllowance::LicenseType)) } + attr_reader :license_type + + sig do + params( + license_type: + T.nilable(Orb::Price::MeteredAllowance::LicenseType::OrHash) + ).void + end + attr_writer :license_type + + sig do + params( + id: String, + billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash), + billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash, + billing_mode: Orb::Price::MeteredAllowance::BillingMode::OrSymbol, + cadence: Orb::Price::MeteredAllowance::Cadence::OrSymbol, + composite_price_filters: + T.nilable( + T::Array[ + Orb::Price::MeteredAllowance::CompositePriceFilter::OrHash + ] + ), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + created_at: Time, + credit_allocation: T.nilable(Orb::Allocation::OrHash), + currency: String, + discount: + T.nilable( + T.any( + Orb::PercentageDiscount::OrHash, + Orb::TrialDiscount::OrHash, + Orb::UsageDiscount::OrHash, + Orb::AmountDiscount::OrHash + ) + ), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::BillingCycleConfiguration::OrHash), + item: Orb::ItemSlim::OrHash, + maximum: T.nilable(Orb::Maximum::OrHash), + maximum_amount: T.nilable(String), + metadata: T::Hash[Symbol, String], + metered_allowance_config: + Orb::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, + minimum: T.nilable(Orb::Minimum::OrHash), + minimum_amount: T.nilable(String), + name: String, + plan_phase_order: T.nilable(Integer), + price_type: Orb::Price::MeteredAllowance::PriceType::OrSymbol, + replaces_price_id: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::DimensionalPriceConfiguration::OrHash), + license_type: + T.nilable(Orb::Price::MeteredAllowance::LicenseType::OrHash), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + id:, + billable_metric:, + billing_cycle_configuration:, + billing_mode:, + cadence:, + composite_price_filters:, + conversion_rate:, + conversion_rate_config:, + created_at:, + credit_allocation:, + currency:, + discount:, + external_price_id:, + fixed_price_quantity:, + invoice_grouping_key:, + invoicing_cycle_configuration:, + # A minimal representation of an Item containing only the essential identifying + # information. + item:, + maximum:, + maximum_amount:, + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + metadata:, + # Configuration for metered_allowance pricing + metered_allowance_config:, + minimum:, + minimum_amount:, + name:, + plan_phase_order:, + price_type:, + # The price id this price replaces. This price will take the place of the replaced + # price in plan version migrations. + replaces_price_id:, + dimensional_price_configuration: nil, + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + license_type: nil, + # The pricing model type + model_type: :metered_allowance + ) + end + + sig do + override.returns( + { + id: String, + billable_metric: T.nilable(Orb::BillableMetricTiny), + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: + Orb::Price::MeteredAllowance::BillingMode::TaggedSymbol, + cadence: Orb::Price::MeteredAllowance::Cadence::TaggedSymbol, + composite_price_filters: + T.nilable( + T::Array[Orb::Price::MeteredAllowance::CompositePriceFilter] + ), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + Orb::Price::MeteredAllowance::ConversionRateConfig::Variants + ), + created_at: Time, + credit_allocation: T.nilable(Orb::Allocation), + currency: String, + discount: T.nilable(Orb::Discount::Variants), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::BillingCycleConfiguration), + item: Orb::ItemSlim, + maximum: T.nilable(Orb::Maximum), + maximum_amount: T.nilable(String), + metadata: T::Hash[Symbol, String], + metered_allowance_config: + Orb::Price::MeteredAllowance::MeteredAllowanceConfig, + minimum: T.nilable(Orb::Minimum), + minimum_amount: T.nilable(String), + model_type: Symbol, + name: String, + plan_phase_order: T.nilable(Integer), + price_type: Orb::Price::MeteredAllowance::PriceType::TaggedSymbol, + replaces_price_id: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::DimensionalPriceConfiguration), + license_type: T.nilable(Orb::Price::MeteredAllowance::LicenseType) + } + ) + end + def to_hash + end + + module BillingMode + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::Price::MeteredAllowance::BillingMode) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + IN_ADVANCE = + T.let( + :in_advance, + Orb::Price::MeteredAllowance::BillingMode::TaggedSymbol + ) + IN_ARREAR = + T.let( + :in_arrear, + Orb::Price::MeteredAllowance::BillingMode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Orb::Price::MeteredAllowance::BillingMode::TaggedSymbol] + ) + end + def self.values + end + end + + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::Price::MeteredAllowance::Cadence) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ONE_TIME = + T.let( + :one_time, + Orb::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + MONTHLY = + T.let(:monthly, Orb::Price::MeteredAllowance::Cadence::TaggedSymbol) + QUARTERLY = + T.let( + :quarterly, + Orb::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + ANNUAL = + T.let(:annual, Orb::Price::MeteredAllowance::Cadence::TaggedSymbol) + CUSTOM = + T.let(:custom, Orb::Price::MeteredAllowance::Cadence::TaggedSymbol) + + sig do + override.returns( + T::Array[Orb::Price::MeteredAllowance::Cadence::TaggedSymbol] + ) + end + def self.values + end + end + + class CompositePriceFilter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::MeteredAllowance::CompositePriceFilter, + Orb::Internal::AnyHash + ) + end + + # The property of the price to filter on. + sig do + returns( + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::TaggedSymbol + ) + end + attr_accessor :field + + # Should prices that match the filter be included or excluded. + sig do + returns( + Orb::Price::MeteredAllowance::CompositePriceFilter::Operator::TaggedSymbol + ) + end + attr_accessor :operator + + # The IDs or values that match this filter. + sig { returns(T::Array[String]) } + attr_accessor :values + + sig do + params( + field: + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::OrSymbol, + operator: + Orb::Price::MeteredAllowance::CompositePriceFilter::Operator::OrSymbol, + values: T::Array[String] + ).returns(T.attached_class) + end + def self.new( + # The property of the price to filter on. + field:, + # Should prices that match the filter be included or excluded. + operator:, + # The IDs or values that match this filter. + values: + ) + end + + sig do + override.returns( + { + field: + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::TaggedSymbol, + operator: + Orb::Price::MeteredAllowance::CompositePriceFilter::Operator::TaggedSymbol, + values: T::Array[String] + } + ) + end + def to_hash + end + + # The property of the price to filter on. + module Field + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Price::MeteredAllowance::CompositePriceFilter::Field + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PRICE_ID = + T.let( + :price_id, + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::TaggedSymbol + ) + ITEM_ID = + T.let( + :item_id, + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::TaggedSymbol + ) + PRICE_TYPE = + T.let( + :price_type, + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::TaggedSymbol + ) + CURRENCY = + T.let( + :currency, + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::TaggedSymbol + ) + PRICING_UNIT_ID = + T.let( + :pricing_unit_id, + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Should prices that match the filter be included or excluded. + module Operator + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Price::MeteredAllowance::CompositePriceFilter::Operator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + INCLUDES = + T.let( + :includes, + Orb::Price::MeteredAllowance::CompositePriceFilter::Operator::TaggedSymbol + ) + EXCLUDES = + T.let( + :excludes, + Orb::Price::MeteredAllowance::CompositePriceFilter::Operator::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::MeteredAllowance::CompositePriceFilter::Operator::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::MeteredAllowance::MeteredAllowanceConfig, + Orb::Internal::AnyHash + ) + end + + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + sig { returns(String) } + attr_accessor :allowance_grouping_value + + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + sig { returns(String) } + attr_accessor :consumption_grouping_value + + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key + + # Per-unit price applied to gross consumption and to the allowance credit. + sig { returns(String) } + attr_accessor :unit_amount + + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing + sig do + params( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + ).returns(T.attached_class) + end + def self.new( + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil + ) + end + + sig do + override.returns( + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + ) + end + def to_hash + end + end + + module PriceType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::Price::MeteredAllowance::PriceType) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + USAGE_PRICE = + T.let( + :usage_price, + Orb::Price::MeteredAllowance::PriceType::TaggedSymbol + ) + FIXED_PRICE = + T.let( + :fixed_price, + Orb::Price::MeteredAllowance::PriceType::TaggedSymbol + ) + COMPOSITE_PRICE = + T.let( + :composite_price, + Orb::Price::MeteredAllowance::PriceType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Orb::Price::MeteredAllowance::PriceType::TaggedSymbol] + ) + end + def self.values + end + end + + class LicenseType < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::MeteredAllowance::LicenseType, + Orb::Internal::AnyHash + ) + end + + # The Orb-assigned unique identifier for the license type. + sig { returns(String) } + attr_accessor :id + + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + sig { returns(String) } + attr_accessor :grouping_key + + # The name of the license type. + sig { returns(String) } + attr_accessor :name + + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + sig do + params(id: String, grouping_key: String, name: String).returns( + T.attached_class + ) + end + def self.new( + # The Orb-assigned unique identifier for the license type. + id:, + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + grouping_key:, + # The name of the license type. + name: + ) + end + + sig do + override.returns({ id: String, grouping_key: String, name: String }) + end + def to_hash + end + end + end + class MinimumComposite < Orb::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/orb/models/price_create_params.rbi b/rbi/orb/models/price_create_params.rbi index 3c986f28..c707df09 100644 --- a/rbi/orb/models/price_create_params.rbi +++ b/rbi/orb/models/price_create_params.rbi @@ -41,6 +41,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 @@ -81,6 +83,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 @@ -128,6 +132,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 @@ -174,6 +180,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 @@ -1382,6 +1390,852 @@ module Orb end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::DailyCreditAllowance, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # Configuration for daily_credit_allowance pricing + sig do + returns( + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig + ) + end + attr_reader :daily_credit_allowance_config + + sig do + params( + daily_credit_allowance_config: + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + ).void + end + attr_writer :daily_credit_allowance_config + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::OrSymbol, + currency: String, + daily_credit_allowance_config: + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # The pricing model type + model_type: :daily_credit_allowance + ) + end + + sig do + override.returns( + { + cadence: + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::OrSymbol, + currency: String, + daily_credit_allowance_config: + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::Internal::AnyHash + ) + end + + # Credits granted per day. Lose-it-or-use-it; does not roll over. + sig { returns(String) } + attr_accessor :daily_allowance + + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + sig { returns(String) } + attr_accessor :default_unit_amount + + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions + + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + sig { returns(String) } + attr_accessor :event_day_property + + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing + sig do + params( + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: + ) + end + + sig do + override.returns( + { + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end + end + end + + class MeteredAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::MeteredAllowance, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for metered_allowance pricing + sig do + returns( + Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig + ) + end + attr_reader :metered_allowance_config + + sig do + params( + metered_allowance_config: + Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig::OrHash + ).void + end + attr_writer :metered_allowance_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::OrSymbol, + currency: String, + item_id: String, + metered_allowance_config: + Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig::OrHash, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # The id of the item the price will be associated with. + item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # The pricing model type + model_type: :metered_allowance + ) + end + + sig do + override.returns( + { + cadence: + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::OrSymbol, + currency: String, + item_id: String, + metered_allowance_config: + Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig, + Orb::Internal::AnyHash + ) + end + + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + sig { returns(String) } + attr_accessor :allowance_grouping_value + + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + sig { returns(String) } + attr_accessor :consumption_grouping_value + + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key + + # Per-unit price applied to gross consumption and to the allowance credit. + sig { returns(String) } + attr_accessor :unit_amount + + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing + sig do + params( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + ).returns(T.attached_class) + end + def self.new( + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil + ) + end + + sig do + override.returns( + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + ) + end + def to_hash + end + end + end + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/orb/models/price_evaluate_multiple_params.rbi b/rbi/orb/models/price_evaluate_multiple_params.rbi index 74a91dd7..11ec798a 100644 --- a/rbi/orb/models/price_evaluate_multiple_params.rbi +++ b/rbi/orb/models/price_evaluate_multiple_params.rbi @@ -151,6 +151,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 @@ -201,6 +203,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 @@ -269,6 +273,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 @@ -316,6 +322,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 @@ -1524,6 +1532,852 @@ module Orb end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # Configuration for daily_credit_allowance pricing + sig do + returns( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + ) + end + attr_reader :daily_credit_allowance_config + + sig do + params( + daily_credit_allowance_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + ).void + end + attr_writer :daily_credit_allowance_config + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::OrSymbol, + currency: String, + daily_credit_allowance_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # The pricing model type + model_type: :daily_credit_allowance + ) + end + + sig do + override.returns( + { + cadence: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::OrSymbol, + currency: String, + daily_credit_allowance_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::Internal::AnyHash + ) + end + + # Credits granted per day. Lose-it-or-use-it; does not roll over. + sig { returns(String) } + attr_accessor :daily_allowance + + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + sig { returns(String) } + attr_accessor :default_unit_amount + + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions + + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + sig { returns(String) } + attr_accessor :event_day_property + + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing + sig do + params( + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: + ) + end + + sig do + override.returns( + { + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end + end + end + + class MeteredAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for metered_allowance pricing + sig do + returns( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig + ) + end + attr_reader :metered_allowance_config + + sig do + params( + metered_allowance_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash + ).void + end + attr_writer :metered_allowance_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::OrSymbol, + currency: String, + item_id: String, + metered_allowance_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # The id of the item the price will be associated with. + item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # The pricing model type + model_type: :metered_allowance + ) + end + + sig do + override.returns( + { + cadence: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::OrSymbol, + currency: String, + item_id: String, + metered_allowance_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig, + Orb::Internal::AnyHash + ) + end + + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + sig { returns(String) } + attr_accessor :allowance_grouping_value + + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + sig { returns(String) } + attr_accessor :consumption_grouping_value + + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key + + # Per-unit price applied to gross consumption and to the allowance credit. + sig { returns(String) } + attr_accessor :unit_amount + + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing + sig do + params( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + ).returns(T.attached_class) + end + def self.new( + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil + ) + end + + sig do + override.returns( + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + ) + end + def to_hash + end + end + end + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/orb/models/price_evaluate_preview_events_params.rbi b/rbi/orb/models/price_evaluate_preview_events_params.rbi index d6685482..9a0f0c86 100644 --- a/rbi/orb/models/price_evaluate_preview_events_params.rbi +++ b/rbi/orb/models/price_evaluate_preview_events_params.rbi @@ -252,6 +252,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 @@ -302,6 +304,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 @@ -370,6 +374,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 @@ -417,6 +423,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 @@ -1625,6 +1633,852 @@ module Orb end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # Configuration for daily_credit_allowance pricing + sig do + returns( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + ) + end + attr_reader :daily_credit_allowance_config + + sig do + params( + daily_credit_allowance_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + ).void + end + attr_writer :daily_credit_allowance_config + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::OrSymbol, + currency: String, + daily_credit_allowance_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # The pricing model type + model_type: :daily_credit_allowance + ) + end + + sig do + override.returns( + { + cadence: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::OrSymbol, + currency: String, + daily_credit_allowance_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::Internal::AnyHash + ) + end + + # Credits granted per day. Lose-it-or-use-it; does not roll over. + sig { returns(String) } + attr_accessor :daily_allowance + + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + sig { returns(String) } + attr_accessor :default_unit_amount + + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions + + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + sig { returns(String) } + attr_accessor :event_day_property + + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing + sig do + params( + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: + ) + end + + sig do + override.returns( + { + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end + end + end + + class MeteredAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for metered_allowance pricing + sig do + returns( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig + ) + end + attr_reader :metered_allowance_config + + sig do + params( + metered_allowance_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash + ).void + end + attr_writer :metered_allowance_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::OrSymbol, + currency: String, + item_id: String, + metered_allowance_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # The id of the item the price will be associated with. + item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # The pricing model type + model_type: :metered_allowance + ) + end + + sig do + override.returns( + { + cadence: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::OrSymbol, + currency: String, + item_id: String, + metered_allowance_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig, + Orb::Internal::AnyHash + ) + end + + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + sig { returns(String) } + attr_accessor :allowance_grouping_value + + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + sig { returns(String) } + attr_accessor :consumption_grouping_value + + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key + + # Per-unit price applied to gross consumption and to the allowance credit. + sig { returns(String) } + attr_accessor :unit_amount + + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing + sig do + params( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + ).returns(T.attached_class) + end + def self.new( + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil + ) + end + + sig do + override.returns( + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + ) + end + def to_hash + end + end + end + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/orb/models/price_interval.rbi b/rbi/orb/models/price_interval.rbi index 2122ad69..b3f74726 100644 --- a/rbi/orb/models/price_interval.rbi +++ b/rbi/orb/models/price_interval.rbi @@ -117,6 +117,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..3a5f41d9 100644 --- a/rbi/orb/models/subscription_create_params.rbi +++ b/rbi/orb/models/subscription_create_params.rbi @@ -616,6 +616,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 @@ -676,6 +678,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 @@ -762,6 +766,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 @@ -810,6 +816,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 @@ -2467,11 +2475,11 @@ module Orb end end - class Percent < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::Percent, + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -2479,11 +2487,27 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence + # Configuration for daily_credit_allowance pricing + sig do + returns( + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + ) + end + attr_reader :daily_credit_allowance_config + + sig do + params( + daily_credit_allowance_config: + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + ).void + end + attr_writer :daily_credit_allowance_config + # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -2496,22 +2520,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 +2621,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, name: String, - percent_config: - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2647,12 +2655,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, - # Configuration for percent pricing - percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -2691,7 +2699,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :percent + model_type: :daily_credit_allowance ) end @@ -2699,12 +2707,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, model_type: Symbol, name: String, - percent_config: - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2742,7 +2750,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2750,38 +2758,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -2789,38 +2797,144 @@ module Orb end end - class PercentConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent + # Credits granted per day. Lose-it-or-use-it; does not roll over. + sig { returns(String) } + attr_accessor :daily_allowance - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + sig { returns(String) } + attr_accessor :default_unit_amount + + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions + + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + sig { returns(String) } + attr_accessor :event_day_property + + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing + sig do + params( + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] + ).returns(T.attached_class) + end def self.new( - # What percent of the component subtotals to charge - percent: + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end - sig { override.returns({ percent: Float }) } + sig do + override.returns( + { + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + } + ) + end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end - class EventOutput < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput, + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -2828,30 +2942,30 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for event_output pricing + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for metered_allowance pricing sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig ) end - attr_reader :event_output_config + attr_reader :metered_allowance_config sig do params( - event_output_config: - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash + metered_allowance_config: + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::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 + attr_writer :metered_allowance_config # The pricing model type sig { returns(Symbol) } @@ -2962,10 +3076,10 @@ 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::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), @@ -2996,10 +3110,10 @@ 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:, + # 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 @@ -3040,7 +3154,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :event_output + model_type: :metered_allowance ) end @@ -3048,10 +3162,10 @@ 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::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), @@ -3091,7 +3205,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3099,38 +3213,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -3138,57 +3252,91 @@ module Orb end end - class EventOutputConfig < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # The key in the event data to extract the unit rate from. + # 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 :unit_rating_key + attr_accessor :allowance_grouping_value - # 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. + # 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_accessor :default_unit_rate + attr_reader :allowance_display_name - # 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 { 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_accessor :grouping_key + attr_reader :consumption_display_name - # Configuration for event_output pricing + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing sig do params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) + 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 key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil + # The 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( { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } ) end @@ -3197,516 +3345,2139 @@ module Orb end end - sig do - override.returns( - T::Array[Orb::SubscriptionCreateParams::AddPrice::Price::Variants] - ) - end - def self.variants - end - end - end + class Percent < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::AddPrice::Price::Percent, + Orb::Internal::AnyHash + ) + end - module ExternalMarketplace - extend Orb::Internal::Type::Enum + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol + ) + end + attr_accessor :cadence - TaggedSymbol = - T.type_alias do - T.all(Symbol, Orb::SubscriptionCreateParams::ExternalMarketplace) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - GOOGLE = - T.let( - :google, - Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol - ) - AWS = - T.let( - :aws, - Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol - ) - AZURE = - T.let( - :azure, - Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol - ) + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type - sig do - override.returns( - T::Array[ - Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol - ] - ) - end - def self.values - end - end + # The name of the price. + sig { returns(String) } + attr_accessor :name - class RemoveAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::RemoveAdjustment, - Orb::Internal::AnyHash - ) - end + # Configuration for percent pricing + sig do + returns( + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig + ) + end + attr_reader :percent_config - # The id of the adjustment to remove on the subscription. - sig { returns(String) } - attr_accessor :adjustment_id + sig do + params( + percent_config: + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig::OrHash + ).void + end + attr_writer :percent_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 + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id - sig { override.returns({ adjustment_id: String }) } - def to_hash - end - end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance - class RemovePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::RemovePrice, - Orb::Internal::AnyHash - ) - end + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration - # The external price id of the price to remove on the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration - # The id of the price to remove on the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :price_id + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate - sig do - params( - external_price_id: T.nilable(String), - price_id: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The external price id of the price to remove on the subscription. - external_price_id: nil, - # The id of the price to remove on the subscription. - price_id: nil - ) - end + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config - sig do - override.returns( - { - external_price_id: T.nilable(String), - price_id: T.nilable(String) - } - ) - end - def to_hash - end - end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::ReplaceAdjustment, - Orb::Internal::AnyHash - ) - end + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration - # The definition of a new adjustment to create and add to the subscription. - sig do - returns( - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - ) - end - attr_accessor :adjustment + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration - # The id of the adjustment on the plan to replace in the subscription. - sig { returns(String) } - attr_accessor :replaces_adjustment_id + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id - sig do - params( - adjustment: - T.any( - Orb::NewPercentageDiscount::OrHash, - Orb::NewUsageDiscount::OrHash, - Orb::NewAmountDiscount::OrHash, - Orb::NewMinimum::OrHash, - Orb::NewMaximum::OrHash - ), - replaces_adjustment_id: String - ).returns(T.attached_class) - end - def self.new( - # The definition of a new adjustment to create and add to the subscription. - adjustment:, - # The id of the adjustment on the plan to replace in the subscription. - replaces_adjustment_id: - ) - end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity - sig do - override.returns( - { - adjustment: - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ), - replaces_adjustment_id: String - } - ) - end - def to_hash - end + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key - # The definition of a new adjustment to create and add to the subscription. - module Adjustment - extend Orb::Internal::Type::Union + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration - Variants = - T.type_alias do - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void end + attr_writer :invoicing_cycle_configuration - sig do - override.returns( - T::Array[ - Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Variants - ] - ) - end - def self.variants - end - end - end - - 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 ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_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 + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the 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( - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) - ).void - end - attr_writer :allocation_price + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id - # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the - # replacement price. - sig { returns(T.nilable(T::Array[Orb::DiscountOverride])) } - attr_accessor :discounts + 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 - # The external price id of the price to add to the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + 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 new quantity of the price, if the price is a fixed price. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum - # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for - # the replacement price. - sig { returns(T.nilable(String)) } - attr_accessor :maximum_amount + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # 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 + 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 + ) - # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for - # the replacement price. - sig { returns(T.nilable(String)) } - attr_accessor :minimum_amount + sig do + override.returns( + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end - # New subscription price request body params. - sig do - returns( - T.nilable( - T.any( - Orb::NewSubscriptionUnitPrice, - Orb::NewSubscriptionTieredPrice, - Orb::NewSubscriptionBulkPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewSubscriptionPackagePrice, - Orb::NewSubscriptionMatrixPrice, - Orb::NewSubscriptionThresholdTotalAmountPrice, - Orb::NewSubscriptionTieredPackagePrice, - Orb::NewSubscriptionTieredWithMinimumPrice, - Orb::NewSubscriptionGroupedTieredPrice, - Orb::NewSubscriptionTieredPackageWithMinimumPrice, - Orb::NewSubscriptionPackageWithAllocationPrice, - Orb::NewSubscriptionUnitWithPercentPrice, - Orb::NewSubscriptionMatrixWithAllocationPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, - Orb::NewSubscriptionUnitWithProrationPrice, - Orb::NewSubscriptionGroupedAllocationPrice, - Orb::NewSubscriptionBulkWithProrationPrice, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::NewSubscriptionGroupedTieredPackagePrice, - Orb::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewSubscriptionMinimumCompositePrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent, - Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput - ) - ) - ) - end - attr_accessor :price + class PercentConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig, + Orb::Internal::AnyHash + ) + end - # The id of the price to add to the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :price_id + # What percent of the component subtotals to charge + sig { returns(Float) } + attr_accessor :percent - 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( + # 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::NewSubscriptionUnitPrice::OrHash, - Orb::NewSubscriptionTieredPrice::OrHash, - Orb::NewSubscriptionBulkPrice::OrHash, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::OrHash, - Orb::NewSubscriptionPackagePrice::OrHash, - Orb::NewSubscriptionMatrixPrice::OrHash, - Orb::NewSubscriptionThresholdTotalAmountPrice::OrHash, - Orb::NewSubscriptionTieredPackagePrice::OrHash, - Orb::NewSubscriptionTieredWithMinimumPrice::OrHash, - Orb::NewSubscriptionGroupedTieredPrice::OrHash, - Orb::NewSubscriptionTieredPackageWithMinimumPrice::OrHash, - Orb::NewSubscriptionPackageWithAllocationPrice::OrHash, - Orb::NewSubscriptionUnitWithPercentPrice::OrHash, - Orb::NewSubscriptionMatrixWithAllocationPrice::OrHash, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::OrHash, - Orb::NewSubscriptionUnitWithProrationPrice::OrHash, - Orb::NewSubscriptionGroupedAllocationPrice::OrHash, - Orb::NewSubscriptionBulkWithProrationPrice::OrHash, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice::OrHash, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice::OrHash, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::OrHash, - Orb::NewSubscriptionMatrixWithDisplayNamePrice::OrHash, - Orb::NewSubscriptionGroupedTieredPackagePrice::OrHash, - Orb::NewSubscriptionMaxGroupTieredPackagePrice::OrHash, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice::OrHash, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice::OrHash, - Orb::NewSubscriptionCumulativeGroupedBulkPrice::OrHash, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, - Orb::NewSubscriptionMinimumCompositePrice::OrHash, - Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent::OrHash, - Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput::OrHash + 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::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent, + Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput + ) + ) + ) + end + attr_accessor :price + + # The id of the price to add to the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :price_id + + sig do + params( + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), + discounts: T.nilable(T::Array[Orb::DiscountOverride::OrHash]), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + maximum_amount: T.nilable(String), + metric_parameter_overrides: T.nilable(T::Hash[Symbol, T.anything]), + minimum_amount: T.nilable(String), + price: + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice::OrHash, + Orb::NewSubscriptionTieredPrice::OrHash, + Orb::NewSubscriptionBulkPrice::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::OrHash, + Orb::NewSubscriptionPackagePrice::OrHash, + Orb::NewSubscriptionMatrixPrice::OrHash, + Orb::NewSubscriptionThresholdTotalAmountPrice::OrHash, + Orb::NewSubscriptionTieredPackagePrice::OrHash, + Orb::NewSubscriptionTieredWithMinimumPrice::OrHash, + Orb::NewSubscriptionGroupedTieredPrice::OrHash, + Orb::NewSubscriptionTieredPackageWithMinimumPrice::OrHash, + Orb::NewSubscriptionPackageWithAllocationPrice::OrHash, + Orb::NewSubscriptionUnitWithPercentPrice::OrHash, + Orb::NewSubscriptionMatrixWithAllocationPrice::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::OrHash, + Orb::NewSubscriptionUnitWithProrationPrice::OrHash, + Orb::NewSubscriptionGroupedAllocationPrice::OrHash, + Orb::NewSubscriptionBulkWithProrationPrice::OrHash, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice::OrHash, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::OrHash, + Orb::NewSubscriptionMatrixWithDisplayNamePrice::OrHash, + Orb::NewSubscriptionGroupedTieredPackagePrice::OrHash, + Orb::NewSubscriptionMaxGroupTieredPackagePrice::OrHash, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice::OrHash, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice::OrHash, + Orb::NewSubscriptionCumulativeGroupedBulkPrice::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::OrHash, + Orb::NewSubscriptionMinimumCompositePrice::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput::OrHash + ) + ), + price_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The id of the price on the plan to replace in the subscription. + replaces_price_id:, + # The definition of a new allocation price to create and add to the subscription. + allocation_price: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the + # replacement price. + discounts: nil, + # The external price id of the price to add to the subscription. + external_price_id: nil, + # The new quantity of the price, if the price is a fixed price. + fixed_price_quantity: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for + # the replacement price. + maximum_amount: nil, + # Override values for parameterized billable metric variables. Keys are parameter + # names, values are the override values. + metric_parameter_overrides: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for + # the replacement price. + minimum_amount: nil, + # New subscription price request body params. + price: nil, + # The id of the price to add to the subscription. + price_id: nil + ) + end + + sig do + override.returns( + { + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice), + discounts: T.nilable(T::Array[Orb::DiscountOverride]), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + maximum_amount: T.nilable(String), + metric_parameter_overrides: + T.nilable(T::Hash[Symbol, T.anything]), + minimum_amount: T.nilable(String), + price: + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent, + Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput + ) + ), + price_id: T.nilable(String) + } + ) + end + def to_hash + end + + # New subscription price request body params. + module Price + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent, + Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput + ) + end + + class BulkWithFilters < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, + Orb::Internal::AnyHash + ) + end + + # Configuration for bulk_with_filters pricing + sig do + returns( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + ) + end + attr_reader :bulk_with_filters_config + + sig do + params( + bulk_with_filters_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void + end + attr_writer :bulk_with_filters_config + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + bulk_with_filters_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, + cadence: + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # Configuration for bulk_with_filters pricing + bulk_with_filters_config:, + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :bulk_with_filters + ) + end + + sig do + override.returns( + { + bulk_with_filters_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash + ) + end + + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] + ) + end + attr_accessor :filters + + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + ) + end + attr_accessor :tiers + + # 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 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 ) - ), - 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( + 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 +5591,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 +5609,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 +5721,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 +5729,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 +5841,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 +5874,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 +5975,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 +6009,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 +6053,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 +6061,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 +6104,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 +6112,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 +6151,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 +6224,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 +6358,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 +6392,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 +6436,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 +6444,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 +6487,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 +6495,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 +6534,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 +6679,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 +6813,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 +6847,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 +6891,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 +6899,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 +6942,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 +6950,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 +6989,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..b3b6ab0c 100644 --- a/rbi/orb/models/subscription_price_intervals_params.rbi +++ b/rbi/orb/models/subscription_price_intervals_params.rbi @@ -278,6 +278,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 @@ -359,6 +361,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 @@ -476,6 +480,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 @@ -737,6 +743,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 @@ -1945,6 +1953,852 @@ module Orb end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # Configuration for daily_credit_allowance pricing + sig do + returns( + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + ) + end + attr_reader :daily_credit_allowance_config + + sig do + params( + daily_credit_allowance_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + ).void + end + attr_writer :daily_credit_allowance_config + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::OrSymbol, + currency: String, + daily_credit_allowance_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # The pricing model type + model_type: :daily_credit_allowance + ) + end + + sig do + override.returns( + { + cadence: + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::OrSymbol, + currency: String, + daily_credit_allowance_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + Orb::Internal::AnyHash + ) + end + + # Credits granted per day. Lose-it-or-use-it; does not roll over. + sig { returns(String) } + attr_accessor :daily_allowance + + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + sig { returns(String) } + attr_accessor :default_unit_amount + + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions + + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + sig { returns(String) } + attr_accessor :event_day_property + + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing + sig do + params( + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: + ) + end + + sig do + override.returns( + { + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end + end + end + + class MeteredAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for metered_allowance pricing + sig do + returns( + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig + ) + end + attr_reader :metered_allowance_config + + sig do + params( + metered_allowance_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash + ).void + end + attr_writer :metered_allowance_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::OrSymbol, + currency: String, + item_id: String, + metered_allowance_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # The id of the item the price will be associated with. + item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # The pricing model type + model_type: :metered_allowance + ) + end + + sig do + override.returns( + { + cadence: + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::OrSymbol, + currency: String, + item_id: String, + metered_allowance_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig, + Orb::Internal::AnyHash + ) + end + + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + sig { returns(String) } + attr_accessor :allowance_grouping_value + + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + sig { returns(String) } + attr_accessor :consumption_grouping_value + + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key + + # Per-unit price applied to gross consumption and to the allowance credit. + sig { returns(String) } + attr_accessor :unit_amount + + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing + sig do + params( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + ).returns(T.attached_class) + end + def self.new( + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil + ) + end + + sig do + override.returns( + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + ) + end + def to_hash + end + end + end + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/orb/models/subscription_schedule_plan_change_params.rbi b/rbi/orb/models/subscription_schedule_plan_change_params.rbi index c3ce458d..02473bde 100644 --- a/rbi/orb/models/subscription_schedule_plan_change_params.rbi +++ b/rbi/orb/models/subscription_schedule_plan_change_params.rbi @@ -673,6 +673,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 @@ -733,6 +735,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 @@ -819,6 +823,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 @@ -867,6 +873,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 @@ -2524,11 +2532,11 @@ module Orb end end - class Percent < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -2536,11 +2544,27 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence + # Configuration for daily_credit_allowance pricing + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + ) + end + attr_reader :daily_credit_allowance_config + + sig do + params( + daily_credit_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + ).void + end + attr_writer :daily_credit_allowance_config + # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -2553,22 +2577,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 +2678,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, name: String, - percent_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2704,12 +2712,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, - # Configuration for percent pricing - percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -2748,7 +2756,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :percent + model_type: :daily_credit_allowance ) end @@ -2756,12 +2764,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, model_type: Symbol, name: String, - percent_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2799,7 +2807,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2807,38 +2815,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -2846,38 +2854,144 @@ module Orb end end - class PercentConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent + # Credits granted per day. Lose-it-or-use-it; does not roll over. + sig { returns(String) } + attr_accessor :daily_allowance - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + sig { returns(String) } + attr_accessor :default_unit_amount + + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions + + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + sig { returns(String) } + attr_accessor :event_day_property + + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing + sig do + params( + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] + ).returns(T.attached_class) + end def self.new( - # What percent of the component subtotals to charge - percent: + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end - sig { override.returns({ percent: Float }) } + sig do + override.returns( + { + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + } + ) + end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end - class EventOutput < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -2885,30 +2999,30 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for event_output pricing + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for metered_allowance pricing sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig ) end - attr_reader :event_output_config + attr_reader :metered_allowance_config sig do params( - event_output_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash + metered_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::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 + attr_writer :metered_allowance_config # The pricing model type sig { returns(Symbol) } @@ -3019,10 +3133,10 @@ 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::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), @@ -3053,10 +3167,10 @@ 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:, + # 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 @@ -3097,7 +3211,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :event_output + model_type: :metered_allowance ) end @@ -3105,10 +3219,10 @@ 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::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), @@ -3148,7 +3262,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3156,38 +3270,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -3195,57 +3309,91 @@ module Orb end end - class EventOutputConfig < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # The key in the event data to extract the unit rate from. + # 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 :unit_rating_key + attr_accessor :allowance_grouping_value - # 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. + # 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_accessor :default_unit_rate + attr_reader :allowance_display_name - # 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 { 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_accessor :grouping_key + attr_reader :consumption_display_name - # Configuration for event_output pricing + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing sig do params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) + 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 key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil + # The 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( { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } ) end @@ -3254,524 +3402,2147 @@ module Orb end end - sig do - override.returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Variants - ] - ) - end - def self.variants - end - end - end + class Percent < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, + Orb::Internal::AnyHash + ) + end - # Reset billing periods to be aligned with the plan change's effective date or - # start of the month. Defaults to `unchanged` which keeps subscription's existing - # billing cycle alignment. - module BillingCycleAlignment - extend Orb::Internal::Type::Enum + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol + ) + end + attr_accessor :cadence - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - 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 - ) + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type - sig do - override.returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol - ] - ) - end - def self.values - end - end + # The name of the price. + sig { returns(String) } + attr_accessor :name - class RemoveAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::RemoveAdjustment, - Orb::Internal::AnyHash - ) - end + # Configuration for percent pricing + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig + ) + end + attr_reader :percent_config - # The id of the adjustment to remove on the subscription. - sig { returns(String) } - attr_accessor :adjustment_id + sig do + params( + percent_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig::OrHash + ).void + end + attr_writer :percent_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 + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id - sig { override.returns({ adjustment_id: String }) } - def to_hash - end - end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance - class RemovePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::RemovePrice, - Orb::Internal::AnyHash - ) - end + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration - # The external price id of the price to remove on the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration - # The id of the price to remove on the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :price_id + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate - sig do - params( - external_price_id: T.nilable(String), - price_id: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The external price id of the price to remove on the subscription. - external_price_id: nil, - # The id of the price to remove on the subscription. - price_id: nil - ) - end + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config - sig do - override.returns( - { - external_price_id: T.nilable(String), - price_id: T.nilable(String) - } - ) - end - def to_hash - end - end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment, - Orb::Internal::AnyHash - ) - end + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration - # The definition of a new adjustment to create and add to the subscription. - sig do - returns( - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - ) - end - attr_accessor :adjustment + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration - # The id of the adjustment on the plan to replace in the subscription. - sig { returns(String) } - attr_accessor :replaces_adjustment_id + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id - sig do - params( - adjustment: - T.any( - Orb::NewPercentageDiscount::OrHash, - Orb::NewUsageDiscount::OrHash, - Orb::NewAmountDiscount::OrHash, - Orb::NewMinimum::OrHash, - Orb::NewMaximum::OrHash - ), - replaces_adjustment_id: String - ).returns(T.attached_class) - end - def self.new( - # The definition of a new adjustment to create and add to the subscription. - adjustment:, - # The id of the adjustment on the plan to replace in the subscription. - replaces_adjustment_id: - ) - end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity - sig do - override.returns( - { - adjustment: - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ), - replaces_adjustment_id: String - } - ) - end - def to_hash - end + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key - # The definition of a new adjustment to create and add to the subscription. - module Adjustment - extend Orb::Internal::Type::Union + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration - Variants = - T.type_alias do - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void end + attr_writer :invoicing_cycle_configuration - sig do - override.returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::Variants - ] - ) - end - def self.variants - end - end - end - - class ReplacePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice, - Orb::Internal::AnyHash - ) - end + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id - # The id of the price on the plan to replace in the subscription. - sig { returns(String) } - attr_accessor :replaces_price_id + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata - # The definition of a new allocation price to create and add to the subscription. - sig { returns(T.nilable(Orb::NewAllocationPrice)) } - attr_reader :allocation_price + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id - sig do - params( - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) - ).void - end - attr_writer :allocation_price + 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 - # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the - # replacement price. - sig { returns(T.nilable(T::Array[Orb::DiscountOverride])) } - attr_accessor :discounts + sig do + override.returns( + { + 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 external price id of the price to add to the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum - # The new quantity of the price, if the price is a fixed price. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for - # the replacement price. - sig { returns(T.nilable(String)) } - attr_accessor :maximum_amount + 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 + ) - # 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 + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end - # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for - # the replacement price. - sig { returns(T.nilable(String)) } - attr_accessor :minimum_amount + class PercentConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig, + Orb::Internal::AnyHash + ) + end - # New subscription price request body params. - sig do - returns( - T.nilable( - T.any( - Orb::NewSubscriptionUnitPrice, - Orb::NewSubscriptionTieredPrice, - Orb::NewSubscriptionBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewSubscriptionPackagePrice, - Orb::NewSubscriptionMatrixPrice, - Orb::NewSubscriptionThresholdTotalAmountPrice, - Orb::NewSubscriptionTieredPackagePrice, - Orb::NewSubscriptionTieredWithMinimumPrice, - Orb::NewSubscriptionGroupedTieredPrice, - Orb::NewSubscriptionTieredPackageWithMinimumPrice, - Orb::NewSubscriptionPackageWithAllocationPrice, - Orb::NewSubscriptionUnitWithPercentPrice, - Orb::NewSubscriptionMatrixWithAllocationPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, - Orb::NewSubscriptionUnitWithProrationPrice, - Orb::NewSubscriptionGroupedAllocationPrice, - Orb::NewSubscriptionBulkWithProrationPrice, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::NewSubscriptionGroupedTieredPackagePrice, - Orb::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewSubscriptionMinimumCompositePrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput - ) - ) - ) - end - attr_accessor :price + # What percent of the component subtotals to charge + sig { returns(Float) } + attr_accessor :percent - # The id of the price to add to the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :price_id + # 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 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( + 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::NewSubscriptionUnitPrice::OrHash, - Orb::NewSubscriptionTieredPrice::OrHash, - Orb::NewSubscriptionBulkPrice::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::OrHash, - Orb::NewSubscriptionPackagePrice::OrHash, - Orb::NewSubscriptionMatrixPrice::OrHash, - Orb::NewSubscriptionThresholdTotalAmountPrice::OrHash, - Orb::NewSubscriptionTieredPackagePrice::OrHash, - Orb::NewSubscriptionTieredWithMinimumPrice::OrHash, - Orb::NewSubscriptionGroupedTieredPrice::OrHash, - Orb::NewSubscriptionTieredPackageWithMinimumPrice::OrHash, - Orb::NewSubscriptionPackageWithAllocationPrice::OrHash, - Orb::NewSubscriptionUnitWithPercentPrice::OrHash, - Orb::NewSubscriptionMatrixWithAllocationPrice::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::OrHash, - Orb::NewSubscriptionUnitWithProrationPrice::OrHash, - Orb::NewSubscriptionGroupedAllocationPrice::OrHash, - Orb::NewSubscriptionBulkWithProrationPrice::OrHash, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice::OrHash, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::OrHash, - Orb::NewSubscriptionMatrixWithDisplayNamePrice::OrHash, - Orb::NewSubscriptionGroupedTieredPackagePrice::OrHash, - Orb::NewSubscriptionMaxGroupTieredPackagePrice::OrHash, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice::OrHash, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice::OrHash, - Orb::NewSubscriptionCumulativeGroupedBulkPrice::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, - Orb::NewSubscriptionMinimumCompositePrice::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput::OrHash + 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::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput + ) + ) + ) + end + attr_accessor :price + + # The id of the price to add to the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :price_id + + sig do + params( + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), + discounts: T.nilable(T::Array[Orb::DiscountOverride::OrHash]), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + maximum_amount: T.nilable(String), + metric_parameter_overrides: T.nilable(T::Hash[Symbol, T.anything]), + minimum_amount: T.nilable(String), + price: + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice::OrHash, + Orb::NewSubscriptionTieredPrice::OrHash, + Orb::NewSubscriptionBulkPrice::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::OrHash, + Orb::NewSubscriptionPackagePrice::OrHash, + Orb::NewSubscriptionMatrixPrice::OrHash, + Orb::NewSubscriptionThresholdTotalAmountPrice::OrHash, + Orb::NewSubscriptionTieredPackagePrice::OrHash, + Orb::NewSubscriptionTieredWithMinimumPrice::OrHash, + Orb::NewSubscriptionGroupedTieredPrice::OrHash, + Orb::NewSubscriptionTieredPackageWithMinimumPrice::OrHash, + Orb::NewSubscriptionPackageWithAllocationPrice::OrHash, + Orb::NewSubscriptionUnitWithPercentPrice::OrHash, + Orb::NewSubscriptionMatrixWithAllocationPrice::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::OrHash, + Orb::NewSubscriptionUnitWithProrationPrice::OrHash, + Orb::NewSubscriptionGroupedAllocationPrice::OrHash, + Orb::NewSubscriptionBulkWithProrationPrice::OrHash, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice::OrHash, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::OrHash, + Orb::NewSubscriptionMatrixWithDisplayNamePrice::OrHash, + Orb::NewSubscriptionGroupedTieredPackagePrice::OrHash, + Orb::NewSubscriptionMaxGroupTieredPackagePrice::OrHash, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice::OrHash, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice::OrHash, + Orb::NewSubscriptionCumulativeGroupedBulkPrice::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::OrHash, + Orb::NewSubscriptionMinimumCompositePrice::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput::OrHash + ) + ), + price_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The id of the price on the plan to replace in the subscription. + replaces_price_id:, + # The definition of a new allocation price to create and add to the subscription. + allocation_price: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the + # replacement price. + discounts: nil, + # The external price id of the price to add to the subscription. + external_price_id: nil, + # The new quantity of the price, if the price is a fixed price. + fixed_price_quantity: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for + # the replacement price. + maximum_amount: nil, + # Override values for parameterized billable metric variables. Keys are parameter + # names, values are the override values. + metric_parameter_overrides: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for + # the replacement price. + minimum_amount: nil, + # New subscription price request body params. + price: nil, + # The id of the price to add to the subscription. + price_id: nil + ) + end + + sig do + override.returns( + { + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice), + discounts: T.nilable(T::Array[Orb::DiscountOverride]), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + maximum_amount: T.nilable(String), + metric_parameter_overrides: + T.nilable(T::Hash[Symbol, T.anything]), + minimum_amount: T.nilable(String), + price: + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput + ) + ), + price_id: T.nilable(String) + } + ) + end + def to_hash + end + + # New subscription price request body params. + module Price + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput + ) + end + + class BulkWithFilters < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, + Orb::Internal::AnyHash + ) + end + + # Configuration for bulk_with_filters pricing + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + ) + end + attr_reader :bulk_with_filters_config + + sig do + params( + bulk_with_filters_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void + end + attr_writer :bulk_with_filters_config + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + bulk_with_filters_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, + cadence: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # Configuration for bulk_with_filters pricing + bulk_with_filters_config:, + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :bulk_with_filters + ) + end + + sig do + override.returns( + { + bulk_with_filters_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash + ) + end + + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] + ) + end + attr_accessor :filters + + # 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 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 ) - ), - 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( + 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 +5656,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 +5674,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 +5786,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 +5794,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 +5906,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 +5939,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 +6040,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 +6074,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 +6118,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 +6126,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 +6169,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 +6177,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 +6216,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 +6289,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 +6423,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 +6457,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 +6501,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 +6509,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 +6552,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 +6560,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 +6599,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 +6744,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 +6878,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 +6912,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 +6956,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 +6964,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 +7007,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 +7015,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 +7054,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/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/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..ab8af31a 100644 --- a/rbi/orb/resources/prices.rbi +++ b/rbi/orb/resources/prices.rbi @@ -68,6 +68,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/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..f1a50f66 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,234 @@ 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::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 +356,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 +375,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 +396,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 +414,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 +439,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 +515,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 tiered_with_proration = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, + model_type: :tiered_with_proration, name: String, - tiered_config: Orb::TieredConfig, + 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::Tiered::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?, @@ -345,18 +542,16 @@ module Orb reference_id: String? } - class Tiered < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::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::Tiered::LicenseAllocation] - - attr_accessor model_type: :tiered + attr_accessor model_type: :tiered_with_proration attr_accessor name: String - attr_accessor tiered_config: Orb::TieredConfig + attr_accessor tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig attr_accessor billable_metric_id: String? @@ -366,7 +561,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::TieredWithProration::conversion_rate_config? attr_accessor currency: String? @@ -387,16 +582,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::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation], name: String, - tiered_config: Orb::TieredConfig, + 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::Tiered::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?, @@ -406,21 +600,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :tiered + ?model_type: :tiered_with_proration ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, + model_type: :tiered_with_proration, name: String, - tiered_config: Orb::TieredConfig, + 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::Tiered::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?, @@ -450,46 +643,57 @@ 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::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 = + type grouped_with_min_max_thresholds = { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::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::Bulk::LicenseAllocation], - model_type: :bulk, + 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::Bulk::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?, @@ -501,16 +705,14 @@ module Orb reference_id: String? } - class Bulk < Orb::Internal::Type::BaseModel - attr_accessor bulk_config: Orb::BulkConfig + 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::Bulk::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::Bulk::LicenseAllocation] - - attr_accessor model_type: :bulk + attr_accessor model_type: :grouped_with_min_max_thresholds attr_accessor name: String @@ -522,7 +724,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::GroupedWithMinMaxThresholds::conversion_rate_config? attr_accessor currency: String? @@ -543,16 +745,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::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::Bulk::LicenseAllocation], name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -562,21 +763,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :bulk + ?model_type: :grouped_with_min_max_thresholds ) -> void def to_hash: -> { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::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::Bulk::LicenseAllocation], - model_type: :bulk, + 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::Bulk::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?, @@ -606,46 +806,54 @@ 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::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 bulk_with_filters = + type cumulative_grouped_allocation = { - 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::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, + 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::BulkWithFilters::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?, @@ -657,16 +865,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 CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence + attr_accessor cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig 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: :cumulative_grouped_allocation attr_accessor name: String @@ -678,7 +884,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::CumulativeGroupedAllocation::conversion_rate_config? attr_accessor currency: String? @@ -699,16 +905,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::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, 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::CumulativeGroupedAllocation::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -718,21 +923,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :bulk_with_filters + ?model_type: :cumulative_grouped_allocation ) -> 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::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, + 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::BulkWithFilters::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?, @@ -744,64 +948,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 +966,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::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 package = + type daily_credit_allowance = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::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::Package::LicenseAllocation], - model_type: :package, + model_type: :daily_credit_allowance, 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::DailyCreditAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -871,19 +1025,17 @@ module Orb reference_id: String? } - class Package < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::cadence + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::cadence - attr_accessor item_id: String + attr_accessor daily_credit_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig - 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: :daily_credit_allowance attr_accessor name: String - attr_accessor package_config: Orb::PackageConfig - attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -892,7 +1044,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::DailyCreditAllowance::conversion_rate_config? attr_accessor currency: String? @@ -913,16 +1065,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::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, 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::DailyCreditAllowance::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -932,21 +1083,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :package + ?model_type: :daily_credit_allowance ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::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::Package::LicenseAllocation], - model_type: :package, + model_type: :daily_credit_allowance, 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::DailyCreditAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -976,46 +1126,78 @@ 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::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 + + 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::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 matrix = + type metered_allowance = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, + metered_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::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?, @@ -1027,16 +1209,14 @@ module Orb reference_id: String? } - class Matrix < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::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::Matrix::LicenseAllocation] - - attr_accessor matrix_config: Orb::MatrixConfig + attr_accessor metered_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig - attr_accessor model_type: :matrix + attr_accessor model_type: :metered_allowance attr_accessor name: String @@ -1048,7 +1228,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::MeteredAllowance::conversion_rate_config? attr_accessor currency: String? @@ -1069,16 +1249,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::MeteredAllowance::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, + metered_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::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?, @@ -1088,21 +1267,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :matrix + ?model_type: :metered_allowance ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, + metered_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::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?, @@ -1132,46 +1310,68 @@ 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::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 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? - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + def allowance_display_name=: (String) -> String - attr_accessor currency: String + attr_reader consumption_display_name: String? - attr_accessor write_off_overage: bool? + def consumption_display_name=: (String) -> String def initialize: ( - amount: String, - currency: String, - ?write_off_overage: 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: -> { - amount: String, - currency: String, - write_off_overage: bool? + 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 threshold_total_amount = + type percent = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, + model_type: :percent, name: String, - threshold_total_amount_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, + 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::ThresholdTotalAmount::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?, @@ -1183,18 +1383,16 @@ module Orb reference_id: String? } - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::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::ThresholdTotalAmount::LicenseAllocation] - - attr_accessor model_type: :threshold_total_amount + attr_accessor model_type: :percent attr_accessor name: String - attr_accessor threshold_total_amount_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig + attr_accessor percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig attr_accessor billable_metric_id: String? @@ -1204,7 +1402,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::Percent::conversion_rate_config? attr_accessor currency: String? @@ -1225,16 +1423,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::Percent::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], name: String, - threshold_total_amount_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, + 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::ThresholdTotalAmount::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?, @@ -1244,21 +1441,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :threshold_total_amount + ?model_type: :percent ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, + model_type: :percent, name: String, - threshold_total_amount_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, + 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::ThresholdTotalAmount::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?, @@ -1288,84 +1484,32 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence] end - type threshold_total_amount_config = - { - consumption_table: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? - } - - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - attr_accessor consumption_table: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable] - - attr_accessor prorate: bool? - - def initialize: ( - consumption_table: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - ?prorate: bool? - ) -> void - - def to_hash: -> { - consumption_table: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? - } - - type consumption_table = - { threshold: String, total_amount: String } - - class ConsumptionTable < Orb::Internal::Type::BaseModel - attr_accessor threshold: String + type percent_config = { percent: Float } - attr_accessor total_amount: String + class PercentConfig < Orb::Internal::Type::BaseModel + attr_accessor percent: Float - def initialize: ( - threshold: String, - total_amount: String - ) -> void + def initialize: (percent: Float) -> void - def to_hash: -> { threshold: String, total_amount: String } - end + def to_hash: -> { percent: Float } end end - type tiered_package = + type event_output = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::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::TieredPackage::LicenseAllocation], - model_type: :tiered_package, + model_type: :event_output, name: String, - tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1377,19 +1521,17 @@ module Orb reference_id: String? } - class TieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::cadence + class EventOutput < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence - attr_accessor item_id: String + attr_accessor event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation] + attr_accessor item_id: String - attr_accessor model_type: :tiered_package + attr_accessor model_type: :event_output attr_accessor name: String - attr_accessor tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig - attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -1398,7 +1540,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::EventOutput::conversion_rate_config? attr_accessor currency: String? @@ -1419,16 +1561,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::EventOutput::cadence, + event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation], name: String, - tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1438,21 +1579,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :tiered_package + ?model_type: :event_output ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::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::TieredPackage::LicenseAllocation], - model_type: :tiered_package, + model_type: :event_output, name: String, - tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1482,297 +1622,364 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::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? } + 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_package_config = - { - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - } + def self?.variants: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::price] + end + end - class TieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor package_size: String + type remove_adjustment = + { adjustment_id: String, plan_phase_order: Integer? } - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] + class RemoveAdjustment < Orb::Internal::Type::BaseModel + attr_accessor adjustment_id: String - def initialize: ( - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - ) -> void + attr_accessor plan_phase_order: Integer? - def to_hash: -> { - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - } + def initialize: ( + adjustment_id: String, + ?plan_phase_order: Integer? + ) -> void - type tier = { per_unit: String, tier_lower_bound: String } + def to_hash: -> { adjustment_id: String, plan_phase_order: Integer? } + end - class Tier < Orb::Internal::Type::BaseModel - attr_accessor per_unit: String + type remove_price = { price_id: String, plan_phase_order: Integer? } - attr_accessor tier_lower_bound: String + class RemovePrice < Orb::Internal::Type::BaseModel + attr_accessor price_id: String - def initialize: ( - per_unit: String, - tier_lower_bound: String - ) -> void + attr_accessor plan_phase_order: Integer? - def to_hash: -> { per_unit: String, tier_lower_bound: String } - end - end - end + def initialize: ( + price_id: String, + ?plan_phase_order: Integer? + ) -> void - type tiered_with_minimum = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - model_type: :tiered_with_minimum, - name: String, - tiered_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation] - - attr_accessor model_type: :tiered_with_minimum - - attr_accessor name: String - - attr_accessor tiered_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig - - attr_accessor billable_metric_id: String? + def to_hash: -> { price_id: String, plan_phase_order: Integer? } + end - attr_accessor billed_in_advance: bool? + type replace_adjustment = + { + adjustment: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment, + replaces_adjustment_id: String, + plan_phase_order: Integer? + } - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + attr_accessor adjustment: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment - attr_accessor conversion_rate: Float? + attr_accessor replaces_adjustment_id: String - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config? + attr_accessor plan_phase_order: Integer? - attr_accessor currency: String? + def initialize: ( + adjustment: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment, + replaces_adjustment_id: String, + ?plan_phase_order: Integer? + ) -> void - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + def to_hash: -> { + adjustment: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment, + replaces_adjustment_id: String, + plan_phase_order: Integer? + } - attr_accessor external_price_id: String? + type adjustment = + Orb::NewPercentageDiscount + | Orb::NewUsageDiscount + | Orb::NewAmountDiscount + | Orb::NewMinimum + | Orb::NewMaximum - attr_accessor fixed_price_quantity: Float? + module Adjustment + extend Orb::Internal::Type::Union - attr_accessor invoice_grouping_key: String? + def self?.variants: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment] + end + end - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + 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 license_type_id: String? + class ReplacePrice < Orb::Internal::Type::BaseModel + attr_accessor replaces_price_id: String - attr_accessor metadata: ::Hash[Symbol, String?]? + attr_accessor allocation_price: Orb::NewAllocationPrice? - attr_accessor reference_id: String? + attr_accessor license_allocation_price: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice? - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - name: String, - tiered_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_with_minimum - ) -> void + attr_accessor plan_phase_order: Integer? - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - model_type: :tiered_with_minimum, - name: String, - tiered_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } + attr_accessor price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::price? - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom + 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 - module Cadence - extend Orb::Internal::Type::Enum + 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? + } - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :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? - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence] - end + attr_accessor invoice_grouping_key: String? - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + attr_accessor license_type_id: String? - attr_accessor currency: String + attr_accessor metadata: ::Hash[Symbol, String?]? - attr_accessor write_off_overage: bool? + attr_accessor reference_id: String? - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void + def initialize: ( + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String? + ) -> void - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end + def to_hash: -> { + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } - type tiered_with_minimum_config = - { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool - } + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier] + module Cadence + extend Orb::Internal::Type::Enum - attr_reader hide_zero_amount_tiers: bool? + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom - def hide_zero_amount_tiers=: (bool) -> bool + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::cadence] + end - attr_reader prorate: bool? + type license_allocation = + { amount: String, currency: String, write_off_overage: bool? } - def prorate=: (bool) -> bool + class LicenseAllocation < Orb::Internal::Type::BaseModel + attr_accessor amount: String - def initialize: ( - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - ?hide_zero_amount_tiers: bool, - ?prorate: bool - ) -> void + attr_accessor currency: String - def to_hash: -> { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool - } + attr_accessor write_off_overage: bool? - type tier = - { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } + def initialize: ( + amount: String, + currency: String, + ?write_off_overage: bool? + ) -> void - class Tier < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String + def to_hash: -> { + amount: String, + currency: String, + write_off_overage: bool? + } + end - attr_accessor tier_lower_bound: String + type model_type = :unit - attr_accessor unit_amount: String + module ModelType + extend Orb::Internal::Type::Enum + + UNIT: :unit + + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::model_type] + end + end - def initialize: ( - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - ) -> 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::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: -> { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - end - end - end + module Price + extend Orb::Internal::Type::Union - type grouped_tiered = + type bulk_with_filters = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, + 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::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::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::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?, @@ -1784,16 +1991,14 @@ module Orb reference_id: String? } - class GroupedTiered < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::cadence + class BulkWithFilters < Orb::Internal::Type::BaseModel + attr_accessor bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig - attr_accessor grouped_tiered_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::cadence attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation] - - attr_accessor model_type: :grouped_tiered + attr_accessor model_type: :bulk_with_filters attr_accessor name: String @@ -1805,7 +2010,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::conversion_rate_config? attr_accessor currency: String? @@ -1826,16 +2031,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, + 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::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?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1845,21 +2049,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::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, + 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::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::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::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?, @@ -1871,10835 +2074,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::AddPrice::LicenseAllocationPrice::GroupedTiered::cadence] - end - - type grouped_tiered_config = + type bulk_with_filters_config = { - grouping_key: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] + filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::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::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter] - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] + attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] def initialize: ( - grouping_key: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] + filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] ) -> void def to_hash: -> { - grouping_key: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] + filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::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 unit_amount: String + attr_accessor property_value: String def initialize: ( - tier_lower_bound: String, - unit_amount: String + property_key: String, + property_value: String ) -> void def to_hash: -> { - tier_lower_bound: String, - unit_amount: String + property_key: String, + property_value: String } end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered_package_with_minimum = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - model_type: :tiered_package_with_minimum, - name: String, - tiered_package_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation] - - attr_accessor model_type: :tiered_package_with_minimum - - attr_accessor name: String - - attr_accessor tiered_package_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - name: String, - tiered_package_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_package_with_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - model_type: :tiered_package_with_minimum, - name: String, - tiered_package_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_package_with_minimum_config = - { - package_size: Float, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - } - - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor package_size: Float - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - - def initialize: ( - package_size: Float, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - ) -> void - - def to_hash: -> { - package_size: Float, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - } - - type tier = - { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } + type tier = { unit_amount: 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 + attr_accessor unit_amount: String - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - model_type: :package_with_allocation, - name: String, - package_with_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type package_with_allocation_config = - { - allocation: String, - package_amount: String, - package_size: String - } - - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor allocation: String - - attr_accessor package_amount: String - - attr_accessor package_size: String - - def initialize: ( - allocation: String, - package_amount: String, - package_size: String - ) -> void - - def to_hash: -> { - allocation: String, - package_amount: String, - package_size: String - } - end - end - - type unit_with_percent = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - model_type: :unit_with_percent, - name: String, - unit_with_percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class UnitWithPercent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation] - - attr_accessor model_type: :unit_with_percent - - attr_accessor name: String - - attr_accessor unit_with_percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - name: String, - unit_with_percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit_with_percent - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - model_type: :unit_with_percent, - name: String, - unit_with_percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type unit_with_percent_config = - { percent: String, unit_amount: String } - - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - attr_accessor percent: String - - attr_accessor unit_amount: String - - def initialize: (percent: String, unit_amount: String) -> void - - def to_hash: -> { percent: String, unit_amount: String } - end - end - - type matrix_with_allocation = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - model_type: :matrix_with_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation] - - attr_accessor matrix_with_allocation_config: Orb::MatrixWithAllocationConfig - - attr_accessor model_type: :matrix_with_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix_with_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - model_type: :matrix_with_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered_with_proration = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation] - - attr_accessor model_type: :tiered_with_proration - - attr_accessor name: String - - attr_accessor tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - name: String, - tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_with_proration - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_with_proration_config = - { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - } - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type unit_with_proration = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - model_type: :unit_with_proration, - name: String, - unit_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class UnitWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation] - - attr_accessor model_type: :unit_with_proration - - attr_accessor name: String - - attr_accessor unit_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - name: String, - unit_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit_with_proration - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - model_type: :unit_with_proration, - name: String, - unit_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type unit_with_proration_config = { unit_amount: String } - - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - def initialize: (unit_amount: String) -> void - - def to_hash: -> { unit_amount: String } - end - end - - type grouped_allocation = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - model_type: :grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::cadence - - attr_accessor grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation] - - attr_accessor model_type: :grouped_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - model_type: :grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::cadence] - end - - type grouped_allocation_config = - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor allocation: String - - attr_accessor grouping_key: String - - attr_accessor overage_unit_rate: String - - def initialize: ( - allocation: String, - grouping_key: String, - overage_unit_rate: String - ) -> void - - def to_hash: -> { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type bulk_with_proration = - { - bulk_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - model_type: :bulk_with_proration, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class BulkWithProration < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig - - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation] - - attr_accessor model_type: :bulk_with_proration - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk_with_proration - ) -> void - - def to_hash: -> { - bulk_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - model_type: :bulk_with_proration, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type bulk_with_proration_config = - { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - } - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - } - - type tier = { unit_amount: String, tier_lower_bound: String? } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - attr_accessor tier_lower_bound: String? - - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void - - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_prorated_minimum = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - model_type: :grouped_with_prorated_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence - - attr_accessor grouped_with_prorated_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation] - - attr_accessor model_type: :grouped_with_prorated_minimum - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_prorated_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - model_type: :grouped_with_prorated_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence] - end - - type grouped_with_prorated_minimum_config = - { grouping_key: String, minimum: String, unit_rate: String } - - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor minimum: String - - attr_accessor unit_rate: String - - def initialize: ( - grouping_key: String, - minimum: String, - unit_rate: String - ) -> void - - def to_hash: -> { - grouping_key: String, - minimum: String, - unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_metered_minimum = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - model_type: :grouped_with_metered_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence - - attr_accessor grouped_with_metered_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation] - - attr_accessor model_type: :grouped_with_metered_minimum - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_metered_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - model_type: :grouped_with_metered_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence] - end - - type grouped_with_metered_minimum_config = - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - } - - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor minimum_unit_amount: String - - attr_accessor pricing_key: String - - attr_accessor scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor] - - attr_accessor scaling_key: String - - attr_accessor unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - - def initialize: ( - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - ) -> void - - def to_hash: -> { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - } - - type scaling_factor = - { scaling_factor: String, scaling_value: String } - - class ScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor scaling_factor: String - - attr_accessor scaling_value: String - - def initialize: ( - scaling_factor: String, - scaling_value: String - ) -> void - - def to_hash: -> { - scaling_factor: String, - scaling_value: String - } - end - - type unit_amount = - { pricing_value: String, unit_amount: String } - - class UnitAmount < Orb::Internal::Type::BaseModel - attr_accessor pricing_value: String - - attr_accessor unit_amount: String - - def initialize: ( - pricing_value: String, - unit_amount: String - ) -> void - - def to_hash: -> { pricing_value: String, unit_amount: String } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_min_max_thresholds = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence - - attr_accessor grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation] - - attr_accessor model_type: :grouped_with_min_max_thresholds - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_min_max_thresholds - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence] - end - - type grouped_with_min_max_thresholds_config = - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor maximum_charge: String - - attr_accessor minimum_charge: String - - attr_accessor per_unit_rate: String - - def initialize: ( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ) -> void - - def to_hash: -> { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type matrix_with_display_name = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: :matrix_with_display_name, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation] - - attr_accessor matrix_with_display_name_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig - - attr_accessor model_type: :matrix_with_display_name - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix_with_display_name - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: :matrix_with_display_name, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type matrix_with_display_name_config = - { - dimension: String, - unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - } - - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - attr_accessor dimension: String - - attr_accessor unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - - def initialize: ( - dimension: String, - unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - ) -> void - - def to_hash: -> { - dimension: String, - unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - } - - type unit_amount = - { - dimension_value: String, - display_name: String, - unit_amount: String - } - - class UnitAmount < Orb::Internal::Type::BaseModel - attr_accessor dimension_value: String - - attr_accessor display_name: String - - attr_accessor unit_amount: String - - def initialize: ( - dimension_value: String, - display_name: String, - unit_amount: String - ) -> void - - def to_hash: -> { - dimension_value: String, - display_name: String, - unit_amount: String - } - end - end - end - - type grouped_tiered_package = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - model_type: :grouped_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::cadence - - attr_accessor grouped_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation] - - attr_accessor model_type: :grouped_tiered_package - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - model_type: :grouped_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::cadence] - end - - type grouped_tiered_package_config = - { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - } - - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - - def initialize: ( - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - } - - type tier = { per_unit: String, tier_lower_bound: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { per_unit: String, tier_lower_bound: String } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type max_group_tiered_package = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: :max_group_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation] - - attr_accessor max_group_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - - attr_accessor model_type: :max_group_tiered_package - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :max_group_tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: :max_group_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type max_group_tiered_package_config = - { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - } - - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - - def initialize: ( - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type scalable_matrix_with_unit_pricing = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - model_type: :scalable_matrix_with_unit_pricing, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation] - - attr_accessor model_type: :scalable_matrix_with_unit_pricing - - attr_accessor name: String - - attr_accessor scalable_matrix_with_unit_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - name: String, - scalable_matrix_with_unit_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :scalable_matrix_with_unit_pricing - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - model_type: :scalable_matrix_with_unit_pricing, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type scalable_matrix_with_unit_pricing_config = - { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - grouping_key: String?, - prorate: bool?, - second_dimension: String? - } - - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - attr_accessor first_dimension: String - - attr_accessor matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor] - - attr_accessor unit_price: String - - attr_accessor grouping_key: String? - - attr_accessor prorate: bool? - - attr_accessor second_dimension: String? - - def initialize: ( - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - ?grouping_key: String?, - ?prorate: bool?, - ?second_dimension: String? - ) -> void - - def to_hash: -> { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - grouping_key: String?, - prorate: bool?, - second_dimension: String? - } - - type matrix_scaling_factor = - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor first_dimension_value: String - - attr_accessor scaling_factor: String - - attr_accessor second_dimension_value: String? - - def initialize: ( - first_dimension_value: String, - scaling_factor: String, - ?second_dimension_value: String? - ) -> void - - def to_hash: -> { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - end - end - end - - type scalable_matrix_with_tiered_pricing = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - model_type: :scalable_matrix_with_tiered_pricing, - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation] - - attr_accessor model_type: :scalable_matrix_with_tiered_pricing - - attr_accessor name: String - - attr_accessor scalable_matrix_with_tiered_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :scalable_matrix_with_tiered_pricing - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - model_type: :scalable_matrix_with_tiered_pricing, - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type scalable_matrix_with_tiered_pricing_config = - { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - second_dimension: String? - } - - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - attr_accessor first_dimension: String - - attr_accessor matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor] - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier] - - attr_accessor second_dimension: String? - - def initialize: ( - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - ?second_dimension: String? - ) -> void - - def to_hash: -> { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - second_dimension: String? - } - - type matrix_scaling_factor = - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor first_dimension_value: String - - attr_accessor scaling_factor: String - - attr_accessor second_dimension_value: String? - - def initialize: ( - first_dimension_value: String, - scaling_factor: String, - ?second_dimension_value: String? - ) -> void - - def to_hash: -> { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - end - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type cumulative_grouped_bulk = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - model_type: :cumulative_grouped_bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence - - attr_accessor cumulative_grouped_bulk_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation] - - attr_accessor model_type: :cumulative_grouped_bulk - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :cumulative_grouped_bulk - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - model_type: :cumulative_grouped_bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence] - end - - type cumulative_grouped_bulk_config = - { - dimension_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String - } - - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - attr_accessor dimension_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue] - - attr_accessor group: String - - def initialize: ( - dimension_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String - ) -> void - - def to_hash: -> { - dimension_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String - } - - type dimension_value = - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - - class DimensionValue < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type cumulative_grouped_allocation = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - model_type: :cumulative_grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence - - attr_accessor cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation] - - attr_accessor model_type: :cumulative_grouped_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :cumulative_grouped_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - model_type: :cumulative_grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence] - end - - type cumulative_grouped_allocation_config = - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor cumulative_allocation: String - - attr_accessor group_allocation: String - - attr_accessor grouping_key: String - - attr_accessor unit_amount: String - - def initialize: ( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ) -> void - - def to_hash: -> { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type minimum_composite = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: :minimum_composite, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MinimumComposite < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation] - - attr_accessor minimum_composite_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig - - attr_accessor model_type: :minimum_composite - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :minimum_composite - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: :minimum_composite, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type minimum_composite_config = - { minimum_amount: String, prorated: bool } - - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String - - attr_reader prorated: bool? - - def prorated=: (bool) -> bool - - def initialize: ( - minimum_amount: String, - ?prorated: bool - ) -> void - - def to_hash: -> { minimum_amount: String, prorated: bool } - end - end - - type percent = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation], - model_type: :percent, - name: String, - percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Percent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation] - - attr_accessor model_type: :percent - - attr_accessor name: String - - attr_accessor percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation], - name: String, - percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :percent - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation], - model_type: :percent, - name: String, - percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type percent_config = { percent: Float } - - class PercentConfig < Orb::Internal::Type::BaseModel - attr_accessor percent: Float - - def initialize: (percent: Float) -> void - - def to_hash: -> { percent: Float } - end - end - - type event_output = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation], - model_type: :event_output, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class EventOutput < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::cadence - - attr_accessor event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation] - - attr_accessor model_type: :event_output - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :event_output - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation], - model_type: :event_output, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::cadence] - end - - type event_output_config = - { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? - } - - class EventOutputConfig < Orb::Internal::Type::BaseModel - attr_accessor unit_rating_key: String - - attr_accessor default_unit_rate: String? - - attr_accessor grouping_key: String? - - def initialize: ( - unit_rating_key: String, - ?default_unit_rate: String?, - ?grouping_key: String? - ) -> void - - def to_hash: -> { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - def self?.variants: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::license_allocation_price] - end - - type price = - Orb::NewPlanUnitPrice - | Orb::NewPlanTieredPrice - | Orb::NewPlanBulkPrice - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters - | Orb::NewPlanPackagePrice - | Orb::NewPlanMatrixPrice - | Orb::NewPlanThresholdTotalAmountPrice - | Orb::NewPlanTieredPackagePrice - | Orb::NewPlanTieredWithMinimumPrice - | Orb::NewPlanGroupedTieredPrice - | Orb::NewPlanTieredPackageWithMinimumPrice - | Orb::NewPlanPackageWithAllocationPrice - | Orb::NewPlanUnitWithPercentPrice - | Orb::NewPlanMatrixWithAllocationPrice - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration - | Orb::NewPlanUnitWithProrationPrice - | Orb::NewPlanGroupedAllocationPrice - | Orb::NewPlanBulkWithProrationPrice - | Orb::NewPlanGroupedWithProratedMinimumPrice - | Orb::NewPlanGroupedWithMeteredMinimumPrice - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds - | Orb::NewPlanMatrixWithDisplayNamePrice - | Orb::NewPlanGroupedTieredPackagePrice - | Orb::NewPlanMaxGroupTieredPackagePrice - | Orb::NewPlanScalableMatrixWithUnitPricingPrice - | Orb::NewPlanScalableMatrixWithTieredPricingPrice - | Orb::NewPlanCumulativeGroupedBulkPrice - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation - | Orb::NewPlanMinimumCompositePrice - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput - - module Price - extend Orb::Internal::Type::Union - - type bulk_with_filters = - { - bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, - item_id: String, - model_type: :bulk_with_filters, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class BulkWithFilters < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig - - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :bulk_with_filters - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, - item_id: String, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk_with_filters - ) -> void - - def to_hash: -> { - bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, - item_id: String, - model_type: :bulk_with_filters, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type bulk_with_filters_config = - { - filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - attr_accessor filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter] - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - - def initialize: ( - filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - ) -> void - - def to_hash: -> { - filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - type filter = { property_key: String, property_value: String } - - class Filter < Orb::Internal::Type::BaseModel - attr_accessor property_key: String - - attr_accessor property_value: String - - def initialize: ( - property_key: String, - property_value: String - ) -> void - - def to_hash: -> { - property_key: String, - property_value: String - } - end - - type tier = { unit_amount: String, tier_lower_bound: String? } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - attr_accessor tier_lower_bound: String? - - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void - - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence] - end - end - - type tiered_with_proration = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, - item_id: String, - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :tiered_with_proration - - attr_accessor name: String - - attr_accessor tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, - item_id: String, - name: String, - tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_with_proration - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, - item_id: String, - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence] - end - - type tiered_with_proration_config = - { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] - } - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type grouped_with_min_max_thresholds = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence - - attr_accessor grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - - attr_accessor item_id: String - - attr_accessor model_type: :grouped_with_min_max_thresholds - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_min_max_thresholds - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence] - end - - type grouped_with_min_max_thresholds_config = - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor maximum_charge: String - - attr_accessor minimum_charge: String - - attr_accessor per_unit_rate: String - - def initialize: ( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ) -> void - - def to_hash: -> { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - end - end - - type cumulative_grouped_allocation = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - model_type: :cumulative_grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence - - attr_accessor cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - - attr_accessor item_id: String - - attr_accessor model_type: :cumulative_grouped_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :cumulative_grouped_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - model_type: :cumulative_grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence] - end - - type cumulative_grouped_allocation_config = - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor cumulative_allocation: String - - attr_accessor group_allocation: String - - attr_accessor grouping_key: String - - attr_accessor unit_amount: String - - def initialize: ( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ) -> void - - def to_hash: -> { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - end - end - - type percent = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence, - item_id: String, - model_type: :percent, - name: String, - percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Percent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :percent - - attr_accessor name: String - - attr_accessor percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence, - item_id: String, - name: String, - percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :percent - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence, - item_id: String, - model_type: :percent, - name: String, - percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence] - end - - type percent_config = { percent: Float } - - class PercentConfig < Orb::Internal::Type::BaseModel - attr_accessor percent: Float - - def initialize: (percent: Float) -> void - - def to_hash: -> { percent: Float } - end - end - - type event_output = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, - event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, - item_id: String, - model_type: :event_output, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class EventOutput < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence - - attr_accessor event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig - - attr_accessor item_id: String - - attr_accessor model_type: :event_output - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, - event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, - item_id: String, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :event_output - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, - event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, - item_id: String, - model_type: :event_output, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence] - end - - type event_output_config = - { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? - } - - class EventOutputConfig < Orb::Internal::Type::BaseModel - attr_accessor unit_rating_key: String - - attr_accessor default_unit_rate: String? - - attr_accessor grouping_key: String? - - def initialize: ( - unit_rating_key: String, - ?default_unit_rate: String?, - ?grouping_key: String? - ) -> void - - def to_hash: -> { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? - } - end - end - - def self?.variants: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::price] - end - end - - type remove_adjustment = - { adjustment_id: String, plan_phase_order: Integer? } - - class RemoveAdjustment < Orb::Internal::Type::BaseModel - attr_accessor adjustment_id: String - - attr_accessor plan_phase_order: Integer? - - def initialize: ( - adjustment_id: String, - ?plan_phase_order: Integer? - ) -> void - - def to_hash: -> { adjustment_id: String, plan_phase_order: Integer? } - end - - type remove_price = { price_id: String, plan_phase_order: Integer? } - - class RemovePrice < Orb::Internal::Type::BaseModel - attr_accessor price_id: String - - attr_accessor plan_phase_order: Integer? - - def initialize: ( - price_id: String, - ?plan_phase_order: Integer? - ) -> void - - def to_hash: -> { price_id: String, plan_phase_order: Integer? } - end - - type replace_adjustment = - { - adjustment: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment, - replaces_adjustment_id: String, - plan_phase_order: Integer? - } - - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - attr_accessor adjustment: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment - - attr_accessor replaces_adjustment_id: String - - attr_accessor plan_phase_order: Integer? - - def initialize: ( - adjustment: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment, - replaces_adjustment_id: String, - ?plan_phase_order: Integer? - ) -> void - - def to_hash: -> { - adjustment: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment, - replaces_adjustment_id: String, - plan_phase_order: Integer? - } - - type adjustment = - Orb::NewPercentageDiscount - | Orb::NewUsageDiscount - | Orb::NewAmountDiscount - | Orb::NewMinimum - | Orb::NewMaximum - - module Adjustment - extend Orb::Internal::Type::Union - - def self?.variants: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment] - end - end - - type replace_price = - { - replaces_price_id: String, - allocation_price: Orb::NewAllocationPrice?, - license_allocation_price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::license_allocation_price?, - plan_phase_order: Integer?, - price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::price? - } - - class ReplacePrice < Orb::Internal::Type::BaseModel - attr_accessor replaces_price_id: String - - attr_accessor allocation_price: Orb::NewAllocationPrice? - - attr_accessor license_allocation_price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::license_allocation_price? - - attr_accessor plan_phase_order: Integer? - - attr_accessor price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::price? - - def initialize: ( - replaces_price_id: String, - ?allocation_price: Orb::NewAllocationPrice?, - ?license_allocation_price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::license_allocation_price?, - ?plan_phase_order: Integer?, - ?price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::price? - ) -> void - - def to_hash: -> { - replaces_price_id: String, - allocation_price: Orb::NewAllocationPrice?, - license_allocation_price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::license_allocation_price?, - plan_phase_order: Integer?, - price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::price? - } - - type license_allocation_price = - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput - - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - type unit = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation], - model_type: :unit, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Unit < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation] - - attr_accessor model_type: :unit - - attr_accessor name: String - - attr_accessor unit_config: Orb::UnitConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation], - name: String, - unit_config: Orb::UnitConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation], - model_type: :unit, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, - name: String, - tiered_config: Orb::TieredConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Tiered < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation] - - attr_accessor model_type: :tiered - - attr_accessor name: String - - attr_accessor tiered_config: Orb::TieredConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - name: String, - tiered_config: Orb::TieredConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, - name: String, - tiered_config: Orb::TieredConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type bulk = - { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation], - model_type: :bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Bulk < Orb::Internal::Type::BaseModel - attr_accessor bulk_config: Orb::BulkConfig - - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation] - - attr_accessor model_type: :bulk - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk - ) -> void - - def to_hash: -> { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation], - model_type: :bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type bulk_with_filters = - { - bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class BulkWithFilters < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig - - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation] - - attr_accessor model_type: :bulk_with_filters - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk_with_filters - ) -> void - - def to_hash: -> { - bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type bulk_with_filters_config = - { - filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - attr_accessor filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter] - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - - def initialize: ( - filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - ) -> void - - def to_hash: -> { - filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - type filter = { property_key: String, property_value: String } - - class Filter < Orb::Internal::Type::BaseModel - attr_accessor property_key: String - - attr_accessor property_value: String - - def initialize: ( - property_key: String, - property_value: String - ) -> void - - def to_hash: -> { - property_key: String, - property_value: String - } - end - - type tier = { unit_amount: String, tier_lower_bound: String? } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - attr_accessor tier_lower_bound: String? - - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void - - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type package = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation], - model_type: :package, - name: String, - package_config: Orb::PackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Package < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation] - - attr_accessor model_type: :package - - attr_accessor name: String - - attr_accessor package_config: Orb::PackageConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation], - name: String, - package_config: Orb::PackageConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation], - model_type: :package, - name: String, - package_config: Orb::PackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type matrix = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Matrix < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation] - - attr_accessor matrix_config: Orb::MatrixConfig - - attr_accessor model_type: :matrix - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type threshold_total_amount = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, - name: String, - threshold_total_amount_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation] - - attr_accessor model_type: :threshold_total_amount - - attr_accessor name: String - - attr_accessor threshold_total_amount_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - name: String, - threshold_total_amount_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :threshold_total_amount - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, - name: String, - threshold_total_amount_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type threshold_total_amount_config = - { - consumption_table: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? - } - - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - attr_accessor consumption_table: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable] - - attr_accessor prorate: bool? - - def initialize: ( - consumption_table: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - ?prorate: bool? - ) -> void - - def to_hash: -> { - consumption_table: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? - } - - type consumption_table = - { threshold: String, total_amount: String } - - class ConsumptionTable < Orb::Internal::Type::BaseModel - attr_accessor threshold: String - - attr_accessor total_amount: String - - def initialize: ( - threshold: String, - total_amount: String - ) -> void - - def to_hash: -> { threshold: String, total_amount: String } - end - end - end - - type tiered_package = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - model_type: :tiered_package, - name: String, - tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation] - - attr_accessor model_type: :tiered_package - - attr_accessor name: String - - attr_accessor tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - name: String, - tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - model_type: :tiered_package, - name: String, - tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_package_config = - { - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - } - - class TieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - - def initialize: ( - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - } - - type tier = { per_unit: String, tier_lower_bound: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { per_unit: String, tier_lower_bound: String } - end - end - end - - type tiered_with_minimum = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - model_type: :tiered_with_minimum, - name: String, - tiered_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation] - - attr_accessor model_type: :tiered_with_minimum - - attr_accessor name: String - - attr_accessor tiered_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - name: String, - tiered_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_with_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - model_type: :tiered_with_minimum, - name: String, - tiered_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_with_minimum_config = - { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool - } - - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier] - - attr_reader hide_zero_amount_tiers: bool? - - def hide_zero_amount_tiers=: (bool) -> bool - - attr_reader prorate: bool? - - def prorate=: (bool) -> bool - - def initialize: ( - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - ?hide_zero_amount_tiers: bool, - ?prorate: bool - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool - } - - type tier = - { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String - - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type grouped_tiered = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - model_type: :grouped_tiered, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedTiered < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::cadence - - attr_accessor grouped_tiered_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation] - - attr_accessor model_type: :grouped_tiered - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_tiered - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - model_type: :grouped_tiered, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::cadence] - end - - type grouped_tiered_config = - { - grouping_key: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - } - - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - - def initialize: ( - grouping_key: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered_package_with_minimum = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - model_type: :tiered_package_with_minimum, - name: String, - tiered_package_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation] - - attr_accessor model_type: :tiered_package_with_minimum - - attr_accessor name: String - - attr_accessor tiered_package_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - name: String, - tiered_package_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_package_with_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - model_type: :tiered_package_with_minimum, - name: String, - tiered_package_with_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_package_with_minimum_config = - { - package_size: Float, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - } - - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor package_size: Float - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - - def initialize: ( - package_size: Float, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - ) -> void - - def to_hash: -> { - package_size: Float, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - } - - type tier = - { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String - - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - end - end - end - - type package_with_allocation = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - model_type: :package_with_allocation, - name: String, - package_with_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation] - - attr_accessor model_type: :package_with_allocation - - attr_accessor name: String - - attr_accessor package_with_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - name: String, - package_with_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :package_with_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - model_type: :package_with_allocation, - name: String, - package_with_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type package_with_allocation_config = - { - allocation: String, - package_amount: String, - package_size: String - } - - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor allocation: String - - attr_accessor package_amount: String - - attr_accessor package_size: String - - def initialize: ( - allocation: String, - package_amount: String, - package_size: String - ) -> void - - def to_hash: -> { - allocation: String, - package_amount: String, - package_size: String - } - end - end - - type unit_with_percent = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - model_type: :unit_with_percent, - name: String, - unit_with_percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class UnitWithPercent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation] - - attr_accessor model_type: :unit_with_percent - - attr_accessor name: String - - attr_accessor unit_with_percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - name: String, - unit_with_percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit_with_percent - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - model_type: :unit_with_percent, - name: String, - unit_with_percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type unit_with_percent_config = - { percent: String, unit_amount: String } - - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - attr_accessor percent: String - - attr_accessor unit_amount: String - - def initialize: (percent: String, unit_amount: String) -> void - - def to_hash: -> { percent: String, unit_amount: String } - end - end - - type matrix_with_allocation = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - model_type: :matrix_with_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation] - - attr_accessor matrix_with_allocation_config: Orb::MatrixWithAllocationConfig - - attr_accessor model_type: :matrix_with_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix_with_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - model_type: :matrix_with_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered_with_proration = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation] - - attr_accessor model_type: :tiered_with_proration - - attr_accessor name: String - - attr_accessor tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - name: String, - tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_with_proration - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_with_proration_config = - { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - } - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type unit_with_proration = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - model_type: :unit_with_proration, - name: String, - unit_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class UnitWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation] - - attr_accessor model_type: :unit_with_proration - - attr_accessor name: String - - attr_accessor unit_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - name: String, - unit_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit_with_proration - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - model_type: :unit_with_proration, - name: String, - unit_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type unit_with_proration_config = { unit_amount: String } - - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - def initialize: (unit_amount: String) -> void - - def to_hash: -> { unit_amount: String } - end - end - - type grouped_allocation = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - model_type: :grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::cadence - - attr_accessor grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation] - - attr_accessor model_type: :grouped_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - model_type: :grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::cadence] - end - - type grouped_allocation_config = - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor allocation: String - - attr_accessor grouping_key: String - - attr_accessor overage_unit_rate: String - - def initialize: ( - allocation: String, - grouping_key: String, - overage_unit_rate: String - ) -> void - - def to_hash: -> { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type bulk_with_proration = - { - bulk_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - model_type: :bulk_with_proration, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class BulkWithProration < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig - - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation] - - attr_accessor model_type: :bulk_with_proration - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk_with_proration - ) -> void - - def to_hash: -> { - bulk_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - model_type: :bulk_with_proration, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type bulk_with_proration_config = - { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - } - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - } - - type tier = { unit_amount: String, tier_lower_bound: String? } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - attr_accessor tier_lower_bound: String? - - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void - - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_prorated_minimum = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - model_type: :grouped_with_prorated_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence - - attr_accessor grouped_with_prorated_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation] - - attr_accessor model_type: :grouped_with_prorated_minimum - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_prorated_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - model_type: :grouped_with_prorated_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence] - end - - type grouped_with_prorated_minimum_config = - { grouping_key: String, minimum: String, unit_rate: String } - - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor minimum: String - - attr_accessor unit_rate: String - - def initialize: ( - grouping_key: String, - minimum: String, - unit_rate: String - ) -> void - - def to_hash: -> { - grouping_key: String, - minimum: String, - unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_metered_minimum = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - model_type: :grouped_with_metered_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence - - attr_accessor grouped_with_metered_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation] - - attr_accessor model_type: :grouped_with_metered_minimum - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_metered_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - model_type: :grouped_with_metered_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence] - end - - type grouped_with_metered_minimum_config = - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - } - - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor minimum_unit_amount: String - - attr_accessor pricing_key: String - - attr_accessor scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor] - - attr_accessor scaling_key: String - - attr_accessor unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - - def initialize: ( - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - ) -> void - - def to_hash: -> { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - } - - type scaling_factor = - { scaling_factor: String, scaling_value: String } - - class ScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor scaling_factor: String - - attr_accessor scaling_value: String - - def initialize: ( - scaling_factor: String, - scaling_value: String - ) -> void - - def to_hash: -> { - scaling_factor: String, - scaling_value: String - } - end - - type unit_amount = - { pricing_value: String, unit_amount: String } - - class UnitAmount < Orb::Internal::Type::BaseModel - attr_accessor pricing_value: String - - attr_accessor unit_amount: String - - def initialize: ( - pricing_value: String, - unit_amount: String - ) -> void - - def to_hash: -> { pricing_value: String, unit_amount: String } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_min_max_thresholds = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence - - attr_accessor grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation] - - attr_accessor model_type: :grouped_with_min_max_thresholds - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_min_max_thresholds - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence] - end - - type grouped_with_min_max_thresholds_config = - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor maximum_charge: String - - attr_accessor minimum_charge: String - - attr_accessor per_unit_rate: String - - def initialize: ( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ) -> void - - def to_hash: -> { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type matrix_with_display_name = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: :matrix_with_display_name, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation] - - attr_accessor matrix_with_display_name_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig - - attr_accessor model_type: :matrix_with_display_name - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix_with_display_name - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: :matrix_with_display_name, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type matrix_with_display_name_config = - { - dimension: String, - unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - } - - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - attr_accessor dimension: String - - attr_accessor unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - - def initialize: ( - dimension: String, - unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - ) -> void - - def to_hash: -> { - dimension: String, - unit_amounts: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - } - - type unit_amount = - { - dimension_value: String, - display_name: String, - unit_amount: String - } - - class UnitAmount < Orb::Internal::Type::BaseModel - attr_accessor dimension_value: String - - attr_accessor display_name: String - - attr_accessor unit_amount: String - - def initialize: ( - dimension_value: String, - display_name: String, - unit_amount: String - ) -> void - - def to_hash: -> { - dimension_value: String, - display_name: String, - unit_amount: String - } - end - end - end - - type grouped_tiered_package = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - model_type: :grouped_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::cadence - - attr_accessor grouped_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation] - - attr_accessor model_type: :grouped_tiered_package - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - model_type: :grouped_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::cadence] - end - - type grouped_tiered_package_config = - { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - } - - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - - def initialize: ( - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - } - - type tier = { per_unit: String, tier_lower_bound: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { per_unit: String, tier_lower_bound: String } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type max_group_tiered_package = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: :max_group_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation] - - attr_accessor max_group_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - - attr_accessor model_type: :max_group_tiered_package - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :max_group_tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: :max_group_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type max_group_tiered_package_config = - { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - } - - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - - def initialize: ( - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type scalable_matrix_with_unit_pricing = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - model_type: :scalable_matrix_with_unit_pricing, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation] - - attr_accessor model_type: :scalable_matrix_with_unit_pricing - - attr_accessor name: String - - attr_accessor scalable_matrix_with_unit_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - name: String, - scalable_matrix_with_unit_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :scalable_matrix_with_unit_pricing - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - model_type: :scalable_matrix_with_unit_pricing, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type scalable_matrix_with_unit_pricing_config = - { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - grouping_key: String?, - prorate: bool?, - second_dimension: String? - } - - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - attr_accessor first_dimension: String - - attr_accessor matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor] - - attr_accessor unit_price: String - - attr_accessor grouping_key: String? - - attr_accessor prorate: bool? - - attr_accessor second_dimension: String? - - def initialize: ( - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - ?grouping_key: String?, - ?prorate: bool?, - ?second_dimension: String? - ) -> void - - def to_hash: -> { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - grouping_key: String?, - prorate: bool?, - second_dimension: String? - } - - type matrix_scaling_factor = - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor first_dimension_value: String - - attr_accessor scaling_factor: String - - attr_accessor second_dimension_value: String? - - def initialize: ( - first_dimension_value: String, - scaling_factor: String, - ?second_dimension_value: String? - ) -> void - - def to_hash: -> { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - end - end - end - - type scalable_matrix_with_tiered_pricing = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - model_type: :scalable_matrix_with_tiered_pricing, - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation] - - attr_accessor model_type: :scalable_matrix_with_tiered_pricing - - attr_accessor name: String - - attr_accessor scalable_matrix_with_tiered_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :scalable_matrix_with_tiered_pricing - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - model_type: :scalable_matrix_with_tiered_pricing, - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type scalable_matrix_with_tiered_pricing_config = - { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - second_dimension: String? - } - - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - attr_accessor first_dimension: String - - attr_accessor matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor] - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier] - - attr_accessor second_dimension: String? - - def initialize: ( - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - ?second_dimension: String? - ) -> void - - def to_hash: -> { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - second_dimension: String? - } - - type matrix_scaling_factor = - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor first_dimension_value: String - - attr_accessor scaling_factor: String - - attr_accessor second_dimension_value: String? - - def initialize: ( - first_dimension_value: String, - scaling_factor: String, - ?second_dimension_value: String? - ) -> void - - def to_hash: -> { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - end - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type cumulative_grouped_bulk = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - model_type: :cumulative_grouped_bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence - - attr_accessor cumulative_grouped_bulk_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation] - - attr_accessor model_type: :cumulative_grouped_bulk - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :cumulative_grouped_bulk - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - model_type: :cumulative_grouped_bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence] - end - - type cumulative_grouped_bulk_config = - { - dimension_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String - } - - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - attr_accessor dimension_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue] - - attr_accessor group: String - - def initialize: ( - dimension_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String - ) -> void - - def to_hash: -> { - dimension_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String - } - - type dimension_value = - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - - class DimensionValue < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type cumulative_grouped_allocation = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - model_type: :cumulative_grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence - - attr_accessor cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation] - - attr_accessor model_type: :cumulative_grouped_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :cumulative_grouped_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - model_type: :cumulative_grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence] - end - - type cumulative_grouped_allocation_config = - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor cumulative_allocation: String - - attr_accessor group_allocation: String - - attr_accessor grouping_key: String - - attr_accessor unit_amount: String - - def initialize: ( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ) -> void - - def to_hash: -> { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type minimum_composite = - { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: :minimum_composite, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MinimumComposite < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation] - - attr_accessor minimum_composite_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig - - attr_accessor model_type: :minimum_composite - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :minimum_composite - ) -> void - - def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: :minimum_composite, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::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::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation], - model_type: :percent, - name: String, - percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::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?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_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::ReplacePrice::LicenseAllocationPrice::Percent::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation] - - attr_accessor model_type: :percent - - attr_accessor name: String - - attr_accessor percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::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::Beta::ExternalPlanIDCreatePlanVersionParams::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::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation], - name: String, - percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::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?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_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::ReplacePrice::LicenseAllocationPrice::Percent::cadence, - item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation], - model_type: :percent, - name: String, - percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::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?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } + attr_accessor 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 @@ -12719,56 +2150,22 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - 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 } + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::cadence] 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 +2177,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 +2196,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 +2217,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 +2235,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 +2278,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 +2340,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 +2359,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 +2379,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 +2441,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 +2500,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 +2519,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 +2540,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 +2558,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 +2601,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 +2660,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 +2679,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 +2700,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 +2718,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 +2761,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 +2844,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 +2863,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 +2884,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 +2902,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 +2945,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..23a67f07 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,229 @@ 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::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 +350,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 +369,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 +390,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 +408,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 +433,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 +506,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 tiered_with_proration = { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, + model_type: :tiered_with_proration, name: String, - tiered_config: Orb::TieredConfig, + 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::Tiered::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?, @@ -344,18 +533,16 @@ module Orb reference_id: String? } - class Tiered < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::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::Tiered::LicenseAllocation] - - attr_accessor model_type: :tiered + attr_accessor model_type: :tiered_with_proration attr_accessor name: String - attr_accessor tiered_config: Orb::TieredConfig + attr_accessor tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig attr_accessor billable_metric_id: String? @@ -365,7 +552,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::TieredWithProration::conversion_rate_config? attr_accessor currency: String? @@ -386,16 +573,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation], name: String, - tiered_config: Orb::TieredConfig, + 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::Tiered::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?, @@ -405,21 +591,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :tiered + ?model_type: :tiered_with_proration ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, + model_type: :tiered_with_proration, name: String, - tiered_config: Orb::TieredConfig, + 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::Tiered::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?, @@ -449,46 +634,57 @@ 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::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] } + + 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 = + type grouped_with_min_max_thresholds = { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::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::Bulk::LicenseAllocation], - model_type: :bulk, + 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::Bulk::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?, @@ -500,16 +696,14 @@ module Orb reference_id: String? } - class Bulk < Orb::Internal::Type::BaseModel - attr_accessor bulk_config: Orb::BulkConfig + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::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::Bulk::LicenseAllocation] - - attr_accessor model_type: :bulk + attr_accessor model_type: :grouped_with_min_max_thresholds attr_accessor name: String @@ -521,7 +715,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::GroupedWithMinMaxThresholds::conversion_rate_config? attr_accessor currency: String? @@ -542,16 +736,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::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation], name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -561,21 +754,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :bulk + ?model_type: :grouped_with_min_max_thresholds ) -> void def to_hash: -> { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::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::Bulk::LicenseAllocation], - model_type: :bulk, + 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::Bulk::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?, @@ -605,46 +797,54 @@ 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::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 bulk_with_filters = + type cumulative_grouped_allocation = { - bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::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::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, + 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::BulkWithFilters::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?, @@ -656,16 +856,14 @@ module Orb reference_id: String? } - class BulkWithFilters < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig - - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence + 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::BulkWithFilters::LicenseAllocation] + attr_accessor item_id: String - attr_accessor model_type: :bulk_with_filters + attr_accessor model_type: :cumulative_grouped_allocation attr_accessor name: String @@ -677,7 +875,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::CumulativeGroupedAllocation::conversion_rate_config? attr_accessor currency: String? @@ -698,16 +896,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::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, 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::CumulativeGroupedAllocation::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -717,21 +914,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :bulk_with_filters + ?model_type: :cumulative_grouped_allocation ) -> 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::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, + 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::BulkWithFilters::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?, @@ -743,61 +939,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 +957,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::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 package = + type daily_credit_allowance = { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::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::Package::LicenseAllocation], - model_type: :package, + model_type: :daily_credit_allowance, 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::DailyCreditAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -867,19 +1016,17 @@ module Orb reference_id: String? } - class Package < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::cadence + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::cadence - attr_accessor item_id: String + attr_accessor daily_credit_allowance_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig - 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: :daily_credit_allowance attr_accessor name: String - attr_accessor package_config: Orb::PackageConfig - attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -888,7 +1035,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::DailyCreditAllowance::conversion_rate_config? attr_accessor currency: String? @@ -909,16 +1056,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::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::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::DailyCreditAllowance::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -928,21 +1074,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :package + ?model_type: :daily_credit_allowance ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::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::Package::LicenseAllocation], - model_type: :package, + model_type: :daily_credit_allowance, 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::DailyCreditAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -972,46 +1117,78 @@ 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::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 + + 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::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 matrix = + type metered_allowance = { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, + metered_allowance_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::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?, @@ -1023,16 +1200,14 @@ module Orb reference_id: String? } - class Matrix < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::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::Matrix::LicenseAllocation] - - attr_accessor matrix_config: Orb::MatrixConfig + attr_accessor metered_allowance_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig - attr_accessor model_type: :matrix + attr_accessor model_type: :metered_allowance attr_accessor name: String @@ -1044,7 +1219,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::MeteredAllowance::conversion_rate_config? attr_accessor currency: String? @@ -1065,16 +1240,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, + metered_allowance_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::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?, @@ -1084,21 +1258,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :matrix + ?model_type: :metered_allowance ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, + metered_allowance_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::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?, @@ -1128,46 +1301,68 @@ 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::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 MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + attr_accessor consumption_grouping_value: String - attr_accessor currency: String + attr_accessor grouping_key: String + + attr_accessor unit_amount: String + + attr_reader allowance_display_name: String? - attr_accessor write_off_overage: bool? + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String def initialize: ( - amount: String, - currency: String, - ?write_off_overage: 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: -> { - amount: String, - currency: String, - write_off_overage: bool? + 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 threshold_total_amount = + type percent = { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, + model_type: :percent, name: String, - threshold_total_amount_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, + 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::ThresholdTotalAmount::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?, @@ -1179,18 +1374,16 @@ module Orb reference_id: String? } - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::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::ThresholdTotalAmount::LicenseAllocation] - - attr_accessor model_type: :threshold_total_amount + attr_accessor model_type: :percent attr_accessor name: String - attr_accessor threshold_total_amount_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig + attr_accessor percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig attr_accessor billable_metric_id: String? @@ -1200,7 +1393,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::Percent::conversion_rate_config? attr_accessor currency: String? @@ -1221,16 +1414,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], name: String, - threshold_total_amount_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, + 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::ThresholdTotalAmount::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?, @@ -1240,21 +1432,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :threshold_total_amount + ?model_type: :percent ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, + model_type: :percent, name: String, - threshold_total_amount_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, + 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::ThresholdTotalAmount::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?, @@ -1284,84 +1475,32 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence] end - type threshold_total_amount_config = - { - consumption_table: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? - } - - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - attr_accessor consumption_table: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable] - - attr_accessor prorate: bool? - - def initialize: ( - consumption_table: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - ?prorate: bool? - ) -> void - - def to_hash: -> { - consumption_table: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? - } - - type consumption_table = - { threshold: String, total_amount: String } - - class ConsumptionTable < Orb::Internal::Type::BaseModel - attr_accessor threshold: String + type percent_config = { percent: Float } - attr_accessor total_amount: String + class PercentConfig < Orb::Internal::Type::BaseModel + attr_accessor percent: Float - def initialize: ( - threshold: String, - total_amount: String - ) -> void + def initialize: (percent: Float) -> void - def to_hash: -> { threshold: String, total_amount: String } - end + def to_hash: -> { percent: Float } end end - type tiered_package = + type event_output = { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::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::TieredPackage::LicenseAllocation], - model_type: :tiered_package, + model_type: :event_output, name: String, - tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1373,19 +1512,17 @@ module Orb reference_id: String? } - class TieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::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::TieredPackage::LicenseAllocation] + attr_accessor item_id: String - attr_accessor model_type: :tiered_package + attr_accessor model_type: :event_output attr_accessor name: String - attr_accessor tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig - attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -1394,7 +1531,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::EventOutput::conversion_rate_config? attr_accessor currency: String? @@ -1415,16 +1552,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::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::TieredPackage::LicenseAllocation], name: String, - tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1434,21 +1570,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :tiered_package + ?model_type: :event_output ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::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::TieredPackage::LicenseAllocation], - model_type: :tiered_package, + model_type: :event_output, name: String, - tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1478,297 +1613,356 @@ 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::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_package_config = - { - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - } + def self?.variants: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::price] + end + end - class TieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor package_size: String + type remove_adjustment = + { adjustment_id: String, plan_phase_order: Integer? } - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] + class RemoveAdjustment < Orb::Internal::Type::BaseModel + attr_accessor adjustment_id: String - def initialize: ( - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - ) -> void + attr_accessor plan_phase_order: Integer? - def to_hash: -> { - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - } + def initialize: ( + adjustment_id: String, + ?plan_phase_order: Integer? + ) -> void - type tier = { per_unit: String, tier_lower_bound: String } + def to_hash: -> { adjustment_id: String, plan_phase_order: Integer? } + end - class Tier < Orb::Internal::Type::BaseModel - attr_accessor per_unit: String + type remove_price = { price_id: String, plan_phase_order: Integer? } - attr_accessor tier_lower_bound: String + class RemovePrice < Orb::Internal::Type::BaseModel + attr_accessor price_id: String - def initialize: ( - per_unit: String, - tier_lower_bound: String - ) -> void + attr_accessor plan_phase_order: Integer? - def to_hash: -> { per_unit: String, tier_lower_bound: String } - end - end - end + def initialize: (price_id: String, ?plan_phase_order: Integer?) -> void - type tiered_with_minimum = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - model_type: :tiered_with_minimum, - name: String, - tiered_with_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence + def to_hash: -> { price_id: String, plan_phase_order: Integer? } + end - attr_accessor item_id: String + type replace_adjustment = + { + adjustment: Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment, + replaces_adjustment_id: String, + plan_phase_order: Integer? + } - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation] + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + attr_accessor adjustment: Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment - attr_accessor model_type: :tiered_with_minimum + attr_accessor replaces_adjustment_id: String - attr_accessor name: String + attr_accessor plan_phase_order: Integer? - attr_accessor tiered_with_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig + def initialize: ( + adjustment: Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment, + replaces_adjustment_id: String, + ?plan_phase_order: Integer? + ) -> void - attr_accessor billable_metric_id: String? + def to_hash: -> { + adjustment: Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment, + replaces_adjustment_id: String, + plan_phase_order: Integer? + } - attr_accessor billed_in_advance: bool? + type adjustment = + Orb::NewPercentageDiscount + | Orb::NewUsageDiscount + | Orb::NewAmountDiscount + | Orb::NewMinimum + | Orb::NewMaximum - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + module Adjustment + extend Orb::Internal::Type::Union - attr_accessor conversion_rate: Float? + def self?.variants: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment] + end + end - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config? + 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? + } - attr_accessor currency: String? + class ReplacePrice < Orb::Internal::Type::BaseModel + attr_accessor replaces_price_id: String - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + attr_accessor allocation_price: Orb::NewAllocationPrice? - attr_accessor external_price_id: String? + attr_accessor license_allocation_price: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice? - attr_accessor fixed_price_quantity: Float? + attr_accessor plan_phase_order: Integer? - attr_accessor invoice_grouping_key: String? + attr_accessor price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::price? - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + 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 - attr_accessor license_type_id: String? + 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? + } - attr_accessor metadata: ::Hash[Symbol, String?]? + 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 reference_id: String? + attr_accessor conversion_rate: Float? - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - name: String, - tiered_with_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_with_minimum - ) -> void + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::conversion_rate_config? - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - model_type: :tiered_with_minimum, - name: String, - tiered_with_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } + attr_accessor currency: String? - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - module Cadence - extend Orb::Internal::Type::Enum + attr_accessor external_price_id: String? - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom + attr_accessor fixed_price_quantity: Float? - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence] - end + attr_accessor invoice_grouping_key: String? - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + attr_accessor license_type_id: String? - attr_accessor currency: String + attr_accessor metadata: ::Hash[Symbol, String?]? - attr_accessor write_off_overage: bool? + attr_accessor reference_id: String? - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void + 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: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end + 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 tiered_with_minimum_config = - { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool - } + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier] + module Cadence + extend Orb::Internal::Type::Enum - attr_reader hide_zero_amount_tiers: bool? + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom - def hide_zero_amount_tiers=: (bool) -> bool + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::cadence] + end - attr_reader prorate: bool? + type license_allocation = + { amount: String, currency: String, write_off_overage: bool? } - def prorate=: (bool) -> bool + class LicenseAllocation < Orb::Internal::Type::BaseModel + attr_accessor amount: String - def initialize: ( - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - ?hide_zero_amount_tiers: bool, - ?prorate: bool - ) -> void + attr_accessor currency: String - def to_hash: -> { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool - } + attr_accessor write_off_overage: bool? - type tier = - { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } + def initialize: ( + amount: String, + currency: String, + ?write_off_overage: bool? + ) -> void - class Tier < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String + def to_hash: -> { + amount: String, + currency: String, + write_off_overage: bool? + } + end - attr_accessor tier_lower_bound: String + type model_type = :unit - attr_accessor unit_amount: String + module ModelType + extend Orb::Internal::Type::Enum - def initialize: ( - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - ) -> void + UNIT: :unit - def to_hash: -> { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - end - end + 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::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 +1974,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 +1993,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 +2014,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 +2032,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,10818 +2057,60 @@ 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 unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered_package_with_minimum = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - model_type: :tiered_package_with_minimum, - name: String, - tiered_package_with_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation] - - attr_accessor model_type: :tiered_package_with_minimum - - attr_accessor name: String - - attr_accessor tiered_package_with_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - name: String, - tiered_package_with_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_package_with_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - model_type: :tiered_package_with_minimum, - name: String, - tiered_package_with_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_package_with_minimum_config = - { - package_size: Float, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - } - - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor package_size: Float - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - - def initialize: ( - package_size: Float, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - ) -> void - - def to_hash: -> { - package_size: Float, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - } - - type tier = - { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String - - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String + attr_accessor property_value: String def initialize: ( - minimum_amount: String, - per_unit: String, - tier_lower_bound: String + property_key: String, + property_value: String ) -> void - def to_hash: -> { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } + def to_hash: -> { property_key: String, property_value: String } end - end - end - - type package_with_allocation = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - model_type: :package_with_allocation, - name: String, - package_with_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::cadence - - attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation] - - attr_accessor model_type: :package_with_allocation - - attr_accessor name: String - - attr_accessor package_with_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - name: String, - package_with_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :package_with_allocation - ) -> void + type tier = { unit_amount: String, tier_lower_bound: String? } - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - model_type: :package_with_allocation, - name: String, - package_with_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type package_with_allocation_config = - { - allocation: String, - package_amount: String, - package_size: String - } - - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor allocation: String - - attr_accessor package_amount: String - - attr_accessor package_size: String - - def initialize: ( - allocation: String, - package_amount: String, - package_size: String - ) -> void - - def to_hash: -> { - allocation: String, - package_amount: String, - package_size: String - } - end - end - - type unit_with_percent = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - model_type: :unit_with_percent, - name: String, - unit_with_percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class UnitWithPercent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation] - - attr_accessor model_type: :unit_with_percent - - attr_accessor name: String - - attr_accessor unit_with_percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - name: String, - unit_with_percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit_with_percent - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - model_type: :unit_with_percent, - name: String, - unit_with_percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type unit_with_percent_config = - { percent: String, unit_amount: String } - - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - attr_accessor percent: String - - attr_accessor unit_amount: String - - def initialize: (percent: String, unit_amount: String) -> void - - def to_hash: -> { percent: String, unit_amount: String } - end - end - - type matrix_with_allocation = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - model_type: :matrix_with_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation] - - attr_accessor matrix_with_allocation_config: Orb::MatrixWithAllocationConfig - - attr_accessor model_type: :matrix_with_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix_with_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - model_type: :matrix_with_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered_with_proration = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation] - - attr_accessor model_type: :tiered_with_proration - - attr_accessor name: String - - attr_accessor tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - name: String, - tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_with_proration - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_with_proration_config = - { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - } - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type unit_with_proration = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - model_type: :unit_with_proration, - name: String, - unit_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class UnitWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation] - - attr_accessor model_type: :unit_with_proration - - attr_accessor name: String - - attr_accessor unit_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - name: String, - unit_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit_with_proration - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - model_type: :unit_with_proration, - name: String, - unit_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type unit_with_proration_config = { unit_amount: String } - - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - def initialize: (unit_amount: String) -> void - - def to_hash: -> { unit_amount: String } - end - end - - type grouped_allocation = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - model_type: :grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::cadence - - attr_accessor grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation] - - attr_accessor model_type: :grouped_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - model_type: :grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::cadence] - end - - type grouped_allocation_config = - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor allocation: String - - attr_accessor grouping_key: String - - attr_accessor overage_unit_rate: String - - def initialize: ( - allocation: String, - grouping_key: String, - overage_unit_rate: String - ) -> void - - def to_hash: -> { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type bulk_with_proration = - { - bulk_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - model_type: :bulk_with_proration, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class BulkWithProration < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig - - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation] - - attr_accessor model_type: :bulk_with_proration - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk_with_proration - ) -> void - - def to_hash: -> { - bulk_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - model_type: :bulk_with_proration, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type bulk_with_proration_config = - { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - } - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - } - - type tier = { unit_amount: String, tier_lower_bound: String? } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - attr_accessor tier_lower_bound: String? - - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void - - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_prorated_minimum = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - model_type: :grouped_with_prorated_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence - - attr_accessor grouped_with_prorated_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation] - - attr_accessor model_type: :grouped_with_prorated_minimum - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_prorated_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - model_type: :grouped_with_prorated_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence] - end - - type grouped_with_prorated_minimum_config = - { grouping_key: String, minimum: String, unit_rate: String } - - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor minimum: String - - attr_accessor unit_rate: String - - def initialize: ( - grouping_key: String, - minimum: String, - unit_rate: String - ) -> void - - def to_hash: -> { - grouping_key: String, - minimum: String, - unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_metered_minimum = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - model_type: :grouped_with_metered_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence - - attr_accessor grouped_with_metered_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation] - - attr_accessor model_type: :grouped_with_metered_minimum - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_metered_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - model_type: :grouped_with_metered_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence] - end - - type grouped_with_metered_minimum_config = - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - } - - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor minimum_unit_amount: String - - attr_accessor pricing_key: String - - attr_accessor scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor] - - attr_accessor scaling_key: String - - attr_accessor unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - - def initialize: ( - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - ) -> void - - def to_hash: -> { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - } - - type scaling_factor = - { scaling_factor: String, scaling_value: String } - - class ScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor scaling_factor: String - - attr_accessor scaling_value: String - - def initialize: ( - scaling_factor: String, - scaling_value: String - ) -> void - - def to_hash: -> { - scaling_factor: String, - scaling_value: String - } - end - - type unit_amount = { pricing_value: String, unit_amount: String } - - class UnitAmount < Orb::Internal::Type::BaseModel - attr_accessor pricing_value: String - - attr_accessor unit_amount: String - - def initialize: ( - pricing_value: String, - unit_amount: String - ) -> void - - def to_hash: -> { pricing_value: String, unit_amount: String } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_min_max_thresholds = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence - - attr_accessor grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation] - - attr_accessor model_type: :grouped_with_min_max_thresholds - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_min_max_thresholds - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence] - end - - type grouped_with_min_max_thresholds_config = - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor maximum_charge: String - - attr_accessor minimum_charge: String - - attr_accessor per_unit_rate: String - - def initialize: ( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ) -> void - - def to_hash: -> { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type matrix_with_display_name = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: :matrix_with_display_name, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation] - - attr_accessor matrix_with_display_name_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig - - attr_accessor model_type: :matrix_with_display_name - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix_with_display_name - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: :matrix_with_display_name, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type matrix_with_display_name_config = - { - dimension: String, - unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - } - - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - attr_accessor dimension: String - - attr_accessor unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - - def initialize: ( - dimension: String, - unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - ) -> void - - def to_hash: -> { - dimension: String, - unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - } - - type unit_amount = - { - dimension_value: String, - display_name: String, - unit_amount: String - } - - class UnitAmount < Orb::Internal::Type::BaseModel - attr_accessor dimension_value: String - - attr_accessor display_name: String - - attr_accessor unit_amount: String - - def initialize: ( - dimension_value: String, - display_name: String, - unit_amount: String - ) -> void - - def to_hash: -> { - dimension_value: String, - display_name: String, - unit_amount: String - } - end - end - end - - type grouped_tiered_package = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - model_type: :grouped_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::cadence - - attr_accessor grouped_tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation] - - attr_accessor model_type: :grouped_tiered_package - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - model_type: :grouped_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::cadence] - end - - type grouped_tiered_package_config = - { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - } - - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - - def initialize: ( - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - } - - type tier = { per_unit: String, tier_lower_bound: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { per_unit: String, tier_lower_bound: String } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type max_group_tiered_package = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: :max_group_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation] - - attr_accessor max_group_tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - - attr_accessor model_type: :max_group_tiered_package - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :max_group_tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: :max_group_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type max_group_tiered_package_config = - { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - } - - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - - def initialize: ( - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type scalable_matrix_with_unit_pricing = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - model_type: :scalable_matrix_with_unit_pricing, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation] - - attr_accessor model_type: :scalable_matrix_with_unit_pricing - - attr_accessor name: String - - attr_accessor scalable_matrix_with_unit_pricing_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - name: String, - scalable_matrix_with_unit_pricing_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :scalable_matrix_with_unit_pricing - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - model_type: :scalable_matrix_with_unit_pricing, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type scalable_matrix_with_unit_pricing_config = - { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - grouping_key: String?, - prorate: bool?, - second_dimension: String? - } - - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - attr_accessor first_dimension: String - - attr_accessor matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor] - - attr_accessor unit_price: String - - attr_accessor grouping_key: String? - - attr_accessor prorate: bool? - - attr_accessor second_dimension: String? - - def initialize: ( - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - ?grouping_key: String?, - ?prorate: bool?, - ?second_dimension: String? - ) -> void - - def to_hash: -> { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - grouping_key: String?, - prorate: bool?, - second_dimension: String? - } - - type matrix_scaling_factor = - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor first_dimension_value: String - - attr_accessor scaling_factor: String - - attr_accessor second_dimension_value: String? - - def initialize: ( - first_dimension_value: String, - scaling_factor: String, - ?second_dimension_value: String? - ) -> void - - def to_hash: -> { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - end - end - end - - type scalable_matrix_with_tiered_pricing = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - model_type: :scalable_matrix_with_tiered_pricing, - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation] - - attr_accessor model_type: :scalable_matrix_with_tiered_pricing - - attr_accessor name: String - - attr_accessor scalable_matrix_with_tiered_pricing_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :scalable_matrix_with_tiered_pricing - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - model_type: :scalable_matrix_with_tiered_pricing, - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type scalable_matrix_with_tiered_pricing_config = - { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - second_dimension: String? - } - - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - attr_accessor first_dimension: String - - attr_accessor matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor] - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier] - - attr_accessor second_dimension: String? - - def initialize: ( - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - ?second_dimension: String? - ) -> void - - def to_hash: -> { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - second_dimension: String? - } - - type matrix_scaling_factor = - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor first_dimension_value: String - - attr_accessor scaling_factor: String - - attr_accessor second_dimension_value: String? - - def initialize: ( - first_dimension_value: String, - scaling_factor: String, - ?second_dimension_value: String? - ) -> void - - def to_hash: -> { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - end - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type cumulative_grouped_bulk = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - model_type: :cumulative_grouped_bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence - - attr_accessor cumulative_grouped_bulk_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation] - - attr_accessor model_type: :cumulative_grouped_bulk - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :cumulative_grouped_bulk - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - model_type: :cumulative_grouped_bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence] - end - - type cumulative_grouped_bulk_config = - { - dimension_values: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String - } - - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - attr_accessor dimension_values: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue] - - attr_accessor group: String - - def initialize: ( - dimension_values: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String - ) -> void - - def to_hash: -> { - dimension_values: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String - } - - type dimension_value = - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - - class DimensionValue < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type cumulative_grouped_allocation = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - model_type: :cumulative_grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence - - attr_accessor cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation] - - attr_accessor model_type: :cumulative_grouped_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :cumulative_grouped_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - model_type: :cumulative_grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence] - end - - type cumulative_grouped_allocation_config = - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor cumulative_allocation: String - - attr_accessor group_allocation: String - - attr_accessor grouping_key: String - - attr_accessor unit_amount: String - - def initialize: ( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ) -> void - - def to_hash: -> { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type minimum_composite = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: :minimum_composite, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MinimumComposite < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation] - - attr_accessor minimum_composite_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig - - attr_accessor model_type: :minimum_composite - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :minimum_composite - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: :minimum_composite, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type minimum_composite_config = - { minimum_amount: String, prorated: bool } - - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String - - attr_reader prorated: bool? - - def prorated=: (bool) -> bool - - def initialize: (minimum_amount: String, ?prorated: bool) -> void - - def to_hash: -> { minimum_amount: String, prorated: bool } - end - end - - type percent = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation], - model_type: :percent, - name: String, - percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Percent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation] - - attr_accessor model_type: :percent - - attr_accessor name: String - - attr_accessor percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation], - name: String, - percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :percent - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation], - model_type: :percent, - name: String, - percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type percent_config = { percent: Float } - - class PercentConfig < Orb::Internal::Type::BaseModel - attr_accessor percent: Float - - def initialize: (percent: Float) -> void - - def to_hash: -> { percent: Float } - end - end - - type event_output = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation], - model_type: :event_output, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class EventOutput < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::cadence - - attr_accessor event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation] - - attr_accessor model_type: :event_output - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :event_output - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation], - model_type: :event_output, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::cadence] - end - - type event_output_config = - { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? - } - - class EventOutputConfig < Orb::Internal::Type::BaseModel - attr_accessor unit_rating_key: String - - attr_accessor default_unit_rate: String? - - attr_accessor grouping_key: String? - - def initialize: ( - unit_rating_key: String, - ?default_unit_rate: String?, - ?grouping_key: String? - ) -> void - - def to_hash: -> { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - def self?.variants: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::license_allocation_price] - end - - type price = - Orb::NewPlanUnitPrice - | Orb::NewPlanTieredPrice - | Orb::NewPlanBulkPrice - | Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters - | Orb::NewPlanPackagePrice - | Orb::NewPlanMatrixPrice - | Orb::NewPlanThresholdTotalAmountPrice - | Orb::NewPlanTieredPackagePrice - | Orb::NewPlanTieredWithMinimumPrice - | Orb::NewPlanGroupedTieredPrice - | Orb::NewPlanTieredPackageWithMinimumPrice - | Orb::NewPlanPackageWithAllocationPrice - | Orb::NewPlanUnitWithPercentPrice - | Orb::NewPlanMatrixWithAllocationPrice - | Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration - | Orb::NewPlanUnitWithProrationPrice - | Orb::NewPlanGroupedAllocationPrice - | Orb::NewPlanBulkWithProrationPrice - | Orb::NewPlanGroupedWithProratedMinimumPrice - | Orb::NewPlanGroupedWithMeteredMinimumPrice - | Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds - | Orb::NewPlanMatrixWithDisplayNamePrice - | Orb::NewPlanGroupedTieredPackagePrice - | Orb::NewPlanMaxGroupTieredPackagePrice - | Orb::NewPlanScalableMatrixWithUnitPricingPrice - | Orb::NewPlanScalableMatrixWithTieredPricingPrice - | Orb::NewPlanCumulativeGroupedBulkPrice - | Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation - | Orb::NewPlanMinimumCompositePrice - | Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent - | Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput - - module Price - extend Orb::Internal::Type::Union - - type bulk_with_filters = - { - bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, - item_id: String, - model_type: :bulk_with_filters, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class BulkWithFilters < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig - - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :bulk_with_filters - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, - item_id: String, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk_with_filters - ) -> void - - def to_hash: -> { - bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, - item_id: String, - model_type: :bulk_with_filters, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type bulk_with_filters_config = - { - filters: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - attr_accessor filters: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter] - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - - def initialize: ( - filters: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - ) -> void - - def to_hash: -> { - filters: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - type filter = { property_key: String, property_value: String } - - class Filter < Orb::Internal::Type::BaseModel - attr_accessor property_key: String - - attr_accessor property_value: String - - def initialize: ( - property_key: String, - property_value: String - ) -> void - - def to_hash: -> { property_key: String, property_value: String } - end - - type tier = { unit_amount: String, tier_lower_bound: String? } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - attr_accessor tier_lower_bound: String? - - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void - - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence] - end - end - - type tiered_with_proration = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, - item_id: String, - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :tiered_with_proration - - attr_accessor name: String - - attr_accessor tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, - item_id: String, - name: String, - tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_with_proration - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, - item_id: String, - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence] - end - - type tiered_with_proration_config = - { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] - } - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type grouped_with_min_max_thresholds = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence - - attr_accessor grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - - attr_accessor item_id: String - - attr_accessor model_type: :grouped_with_min_max_thresholds - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_min_max_thresholds - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence] - end - - type grouped_with_min_max_thresholds_config = - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor maximum_charge: String - - attr_accessor minimum_charge: String - - attr_accessor per_unit_rate: String - - def initialize: ( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ) -> void - - def to_hash: -> { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - end - end - - type cumulative_grouped_allocation = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - model_type: :cumulative_grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence - - attr_accessor cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - - attr_accessor item_id: String - - attr_accessor model_type: :cumulative_grouped_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :cumulative_grouped_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - model_type: :cumulative_grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence] - end - - type cumulative_grouped_allocation_config = - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor cumulative_allocation: String - - attr_accessor group_allocation: String - - attr_accessor grouping_key: String - - attr_accessor unit_amount: String - - def initialize: ( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ) -> void - - def to_hash: -> { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - end - end - - type percent = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence, - item_id: String, - model_type: :percent, - name: String, - percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Percent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence - - attr_accessor item_id: String - - attr_accessor model_type: :percent - - attr_accessor name: String - - attr_accessor percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence, - item_id: String, - name: String, - percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :percent - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence, - item_id: String, - model_type: :percent, - name: String, - percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence] - end - - type percent_config = { percent: Float } - - class PercentConfig < Orb::Internal::Type::BaseModel - attr_accessor percent: Float - - def initialize: (percent: Float) -> void - - def to_hash: -> { percent: Float } - end - end - - type event_output = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, - event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, - item_id: String, - model_type: :event_output, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class EventOutput < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence - - attr_accessor event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig - - attr_accessor item_id: String - - attr_accessor model_type: :event_output - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, - event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, - item_id: String, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :event_output - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, - event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, - item_id: String, - model_type: :event_output, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence] - end - - type event_output_config = - { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? - } - - class EventOutputConfig < Orb::Internal::Type::BaseModel - attr_accessor unit_rating_key: String - - attr_accessor default_unit_rate: String? - - attr_accessor grouping_key: String? - - def initialize: ( - unit_rating_key: String, - ?default_unit_rate: String?, - ?grouping_key: String? - ) -> void - - def to_hash: -> { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? - } - end - end - - def self?.variants: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::price] - end - end - - type remove_adjustment = - { adjustment_id: String, plan_phase_order: Integer? } - - class RemoveAdjustment < Orb::Internal::Type::BaseModel - attr_accessor adjustment_id: String - - attr_accessor plan_phase_order: Integer? - - def initialize: ( - adjustment_id: String, - ?plan_phase_order: Integer? - ) -> void - - def to_hash: -> { adjustment_id: String, plan_phase_order: Integer? } - end - - type remove_price = { price_id: String, plan_phase_order: Integer? } - - class RemovePrice < Orb::Internal::Type::BaseModel - attr_accessor price_id: String - - attr_accessor plan_phase_order: Integer? - - def initialize: (price_id: String, ?plan_phase_order: Integer?) -> void - - def to_hash: -> { price_id: String, plan_phase_order: Integer? } - end - - type replace_adjustment = - { - adjustment: Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment, - replaces_adjustment_id: String, - plan_phase_order: Integer? - } - - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - attr_accessor adjustment: Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment - - attr_accessor replaces_adjustment_id: String - - attr_accessor plan_phase_order: Integer? - - def initialize: ( - adjustment: Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment, - replaces_adjustment_id: String, - ?plan_phase_order: Integer? - ) -> void - - def to_hash: -> { - adjustment: Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment, - replaces_adjustment_id: String, - plan_phase_order: Integer? - } - - type adjustment = - Orb::NewPercentageDiscount - | Orb::NewUsageDiscount - | Orb::NewAmountDiscount - | Orb::NewMinimum - | Orb::NewMaximum - - module Adjustment - extend Orb::Internal::Type::Union - - def self?.variants: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment] - end - end - - type replace_price = - { - replaces_price_id: String, - allocation_price: Orb::NewAllocationPrice?, - license_allocation_price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::license_allocation_price?, - plan_phase_order: Integer?, - price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::price? - } - - class ReplacePrice < Orb::Internal::Type::BaseModel - attr_accessor replaces_price_id: String - - attr_accessor allocation_price: Orb::NewAllocationPrice? - - attr_accessor license_allocation_price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::license_allocation_price? - - attr_accessor plan_phase_order: Integer? - - attr_accessor price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::price? - - def initialize: ( - replaces_price_id: String, - ?allocation_price: Orb::NewAllocationPrice?, - ?license_allocation_price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::license_allocation_price?, - ?plan_phase_order: Integer?, - ?price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::price? - ) -> void - - def to_hash: -> { - replaces_price_id: String, - allocation_price: Orb::NewAllocationPrice?, - license_allocation_price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::license_allocation_price?, - plan_phase_order: Integer?, - price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::price? - } - - type license_allocation_price = - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent - | Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput - - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - type unit = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation], - model_type: :unit, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Unit < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation] - - attr_accessor model_type: :unit - - attr_accessor name: String - - attr_accessor unit_config: Orb::UnitConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation], - name: String, - unit_config: Orb::UnitConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation], - model_type: :unit, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, - name: String, - tiered_config: Orb::TieredConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Tiered < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation] - - attr_accessor model_type: :tiered - - attr_accessor name: String - - attr_accessor tiered_config: Orb::TieredConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - name: String, - tiered_config: Orb::TieredConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, - name: String, - tiered_config: Orb::TieredConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type bulk = - { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation], - model_type: :bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Bulk < Orb::Internal::Type::BaseModel - attr_accessor bulk_config: Orb::BulkConfig - - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation] - - attr_accessor model_type: :bulk - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk - ) -> void - - def to_hash: -> { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation], - model_type: :bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type bulk_with_filters = - { - bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class BulkWithFilters < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig - - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation] - - attr_accessor model_type: :bulk_with_filters - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk_with_filters - ) -> void - - def to_hash: -> { - bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type bulk_with_filters_config = - { - filters: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - attr_accessor filters: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter] - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - - def initialize: ( - filters: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - ) -> void - - def to_hash: -> { - filters: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - type filter = { property_key: String, property_value: String } - - class Filter < Orb::Internal::Type::BaseModel - attr_accessor property_key: String - - attr_accessor property_value: String - - def initialize: ( - property_key: String, - property_value: String - ) -> void - - def to_hash: -> { property_key: String, property_value: String } - end - - type tier = { unit_amount: String, tier_lower_bound: String? } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - attr_accessor tier_lower_bound: String? - - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void - - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type package = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation], - model_type: :package, - name: String, - package_config: Orb::PackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Package < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation] - - attr_accessor model_type: :package - - attr_accessor name: String - - attr_accessor package_config: Orb::PackageConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation], - name: String, - package_config: Orb::PackageConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation], - model_type: :package, - name: String, - package_config: Orb::PackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type matrix = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Matrix < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation] - - attr_accessor matrix_config: Orb::MatrixConfig - - attr_accessor model_type: :matrix - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type threshold_total_amount = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, - name: String, - threshold_total_amount_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation] - - attr_accessor model_type: :threshold_total_amount - - attr_accessor name: String - - attr_accessor threshold_total_amount_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - name: String, - threshold_total_amount_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :threshold_total_amount - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, - name: String, - threshold_total_amount_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type threshold_total_amount_config = - { - consumption_table: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? - } - - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - attr_accessor consumption_table: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable] - - attr_accessor prorate: bool? - - def initialize: ( - consumption_table: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - ?prorate: bool? - ) -> void - - def to_hash: -> { - consumption_table: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? - } - - type consumption_table = - { threshold: String, total_amount: String } - - class ConsumptionTable < Orb::Internal::Type::BaseModel - attr_accessor threshold: String - - attr_accessor total_amount: String - - def initialize: ( - threshold: String, - total_amount: String - ) -> void - - def to_hash: -> { threshold: String, total_amount: String } - end - end - end - - type tiered_package = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - model_type: :tiered_package, - name: String, - tiered_package_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation] - - attr_accessor model_type: :tiered_package - - attr_accessor name: String - - attr_accessor tiered_package_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - name: String, - tiered_package_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - model_type: :tiered_package, - name: String, - tiered_package_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_package_config = - { - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - } - - class TieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - - def initialize: ( - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - } - - type tier = { per_unit: String, tier_lower_bound: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { per_unit: String, tier_lower_bound: String } - end - end - end - - type tiered_with_minimum = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - model_type: :tiered_with_minimum, - name: String, - tiered_with_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation] - - attr_accessor model_type: :tiered_with_minimum - - attr_accessor name: String - - attr_accessor tiered_with_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - name: String, - tiered_with_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_with_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - model_type: :tiered_with_minimum, - name: String, - tiered_with_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_with_minimum_config = - { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool - } - - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier] - - attr_reader hide_zero_amount_tiers: bool? - - def hide_zero_amount_tiers=: (bool) -> bool - - attr_reader prorate: bool? - - def prorate=: (bool) -> bool - - def initialize: ( - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - ?hide_zero_amount_tiers: bool, - ?prorate: bool - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool - } - - type tier = - { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String - - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type grouped_tiered = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - model_type: :grouped_tiered, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedTiered < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::cadence - - attr_accessor grouped_tiered_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation] - - attr_accessor model_type: :grouped_tiered - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_tiered - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - model_type: :grouped_tiered, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::cadence] - end - - type grouped_tiered_config = - { - grouping_key: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - } - - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - - def initialize: ( - grouping_key: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered_package_with_minimum = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - model_type: :tiered_package_with_minimum, - name: String, - tiered_package_with_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation] - - attr_accessor model_type: :tiered_package_with_minimum - - attr_accessor name: String - - attr_accessor tiered_package_with_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - name: String, - tiered_package_with_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_package_with_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - model_type: :tiered_package_with_minimum, - name: String, - tiered_package_with_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_package_with_minimum_config = - { - package_size: Float, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - } - - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor package_size: Float - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - - def initialize: ( - package_size: Float, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - ) -> void - - def to_hash: -> { - package_size: Float, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - } - - type tier = - { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String - - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - end - end - end - - type package_with_allocation = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - model_type: :package_with_allocation, - name: String, - package_with_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation] - - attr_accessor model_type: :package_with_allocation - - attr_accessor name: String - - attr_accessor package_with_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - name: String, - package_with_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :package_with_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - model_type: :package_with_allocation, - name: String, - package_with_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type package_with_allocation_config = - { - allocation: String, - package_amount: String, - package_size: String - } - - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor allocation: String - - attr_accessor package_amount: String - - attr_accessor package_size: String - - def initialize: ( - allocation: String, - package_amount: String, - package_size: String - ) -> void - - def to_hash: -> { - allocation: String, - package_amount: String, - package_size: String - } - end - end - - type unit_with_percent = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - model_type: :unit_with_percent, - name: String, - unit_with_percent_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class UnitWithPercent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation] - - attr_accessor model_type: :unit_with_percent - - attr_accessor name: String - - attr_accessor unit_with_percent_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - name: String, - unit_with_percent_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit_with_percent - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - model_type: :unit_with_percent, - name: String, - unit_with_percent_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type unit_with_percent_config = - { percent: String, unit_amount: String } - - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - attr_accessor percent: String - - attr_accessor unit_amount: String - - def initialize: (percent: String, unit_amount: String) -> void - - def to_hash: -> { percent: String, unit_amount: String } - end - end - - type matrix_with_allocation = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - model_type: :matrix_with_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation] - - attr_accessor matrix_with_allocation_config: Orb::MatrixWithAllocationConfig - - attr_accessor model_type: :matrix_with_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix_with_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - model_type: :matrix_with_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered_with_proration = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation] - - attr_accessor model_type: :tiered_with_proration - - attr_accessor name: String - - attr_accessor tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - name: String, - tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_with_proration - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_with_proration_config = - { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - } - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type unit_with_proration = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - model_type: :unit_with_proration, - name: String, - unit_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class UnitWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation] - - attr_accessor model_type: :unit_with_proration - - attr_accessor name: String - - attr_accessor unit_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - name: String, - unit_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit_with_proration - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - model_type: :unit_with_proration, - name: String, - unit_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type unit_with_proration_config = { unit_amount: String } - - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - def initialize: (unit_amount: String) -> void - - def to_hash: -> { unit_amount: String } - end - end - - type grouped_allocation = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - model_type: :grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::cadence - - attr_accessor grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation] - - attr_accessor model_type: :grouped_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - model_type: :grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::cadence] - end - - type grouped_allocation_config = - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor allocation: String - - attr_accessor grouping_key: String - - attr_accessor overage_unit_rate: String - - def initialize: ( - allocation: String, - grouping_key: String, - overage_unit_rate: String - ) -> void - - def to_hash: -> { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type bulk_with_proration = - { - bulk_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - model_type: :bulk_with_proration, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class BulkWithProration < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig - - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation] - - attr_accessor model_type: :bulk_with_proration - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk_with_proration - ) -> void - - def to_hash: -> { - bulk_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - model_type: :bulk_with_proration, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type bulk_with_proration_config = - { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - } - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - } - - type tier = { unit_amount: String, tier_lower_bound: String? } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - attr_accessor tier_lower_bound: String? - - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void - - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_prorated_minimum = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - model_type: :grouped_with_prorated_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence - - attr_accessor grouped_with_prorated_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation] - - attr_accessor model_type: :grouped_with_prorated_minimum - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_prorated_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - model_type: :grouped_with_prorated_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence] - end - - type grouped_with_prorated_minimum_config = - { grouping_key: String, minimum: String, unit_rate: String } - - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor minimum: String - - attr_accessor unit_rate: String - - def initialize: ( - grouping_key: String, - minimum: String, - unit_rate: String - ) -> void - - def to_hash: -> { - grouping_key: String, - minimum: String, - unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_metered_minimum = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - model_type: :grouped_with_metered_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence - - attr_accessor grouped_with_metered_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation] - - attr_accessor model_type: :grouped_with_metered_minimum - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_metered_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - model_type: :grouped_with_metered_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence] - end - - type grouped_with_metered_minimum_config = - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - } - - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor minimum_unit_amount: String - - attr_accessor pricing_key: String - - attr_accessor scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor] - - attr_accessor scaling_key: String - - attr_accessor unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - - def initialize: ( - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - ) -> void - - def to_hash: -> { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - } - - type scaling_factor = - { scaling_factor: String, scaling_value: String } - - class ScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor scaling_factor: String - - attr_accessor scaling_value: String - - def initialize: ( - scaling_factor: String, - scaling_value: String - ) -> void - - def to_hash: -> { - scaling_factor: String, - scaling_value: String - } - end - - type unit_amount = { pricing_value: String, unit_amount: String } - - class UnitAmount < Orb::Internal::Type::BaseModel - attr_accessor pricing_value: String - - attr_accessor unit_amount: String - - def initialize: ( - pricing_value: String, - unit_amount: String - ) -> void - - def to_hash: -> { pricing_value: String, unit_amount: String } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_min_max_thresholds = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence - - attr_accessor grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation] - - attr_accessor model_type: :grouped_with_min_max_thresholds - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_min_max_thresholds - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence] - end - - type grouped_with_min_max_thresholds_config = - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor maximum_charge: String - - attr_accessor minimum_charge: String - - attr_accessor per_unit_rate: String - - def initialize: ( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ) -> void - - def to_hash: -> { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type matrix_with_display_name = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: :matrix_with_display_name, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation] - - attr_accessor matrix_with_display_name_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig - - attr_accessor model_type: :matrix_with_display_name - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix_with_display_name - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: :matrix_with_display_name, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type matrix_with_display_name_config = - { - dimension: String, - unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - } - - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - attr_accessor dimension: String - - attr_accessor unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - - def initialize: ( - dimension: String, - unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - ) -> void - - def to_hash: -> { - dimension: String, - unit_amounts: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - } - - type unit_amount = - { - dimension_value: String, - display_name: String, - unit_amount: String - } - - class UnitAmount < Orb::Internal::Type::BaseModel - attr_accessor dimension_value: String - - attr_accessor display_name: String - - attr_accessor unit_amount: String - - def initialize: ( - dimension_value: String, - display_name: String, - unit_amount: String - ) -> void - - def to_hash: -> { - dimension_value: String, - display_name: String, - unit_amount: String - } - end - end - end - - type grouped_tiered_package = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - model_type: :grouped_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::cadence - - attr_accessor grouped_tiered_package_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation] - - attr_accessor model_type: :grouped_tiered_package - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - model_type: :grouped_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::cadence] - end - - type grouped_tiered_package_config = - { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - } - - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - - def initialize: ( - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - } - - type tier = { per_unit: String, tier_lower_bound: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { per_unit: String, tier_lower_bound: String } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type max_group_tiered_package = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: :max_group_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation] - - attr_accessor max_group_tiered_package_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - - attr_accessor model_type: :max_group_tiered_package - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :max_group_tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: :max_group_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type max_group_tiered_package_config = - { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - } - - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - - def initialize: ( - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type scalable_matrix_with_unit_pricing = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - model_type: :scalable_matrix_with_unit_pricing, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation] - - attr_accessor model_type: :scalable_matrix_with_unit_pricing - - attr_accessor name: String - - attr_accessor scalable_matrix_with_unit_pricing_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - name: String, - scalable_matrix_with_unit_pricing_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :scalable_matrix_with_unit_pricing - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - model_type: :scalable_matrix_with_unit_pricing, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type scalable_matrix_with_unit_pricing_config = - { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - grouping_key: String?, - prorate: bool?, - second_dimension: String? - } - - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - attr_accessor first_dimension: String - - attr_accessor matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor] - - attr_accessor unit_price: String - - attr_accessor grouping_key: String? - - attr_accessor prorate: bool? - - attr_accessor second_dimension: String? - - def initialize: ( - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - ?grouping_key: String?, - ?prorate: bool?, - ?second_dimension: String? - ) -> void - - def to_hash: -> { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - grouping_key: String?, - prorate: bool?, - second_dimension: String? - } - - type matrix_scaling_factor = - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor first_dimension_value: String - - attr_accessor scaling_factor: String - - attr_accessor second_dimension_value: String? - - def initialize: ( - first_dimension_value: String, - scaling_factor: String, - ?second_dimension_value: String? - ) -> void - - def to_hash: -> { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - end - end - end - - type scalable_matrix_with_tiered_pricing = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - model_type: :scalable_matrix_with_tiered_pricing, - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation] - - attr_accessor model_type: :scalable_matrix_with_tiered_pricing - - attr_accessor name: String - - attr_accessor scalable_matrix_with_tiered_pricing_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :scalable_matrix_with_tiered_pricing - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - model_type: :scalable_matrix_with_tiered_pricing, - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type scalable_matrix_with_tiered_pricing_config = - { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - second_dimension: String? - } - - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - attr_accessor first_dimension: String - - attr_accessor matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor] - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier] - - attr_accessor second_dimension: String? - - def initialize: ( - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - ?second_dimension: String? - ) -> void - - def to_hash: -> { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - second_dimension: String? - } - - type matrix_scaling_factor = - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor first_dimension_value: String - - attr_accessor scaling_factor: String - - attr_accessor second_dimension_value: String? - - def initialize: ( - first_dimension_value: String, - scaling_factor: String, - ?second_dimension_value: String? - ) -> void - - def to_hash: -> { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - end - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type cumulative_grouped_bulk = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - model_type: :cumulative_grouped_bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence - - attr_accessor cumulative_grouped_bulk_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation] - - attr_accessor model_type: :cumulative_grouped_bulk - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :cumulative_grouped_bulk - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - model_type: :cumulative_grouped_bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence] - end - - type cumulative_grouped_bulk_config = - { - dimension_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String - } - - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - attr_accessor dimension_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue] - - attr_accessor group: String - - def initialize: ( - dimension_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String - ) -> void - - def to_hash: -> { - dimension_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String - } - - type dimension_value = - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - - class DimensionValue < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type cumulative_grouped_allocation = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - model_type: :cumulative_grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence - - attr_accessor cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation] - - attr_accessor model_type: :cumulative_grouped_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :cumulative_grouped_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - model_type: :cumulative_grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence] - end - - type cumulative_grouped_allocation_config = - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor cumulative_allocation: String - - attr_accessor group_allocation: String - - attr_accessor grouping_key: String - - attr_accessor unit_amount: String - - def initialize: ( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ) -> void - - def to_hash: -> { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type minimum_composite = - { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: :minimum_composite, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MinimumComposite < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation] - - attr_accessor minimum_composite_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig - - attr_accessor model_type: :minimum_composite - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :minimum_composite - ) -> void - - def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: :minimum_composite, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::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? - } + 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 @@ -12698,56 +2130,22 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - 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 } + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::cadence] end end - type event_output = + type tiered_with_proration = { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation], - model_type: :event_output, + model_type: :tiered_with_proration, 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::LicenseAllocationPrice::EventOutput::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?, @@ -12759,19 +2157,17 @@ module Orb 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 + 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::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::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig + attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -12780,7 +2176,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config? attr_accessor currency: String? @@ -12801,16 +2197,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation], 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::LicenseAllocationPrice::EventOutput::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?, @@ -12820,21 +2215,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::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation], - model_type: :event_output, + model_type: :tiered_with_proration, 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::LicenseAllocationPrice::EventOutput::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?, @@ -12864,111 +2258,57 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence] + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::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::BetaCreatePlanVersionParams::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::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] def initialize: ( - unit_rating_key: String, - ?default_unit_rate: String?, - ?grouping_key: String? + tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] ) -> void def to_hash: -> { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? + tiers: ::Array[Orb::BetaCreatePlanVersionParams::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::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 = + type grouped_with_min_max_thresholds = { - bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::cadence, + 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: :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::ReplacePrice::Price::BulkWithFilters::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?, @@ -12980,14 +2320,14 @@ module Orb reference_id: String? } - class BulkWithFilters < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::cadence + attr_accessor grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::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 @@ -12999,7 +2339,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config? attr_accessor currency: String? @@ -13019,104 +2359,49 @@ module Orb 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 +2421,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 +2480,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 +2499,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 +2520,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 +2538,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 +2581,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 +2640,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 +2659,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 +2680,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 +2698,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 +2741,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 +2824,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 +2843,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 +2864,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 +2882,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 +2925,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/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..5da1a785 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,229 @@ 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::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 +329,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 +348,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 +369,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 +387,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 +412,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 +485,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 tiered_with_proration = { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::cadence, + cadence: Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, + model_type: :tiered_with_proration, name: String, - tiered_config: Orb::TieredConfig, + 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::Tiered::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?, @@ -318,18 +512,16 @@ module Orb reference_id: String? } - class Tiered < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::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::Tiered::LicenseAllocation] - - attr_accessor model_type: :tiered + attr_accessor model_type: :tiered_with_proration attr_accessor name: String - attr_accessor tiered_config: Orb::TieredConfig + attr_accessor tiered_with_proration_config: Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig attr_accessor billable_metric_id: String? @@ -339,7 +531,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::TieredWithProration::conversion_rate_config? attr_accessor currency: String? @@ -360,16 +552,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::cadence, + cadence: Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::LicenseAllocation], name: String, - tiered_config: Orb::TieredConfig, + 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::Tiered::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?, @@ -379,21 +570,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :tiered + ?model_type: :tiered_with_proration ) -> void def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::cadence, + cadence: Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, + model_type: :tiered_with_proration, name: String, - tiered_config: Orb::TieredConfig, + 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::Tiered::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?, @@ -423,46 +613,57 @@ 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::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 = + type grouped_with_min_max_thresholds = { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::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::Bulk::LicenseAllocation], - model_type: :bulk, + 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::Bulk::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?, @@ -474,16 +675,14 @@ module Orb reference_id: String? } - class Bulk < Orb::Internal::Type::BaseModel - attr_accessor bulk_config: Orb::BulkConfig + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::cadence - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::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::Bulk::LicenseAllocation] - - attr_accessor model_type: :bulk + attr_accessor model_type: :grouped_with_min_max_thresholds attr_accessor name: String @@ -495,7 +694,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::GroupedWithMinMaxThresholds::conversion_rate_config? attr_accessor currency: String? @@ -516,16 +715,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::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::LicenseAllocation], name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -535,21 +733,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :bulk + ?model_type: :grouped_with_min_max_thresholds ) -> void def to_hash: -> { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::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::Bulk::LicenseAllocation], - model_type: :bulk, + 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::Bulk::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?, @@ -579,46 +776,54 @@ 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::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 bulk_with_filters = + type cumulative_grouped_allocation = { - bulk_with_filters_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::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::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, + 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::BulkWithFilters::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?, @@ -630,16 +835,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 CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::cadence - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::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::BulkWithFilters::LicenseAllocation] - - attr_accessor model_type: :bulk_with_filters + attr_accessor model_type: :cumulative_grouped_allocation attr_accessor name: String @@ -651,7 +854,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::CumulativeGroupedAllocation::conversion_rate_config? attr_accessor currency: String? @@ -672,16 +875,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::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, 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::CumulativeGroupedAllocation::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -691,5576 +893,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :bulk_with_filters + ?model_type: :cumulative_grouped_allocation ) -> 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::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, + 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::BulkWithFilters::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type bulk_with_filters_config = - { - filters: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - attr_accessor filters: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter] - - attr_accessor tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - - def initialize: ( - filters: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - ) -> void - - def to_hash: -> { - filters: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - type filter = { property_key: String, property_value: String } - - class Filter < Orb::Internal::Type::BaseModel - attr_accessor property_key: String - - attr_accessor property_value: String - - def initialize: ( - property_key: String, - property_value: String - ) -> void - - def to_hash: -> { property_key: String, property_value: String } - end - - type tier = { unit_amount: String, tier_lower_bound: String? } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - attr_accessor tier_lower_bound: String? - - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void - - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type package = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::LicenseAllocation], - model_type: :package, - name: String, - package_config: Orb::PackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Package < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::LicenseAllocation] - - attr_accessor model_type: :package - - attr_accessor name: String - - attr_accessor package_config: Orb::PackageConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::LicenseAllocation], - name: String, - package_config: Orb::PackageConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::LicenseAllocation], - model_type: :package, - name: String, - package_config: Orb::PackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type matrix = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Matrix < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::LicenseAllocation] - - attr_accessor matrix_config: Orb::MatrixConfig - - attr_accessor model_type: :matrix - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type threshold_total_amount = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, - name: String, - threshold_total_amount_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation] - - attr_accessor model_type: :threshold_total_amount - - attr_accessor name: String - - attr_accessor threshold_total_amount_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - name: String, - threshold_total_amount_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :threshold_total_amount - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, - name: String, - threshold_total_amount_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type threshold_total_amount_config = - { - consumption_table: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? - } - - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - attr_accessor consumption_table: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable] - - attr_accessor prorate: bool? - - def initialize: ( - consumption_table: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - ?prorate: bool? - ) -> void - - def to_hash: -> { - consumption_table: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? - } - - type consumption_table = - { threshold: String, total_amount: String } - - class ConsumptionTable < Orb::Internal::Type::BaseModel - attr_accessor threshold: String - - attr_accessor total_amount: String - - def initialize: ( - threshold: String, - total_amount: String - ) -> void - - def to_hash: -> { threshold: String, total_amount: String } - end - end - end - - type tiered_package = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - model_type: :tiered_package, - name: String, - tiered_package_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::LicenseAllocation] - - attr_accessor model_type: :tiered_package - - attr_accessor name: String - - attr_accessor tiered_package_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - name: String, - tiered_package_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - model_type: :tiered_package, - name: String, - tiered_package_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_package_config = - { - package_size: String, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - } - - class TieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - - def initialize: ( - package_size: String, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - package_size: String, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier] - } - - type tier = { per_unit: String, tier_lower_bound: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { per_unit: String, tier_lower_bound: String } - end - end - end - - type tiered_with_minimum = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - model_type: :tiered_with_minimum, - name: String, - tiered_with_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation] - - attr_accessor model_type: :tiered_with_minimum - - attr_accessor name: String - - attr_accessor tiered_with_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - name: String, - tiered_with_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_with_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - model_type: :tiered_with_minimum, - name: String, - tiered_with_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_with_minimum_config = - { - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool - } - - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier] - - attr_reader hide_zero_amount_tiers: bool? - - def hide_zero_amount_tiers=: (bool) -> bool - - attr_reader prorate: bool? - - def prorate=: (bool) -> bool - - def initialize: ( - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - ?hide_zero_amount_tiers: bool, - ?prorate: bool - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool - } - - type tier = - { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String - - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type grouped_tiered = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - model_type: :grouped_tiered, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedTiered < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::cadence - - attr_accessor grouped_tiered_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::LicenseAllocation] - - attr_accessor model_type: :grouped_tiered - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_tiered - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - model_type: :grouped_tiered, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::cadence] - end - - type grouped_tiered_config = - { - grouping_key: String, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - } - - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - - def initialize: ( - grouping_key: String, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered_package_with_minimum = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - model_type: :tiered_package_with_minimum, - name: String, - tiered_package_with_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation] - - attr_accessor model_type: :tiered_package_with_minimum - - attr_accessor name: String - - attr_accessor tiered_package_with_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - name: String, - tiered_package_with_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_package_with_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - model_type: :tiered_package_with_minimum, - name: String, - tiered_package_with_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_package_with_minimum_config = - { - package_size: Float, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - } - - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor package_size: Float - - attr_accessor tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - - def initialize: ( - package_size: Float, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - ) -> void - - def to_hash: -> { - package_size: Float, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - } - - type tier = - { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String - - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - end - end - end - - type package_with_allocation = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - model_type: :package_with_allocation, - name: String, - package_with_allocation_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation] - - attr_accessor model_type: :package_with_allocation - - attr_accessor name: String - - attr_accessor package_with_allocation_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - name: String, - package_with_allocation_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :package_with_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - model_type: :package_with_allocation, - name: String, - package_with_allocation_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type package_with_allocation_config = - { - allocation: String, - package_amount: String, - package_size: String - } - - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor allocation: String - - attr_accessor package_amount: String - - attr_accessor package_size: String - - def initialize: ( - allocation: String, - package_amount: String, - package_size: String - ) -> void - - def to_hash: -> { - allocation: String, - package_amount: String, - package_size: String - } - end - end - - type unit_with_percent = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - model_type: :unit_with_percent, - name: String, - unit_with_percent_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class UnitWithPercent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation] - - attr_accessor model_type: :unit_with_percent - - attr_accessor name: String - - attr_accessor unit_with_percent_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - name: String, - unit_with_percent_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit_with_percent - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - model_type: :unit_with_percent, - name: String, - unit_with_percent_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type unit_with_percent_config = - { percent: String, unit_amount: String } - - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - attr_accessor percent: String - - attr_accessor unit_amount: String - - def initialize: (percent: String, unit_amount: String) -> void - - def to_hash: -> { percent: String, unit_amount: String } - end - end - - type matrix_with_allocation = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - model_type: :matrix_with_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation] - - attr_accessor matrix_with_allocation_config: Orb::MatrixWithAllocationConfig - - attr_accessor model_type: :matrix_with_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix_with_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation], - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - model_type: :matrix_with_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type tiered_with_proration = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class TieredWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::LicenseAllocation] - - attr_accessor model_type: :tiered_with_proration - - attr_accessor name: String - - attr_accessor tiered_with_proration_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - name: String, - tiered_with_proration_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :tiered_with_proration - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::LicenseAllocation], - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type tiered_with_proration_config = - { - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - } - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type unit_with_proration = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - model_type: :unit_with_proration, - name: String, - unit_with_proration_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class UnitWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::LicenseAllocation] - - attr_accessor model_type: :unit_with_proration - - attr_accessor name: String - - attr_accessor unit_with_proration_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - name: String, - unit_with_proration_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :unit_with_proration - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::LicenseAllocation], - model_type: :unit_with_proration, - name: String, - unit_with_proration_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type unit_with_proration_config = { unit_amount: String } - - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - def initialize: (unit_amount: String) -> void - - def to_hash: -> { unit_amount: String } - end - end - - type grouped_allocation = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - model_type: :grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::cadence - - attr_accessor grouped_allocation_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation] - - attr_accessor model_type: :grouped_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::cadence, - grouped_allocation_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation], - model_type: :grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::cadence] - end - - type grouped_allocation_config = - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor allocation: String - - attr_accessor grouping_key: String - - attr_accessor overage_unit_rate: String - - def initialize: ( - allocation: String, - grouping_key: String, - overage_unit_rate: String - ) -> void - - def to_hash: -> { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type bulk_with_proration = - { - bulk_with_proration_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - model_type: :bulk_with_proration, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class BulkWithProration < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_proration_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig - - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::LicenseAllocation] - - attr_accessor model_type: :bulk_with_proration - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - bulk_with_proration_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :bulk_with_proration - ) -> void - - def to_hash: -> { - bulk_with_proration_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::LicenseAllocation], - model_type: :bulk_with_proration, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type bulk_with_proration_config = - { - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - } - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier] - } - - type tier = { unit_amount: String, tier_lower_bound: String? } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - attr_accessor tier_lower_bound: String? - - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void - - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_prorated_minimum = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - model_type: :grouped_with_prorated_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence - - attr_accessor grouped_with_prorated_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation] - - attr_accessor model_type: :grouped_with_prorated_minimum - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_prorated_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence, - grouped_with_prorated_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation], - model_type: :grouped_with_prorated_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::cadence] - end - - type grouped_with_prorated_minimum_config = - { grouping_key: String, minimum: String, unit_rate: String } - - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor minimum: String - - attr_accessor unit_rate: String - - def initialize: ( - grouping_key: String, - minimum: String, - unit_rate: String - ) -> void - - def to_hash: -> { - grouping_key: String, - minimum: String, - unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_metered_minimum = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - model_type: :grouped_with_metered_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence - - attr_accessor grouped_with_metered_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation] - - attr_accessor model_type: :grouped_with_metered_minimum - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_metered_minimum - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence, - grouped_with_metered_minimum_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation], - model_type: :grouped_with_metered_minimum, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::cadence] - end - - type grouped_with_metered_minimum_config = - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - } - - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor minimum_unit_amount: String - - attr_accessor pricing_key: String - - attr_accessor scaling_factors: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor] - - attr_accessor scaling_key: String - - attr_accessor unit_amounts: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - - def initialize: ( - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - ) -> void - - def to_hash: -> { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - } - - type scaling_factor = - { scaling_factor: String, scaling_value: String } - - class ScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor scaling_factor: String - - attr_accessor scaling_value: String - - def initialize: ( - scaling_factor: String, - scaling_value: String - ) -> void - - def to_hash: -> { - scaling_factor: String, - scaling_value: String - } - end - - type unit_amount = { pricing_value: String, unit_amount: String } - - class UnitAmount < Orb::Internal::Type::BaseModel - attr_accessor pricing_value: String - - attr_accessor unit_amount: String - - def initialize: ( - pricing_value: String, - unit_amount: String - ) -> void - - def to_hash: -> { pricing_value: String, unit_amount: String } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type grouped_with_min_max_thresholds = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence - - attr_accessor grouped_with_min_max_thresholds_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation] - - attr_accessor model_type: :grouped_with_min_max_thresholds - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_with_min_max_thresholds - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation], - model_type: :grouped_with_min_max_thresholds, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::cadence] - end - - type grouped_with_min_max_thresholds_config = - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor maximum_charge: String - - attr_accessor minimum_charge: String - - attr_accessor per_unit_rate: String - - def initialize: ( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ) -> void - - def to_hash: -> { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type matrix_with_display_name = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: :matrix_with_display_name, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation] - - attr_accessor matrix_with_display_name_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig - - attr_accessor model_type: :matrix_with_display_name - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :matrix_with_display_name - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation], - matrix_with_display_name_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: :matrix_with_display_name, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type matrix_with_display_name_config = - { - dimension: String, - unit_amounts: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - } - - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - attr_accessor dimension: String - - attr_accessor unit_amounts: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - - def initialize: ( - dimension: String, - unit_amounts: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - ) -> void - - def to_hash: -> { - dimension: String, - unit_amounts: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] - } - - type unit_amount = - { - dimension_value: String, - display_name: String, - unit_amount: String - } - - class UnitAmount < Orb::Internal::Type::BaseModel - attr_accessor dimension_value: String - - attr_accessor display_name: String - - attr_accessor unit_amount: String - - def initialize: ( - dimension_value: String, - display_name: String, - unit_amount: String - ) -> void - - def to_hash: -> { - dimension_value: String, - display_name: String, - unit_amount: String - } - end - end - end - - type grouped_tiered_package = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - model_type: :grouped_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::cadence - - attr_accessor grouped_tiered_package_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation] - - attr_accessor model_type: :grouped_tiered_package - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :grouped_tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::cadence, - grouped_tiered_package_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation], - model_type: :grouped_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::cadence] - end - - type grouped_tiered_package_config = - { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - } - - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - - def initialize: ( - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] - } - - type tier = { per_unit: String, tier_lower_bound: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor per_unit: String - - attr_accessor tier_lower_bound: String - - def initialize: ( - per_unit: String, - tier_lower_bound: String - ) -> void - - def to_hash: -> { per_unit: String, tier_lower_bound: String } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type max_group_tiered_package = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: :max_group_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation] - - attr_accessor max_group_tiered_package_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - - attr_accessor model_type: :max_group_tiered_package - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :max_group_tiered_package - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation], - max_group_tiered_package_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: :max_group_tiered_package, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type max_group_tiered_package_config = - { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - } - - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - - def initialize: ( - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] - } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type scalable_matrix_with_unit_pricing = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - model_type: :scalable_matrix_with_unit_pricing, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation] - - attr_accessor model_type: :scalable_matrix_with_unit_pricing - - attr_accessor name: String - - attr_accessor scalable_matrix_with_unit_pricing_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - name: String, - scalable_matrix_with_unit_pricing_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :scalable_matrix_with_unit_pricing - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation], - model_type: :scalable_matrix_with_unit_pricing, - name: String, - scalable_matrix_with_unit_pricing_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type scalable_matrix_with_unit_pricing_config = - { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - grouping_key: String?, - prorate: bool?, - second_dimension: String? - } - - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - attr_accessor first_dimension: String - - attr_accessor matrix_scaling_factors: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor] - - attr_accessor unit_price: String - - attr_accessor grouping_key: String? - - attr_accessor prorate: bool? - - attr_accessor second_dimension: String? - - def initialize: ( - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - ?grouping_key: String?, - ?prorate: bool?, - ?second_dimension: String? - ) -> void - - def to_hash: -> { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - grouping_key: String?, - prorate: bool?, - second_dimension: String? - } - - type matrix_scaling_factor = - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor first_dimension_value: String - - attr_accessor scaling_factor: String - - attr_accessor second_dimension_value: String? - - def initialize: ( - first_dimension_value: String, - scaling_factor: String, - ?second_dimension_value: String? - ) -> void - - def to_hash: -> { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - end - end - end - - type scalable_matrix_with_tiered_pricing = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - model_type: :scalable_matrix_with_tiered_pricing, - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation] - - attr_accessor model_type: :scalable_matrix_with_tiered_pricing - - attr_accessor name: String - - attr_accessor scalable_matrix_with_tiered_pricing_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :scalable_matrix_with_tiered_pricing - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], - model_type: :scalable_matrix_with_tiered_pricing, - name: String, - scalable_matrix_with_tiered_pricing_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type scalable_matrix_with_tiered_pricing_config = - { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - second_dimension: String? - } - - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - attr_accessor first_dimension: String - - attr_accessor matrix_scaling_factors: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor] - - attr_accessor tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier] - - attr_accessor second_dimension: String? - - def initialize: ( - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - ?second_dimension: String? - ) -> void - - def to_hash: -> { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - second_dimension: String? - } - - type matrix_scaling_factor = - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor first_dimension_value: String - - attr_accessor scaling_factor: String - - attr_accessor second_dimension_value: String? - - def initialize: ( - first_dimension_value: String, - scaling_factor: String, - ?second_dimension_value: String? - ) -> void - - def to_hash: -> { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - end - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end - end - - type cumulative_grouped_bulk = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - model_type: :cumulative_grouped_bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::cadence - - attr_accessor cumulative_grouped_bulk_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation] - - attr_accessor model_type: :cumulative_grouped_bulk - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :cumulative_grouped_bulk - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, - cumulative_grouped_bulk_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation], - model_type: :cumulative_grouped_bulk, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::cadence] - end - - type cumulative_grouped_bulk_config = - { - dimension_values: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String - } - - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - attr_accessor dimension_values: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue] - - attr_accessor group: String - - def initialize: ( - dimension_values: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String - ) -> void - - def to_hash: -> { - dimension_values: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String - } - - type dimension_value = - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - - class DimensionValue < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - end - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type cumulative_grouped_allocation = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - model_type: :cumulative_grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence - - attr_accessor cumulative_grouped_allocation_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation] - - attr_accessor model_type: :cumulative_grouped_allocation - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :cumulative_grouped_allocation - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - model_type: :cumulative_grouped_allocation, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence] - end - - type cumulative_grouped_allocation_config = - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor cumulative_allocation: String - - attr_accessor group_allocation: String - - attr_accessor grouping_key: String - - attr_accessor unit_amount: String - - def initialize: ( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ) -> void - - def to_hash: -> { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - type minimum_composite = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: :minimum_composite, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class MinimumComposite < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::LicenseAllocation] - - attr_accessor minimum_composite_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig - - attr_accessor model_type: :minimum_composite - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :minimum_composite - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::LicenseAllocation], - minimum_composite_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: :minimum_composite, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type minimum_composite_config = - { minimum_amount: String, prorated: bool } - - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String - - attr_reader prorated: bool? - - def prorated=: (bool) -> bool - - def initialize: (minimum_amount: String, ?prorated: bool) -> void - - def to_hash: -> { minimum_amount: String, prorated: bool } - end - end - - type percent = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::LicenseAllocation], - model_type: :percent, - name: String, - percent_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::PercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class Percent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::cadence - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::LicenseAllocation] - - attr_accessor model_type: :percent - - attr_accessor name: String - - attr_accessor percent_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::PercentConfig - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::LicenseAllocation], - name: String, - percent_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::PercentConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :percent - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::cadence, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::LicenseAllocation], - model_type: :percent, - name: String, - percent_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::PercentConfig, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - - type percent_config = { percent: Float } - - class PercentConfig < Orb::Internal::Type::BaseModel - attr_accessor percent: Float - - def initialize: (percent: Float) -> void - - def to_hash: -> { percent: Float } - end - end - - type event_output = - { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::LicenseAllocation], - model_type: :event_output, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - class EventOutput < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::cadence - - attr_accessor event_output_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig - - attr_accessor item_id: String - - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::LicenseAllocation] - - attr_accessor model_type: :event_output - - attr_accessor name: String - - attr_accessor billable_metric_id: String? - - attr_accessor billed_in_advance: bool? - - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor conversion_rate: Float? - - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::conversion_rate_config? - - attr_accessor currency: String? - - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - - attr_accessor external_price_id: String? - - attr_accessor fixed_price_quantity: Float? - - attr_accessor invoice_grouping_key: String? - - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - - attr_accessor license_type_id: String? - - attr_accessor metadata: ::Hash[Symbol, String?]? - - attr_accessor reference_id: String? - - def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::LicenseAllocation], - name: String, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::conversion_rate_config?, - ?currency: String?, - ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?invoice_grouping_key: String?, - ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?license_type_id: String?, - ?metadata: ::Hash[Symbol, String?]?, - ?reference_id: String?, - ?model_type: :event_output - ) -> void - - def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::LicenseAllocation], - model_type: :event_output, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, - invoice_grouping_key: String?, - invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - license_type_id: String?, - metadata: ::Hash[Symbol, String?]?, - reference_id: String? - } - - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::cadence] - end - - type event_output_config = - { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? - } - - class EventOutputConfig < Orb::Internal::Type::BaseModel - attr_accessor unit_rating_key: String - - attr_accessor default_unit_rate: String? - - attr_accessor grouping_key: String? - - def initialize: ( - unit_rating_key: String, - ?default_unit_rate: String?, - ?grouping_key: String? - ) -> void - - def to_hash: -> { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? - } - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end - - def self?.variants: -> ::Array[Orb::Models::PlanCreateParams::Price::license_allocation_price] - end - - type price = - Orb::NewPlanUnitPrice - | Orb::NewPlanTieredPrice - | 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?, + conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -6290,57 +936,54 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::cadence] + def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::cadence] end - type tiered_with_proration_config = + type cumulative_grouped_allocation_config = { - tiers: ::Array[Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String ) -> void def to_hash: -> { - tiers: ::Array[Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + cadence: Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::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?, @@ -6352,14 +995,14 @@ module Orb reference_id: String? } - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::cadence + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::cadence - attr_accessor grouped_with_min_max_thresholds_config: Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + attr_accessor daily_credit_allowance_config: Orb::PlanCreateParams::Price::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 @@ -6371,7 +1014,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::conversion_rate_config? attr_accessor currency: String? @@ -6392,15 +1035,15 @@ module Orb 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, + cadence: Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::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?, @@ -6410,20 +1053,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::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + cadence: Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::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?, @@ -6453,54 +1096,78 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::cadence] + def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::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::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 cumulative_grouped_allocation = + type metered_allowance = { - cadence: Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + cadence: Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::cadence, item_id: String, - model_type: :cumulative_grouped_allocation, + metered_allowance_config: Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::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?, @@ -6512,14 +1179,14 @@ module Orb 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 + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::cadence attr_accessor item_id: String - attr_accessor model_type: :cumulative_grouped_allocation + attr_accessor metered_allowance_config: Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance attr_accessor name: String @@ -6531,7 +1198,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::conversion_rate_config? attr_accessor currency: String? @@ -6552,15 +1219,15 @@ module Orb 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, + cadence: Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::cadence, item_id: String, + metered_allowance_config: Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig, name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::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?, @@ -6570,20 +1237,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::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + cadence: Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::cadence, item_id: String, - model_type: :cumulative_grouped_allocation, + metered_allowance_config: Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::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?, @@ -6613,38 +1280,52 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::cadence] + def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::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/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..6be550a3 100644 --- a/sig/orb/models/price.rbs +++ b/sig/orb/models/price.rbs @@ -29,6 +29,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 @@ -8531,6 +8533,652 @@ module Orb end end + type daily_credit_allowance = + { + id: String, + billable_metric: Orb::BillableMetricTiny?, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Models::Price::DailyCreditAllowance::billing_mode, + cadence: Orb::Models::Price::DailyCreditAllowance::cadence, + composite_price_filters: ::Array[Orb::Price::DailyCreditAllowance::CompositePriceFilter]?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Price::DailyCreditAllowance::conversion_rate_config?, + created_at: Time, + credit_allocation: Orb::Allocation?, + currency: String, + daily_credit_allowance_config: Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + discount: Orb::Models::discount?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, + item: Orb::ItemSlim, + maximum: Orb::Maximum?, + maximum_amount: String?, + metadata: ::Hash[Symbol, String], + minimum: Orb::Minimum?, + minimum_amount: String?, + model_type: :daily_credit_allowance, + name: String, + plan_phase_order: Integer?, + price_type: Orb::Models::Price::DailyCreditAllowance::price_type, + replaces_price_id: String?, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, + license_type: Orb::Price::DailyCreditAllowance::LicenseType? + } + + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor billable_metric: Orb::BillableMetricTiny? + + attr_accessor billing_cycle_configuration: Orb::BillingCycleConfiguration + + attr_accessor billing_mode: Orb::Models::Price::DailyCreditAllowance::billing_mode + + attr_accessor cadence: Orb::Models::Price::DailyCreditAllowance::cadence + + attr_accessor composite_price_filters: ::Array[Orb::Price::DailyCreditAllowance::CompositePriceFilter]? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::Price::DailyCreditAllowance::conversion_rate_config? + + attr_accessor created_at: Time + + attr_accessor credit_allocation: Orb::Allocation? + + attr_accessor currency: String + + attr_accessor daily_credit_allowance_config: Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + + attr_accessor discount: Orb::Models::discount? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::BillingCycleConfiguration? + + attr_accessor item: Orb::ItemSlim + + attr_accessor maximum: Orb::Maximum? + + attr_accessor maximum_amount: String? + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor minimum: Orb::Minimum? + + attr_accessor minimum_amount: String? + + attr_accessor model_type: :daily_credit_allowance + + attr_accessor name: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor price_type: Orb::Models::Price::DailyCreditAllowance::price_type + + attr_accessor replaces_price_id: String? + + attr_accessor dimensional_price_configuration: Orb::DimensionalPriceConfiguration? + + attr_accessor license_type: Orb::Price::DailyCreditAllowance::LicenseType? + + def initialize: ( + id: String, + billable_metric: Orb::BillableMetricTiny?, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Models::Price::DailyCreditAllowance::billing_mode, + cadence: Orb::Models::Price::DailyCreditAllowance::cadence, + composite_price_filters: ::Array[Orb::Price::DailyCreditAllowance::CompositePriceFilter]?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Price::DailyCreditAllowance::conversion_rate_config?, + created_at: Time, + credit_allocation: Orb::Allocation?, + currency: String, + daily_credit_allowance_config: Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + discount: Orb::Models::discount?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, + item: Orb::ItemSlim, + maximum: Orb::Maximum?, + maximum_amount: String?, + metadata: ::Hash[Symbol, String], + minimum: Orb::Minimum?, + minimum_amount: String?, + name: String, + plan_phase_order: Integer?, + price_type: Orb::Models::Price::DailyCreditAllowance::price_type, + replaces_price_id: String?, + ?dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, + ?license_type: Orb::Price::DailyCreditAllowance::LicenseType?, + ?model_type: :daily_credit_allowance + ) -> void + + def to_hash: -> { + id: String, + billable_metric: Orb::BillableMetricTiny?, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Models::Price::DailyCreditAllowance::billing_mode, + cadence: Orb::Models::Price::DailyCreditAllowance::cadence, + composite_price_filters: ::Array[Orb::Price::DailyCreditAllowance::CompositePriceFilter]?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Price::DailyCreditAllowance::conversion_rate_config?, + created_at: Time, + credit_allocation: Orb::Allocation?, + currency: String, + daily_credit_allowance_config: Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + discount: Orb::Models::discount?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, + item: Orb::ItemSlim, + maximum: Orb::Maximum?, + maximum_amount: String?, + metadata: ::Hash[Symbol, String], + minimum: Orb::Minimum?, + minimum_amount: String?, + model_type: :daily_credit_allowance, + name: String, + plan_phase_order: Integer?, + price_type: Orb::Models::Price::DailyCreditAllowance::price_type, + replaces_price_id: String?, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, + license_type: Orb::Price::DailyCreditAllowance::LicenseType? + } + + type billing_mode = :in_advance | :in_arrear + + module BillingMode + extend Orb::Internal::Type::Enum + + IN_ADVANCE: :in_advance + IN_ARREAR: :in_arrear + + def self?.values: -> ::Array[Orb::Models::Price::DailyCreditAllowance::billing_mode] + end + + type cadence = + :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ONE_TIME: :one_time + MONTHLY: :monthly + QUARTERLY: :quarterly + SEMI_ANNUAL: :semi_annual + ANNUAL: :annual + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::Price::DailyCreditAllowance::cadence] + end + + type composite_price_filter = + { + field: Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::field, + operator: Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::operator, + values: ::Array[String] + } + + class CompositePriceFilter < Orb::Internal::Type::BaseModel + attr_accessor field: Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::field + + attr_accessor operator: Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::operator + + attr_accessor values: ::Array[String] + + def initialize: ( + field: Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::field, + operator: Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::operator, + values: ::Array[String] + ) -> void + + def to_hash: -> { + field: Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::field, + operator: Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::operator, + values: ::Array[String] + } + + type field = + :price_id | :item_id | :price_type | :currency | :pricing_unit_id + + module Field + extend Orb::Internal::Type::Enum + + PRICE_ID: :price_id + ITEM_ID: :item_id + PRICE_TYPE: :price_type + CURRENCY: :currency + PRICING_UNIT_ID: :pricing_unit_id + + def self?.values: -> ::Array[Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::field] + end + + type operator = :includes | :excludes + + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES: :includes + EXCLUDES: :excludes + + def self?.values: -> ::Array[Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::operator] + end + end + + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String + + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + + def initialize: ( + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + ) -> void + + def to_hash: -> { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end + end + + type price_type = :usage_price | :fixed_price | :composite_price + + module PriceType + extend Orb::Internal::Type::Enum + + USAGE_PRICE: :usage_price + FIXED_PRICE: :fixed_price + COMPOSITE_PRICE: :composite_price + + def self?.values: -> ::Array[Orb::Models::Price::DailyCreditAllowance::price_type] + end + + type license_type = { id: String, grouping_key: String, name: String } + + class LicenseType < Orb::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor grouping_key: String + + attr_accessor name: String + + def initialize: ( + id: String, + grouping_key: String, + name: String + ) -> void + + def to_hash: -> { id: String, grouping_key: String, name: String } + end + end + + type metered_allowance = + { + id: String, + billable_metric: Orb::BillableMetricTiny?, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Models::Price::MeteredAllowance::billing_mode, + cadence: Orb::Models::Price::MeteredAllowance::cadence, + composite_price_filters: ::Array[Orb::Price::MeteredAllowance::CompositePriceFilter]?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Price::MeteredAllowance::conversion_rate_config?, + created_at: Time, + credit_allocation: Orb::Allocation?, + currency: String, + discount: Orb::Models::discount?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, + item: Orb::ItemSlim, + maximum: Orb::Maximum?, + maximum_amount: String?, + metadata: ::Hash[Symbol, String], + metered_allowance_config: Orb::Price::MeteredAllowance::MeteredAllowanceConfig, + minimum: Orb::Minimum?, + minimum_amount: String?, + model_type: :metered_allowance, + name: String, + plan_phase_order: Integer?, + price_type: Orb::Models::Price::MeteredAllowance::price_type, + replaces_price_id: String?, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, + license_type: Orb::Price::MeteredAllowance::LicenseType? + } + + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor billable_metric: Orb::BillableMetricTiny? + + attr_accessor billing_cycle_configuration: Orb::BillingCycleConfiguration + + attr_accessor billing_mode: Orb::Models::Price::MeteredAllowance::billing_mode + + attr_accessor cadence: Orb::Models::Price::MeteredAllowance::cadence + + attr_accessor composite_price_filters: ::Array[Orb::Price::MeteredAllowance::CompositePriceFilter]? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::Price::MeteredAllowance::conversion_rate_config? + + attr_accessor created_at: Time + + attr_accessor credit_allocation: Orb::Allocation? + + attr_accessor currency: String + + attr_accessor discount: Orb::Models::discount? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::BillingCycleConfiguration? + + attr_accessor item: Orb::ItemSlim + + attr_accessor maximum: Orb::Maximum? + + attr_accessor maximum_amount: String? + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor metered_allowance_config: Orb::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor minimum: Orb::Minimum? + + attr_accessor minimum_amount: String? + + attr_accessor model_type: :metered_allowance + + attr_accessor name: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor price_type: Orb::Models::Price::MeteredAllowance::price_type + + attr_accessor replaces_price_id: String? + + attr_accessor dimensional_price_configuration: Orb::DimensionalPriceConfiguration? + + attr_accessor license_type: Orb::Price::MeteredAllowance::LicenseType? + + def initialize: ( + id: String, + billable_metric: Orb::BillableMetricTiny?, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Models::Price::MeteredAllowance::billing_mode, + cadence: Orb::Models::Price::MeteredAllowance::cadence, + composite_price_filters: ::Array[Orb::Price::MeteredAllowance::CompositePriceFilter]?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Price::MeteredAllowance::conversion_rate_config?, + created_at: Time, + credit_allocation: Orb::Allocation?, + currency: String, + discount: Orb::Models::discount?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, + item: Orb::ItemSlim, + maximum: Orb::Maximum?, + maximum_amount: String?, + metadata: ::Hash[Symbol, String], + metered_allowance_config: Orb::Price::MeteredAllowance::MeteredAllowanceConfig, + minimum: Orb::Minimum?, + minimum_amount: String?, + name: String, + plan_phase_order: Integer?, + price_type: Orb::Models::Price::MeteredAllowance::price_type, + replaces_price_id: String?, + ?dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, + ?license_type: Orb::Price::MeteredAllowance::LicenseType?, + ?model_type: :metered_allowance + ) -> void + + def to_hash: -> { + id: String, + billable_metric: Orb::BillableMetricTiny?, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Models::Price::MeteredAllowance::billing_mode, + cadence: Orb::Models::Price::MeteredAllowance::cadence, + composite_price_filters: ::Array[Orb::Price::MeteredAllowance::CompositePriceFilter]?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Price::MeteredAllowance::conversion_rate_config?, + created_at: Time, + credit_allocation: Orb::Allocation?, + currency: String, + discount: Orb::Models::discount?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, + item: Orb::ItemSlim, + maximum: Orb::Maximum?, + maximum_amount: String?, + metadata: ::Hash[Symbol, String], + metered_allowance_config: Orb::Price::MeteredAllowance::MeteredAllowanceConfig, + minimum: Orb::Minimum?, + minimum_amount: String?, + model_type: :metered_allowance, + name: String, + plan_phase_order: Integer?, + price_type: Orb::Models::Price::MeteredAllowance::price_type, + replaces_price_id: String?, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, + license_type: Orb::Price::MeteredAllowance::LicenseType? + } + + type billing_mode = :in_advance | :in_arrear + + module BillingMode + extend Orb::Internal::Type::Enum + + IN_ADVANCE: :in_advance + IN_ARREAR: :in_arrear + + def self?.values: -> ::Array[Orb::Models::Price::MeteredAllowance::billing_mode] + end + + type cadence = + :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ONE_TIME: :one_time + MONTHLY: :monthly + QUARTERLY: :quarterly + SEMI_ANNUAL: :semi_annual + ANNUAL: :annual + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::Price::MeteredAllowance::cadence] + end + + type composite_price_filter = + { + field: Orb::Models::Price::MeteredAllowance::CompositePriceFilter::field, + operator: Orb::Models::Price::MeteredAllowance::CompositePriceFilter::operator, + values: ::Array[String] + } + + class CompositePriceFilter < Orb::Internal::Type::BaseModel + attr_accessor field: Orb::Models::Price::MeteredAllowance::CompositePriceFilter::field + + attr_accessor operator: Orb::Models::Price::MeteredAllowance::CompositePriceFilter::operator + + attr_accessor values: ::Array[String] + + def initialize: ( + field: Orb::Models::Price::MeteredAllowance::CompositePriceFilter::field, + operator: Orb::Models::Price::MeteredAllowance::CompositePriceFilter::operator, + values: ::Array[String] + ) -> void + + def to_hash: -> { + field: Orb::Models::Price::MeteredAllowance::CompositePriceFilter::field, + operator: Orb::Models::Price::MeteredAllowance::CompositePriceFilter::operator, + values: ::Array[String] + } + + type field = + :price_id | :item_id | :price_type | :currency | :pricing_unit_id + + module Field + extend Orb::Internal::Type::Enum + + PRICE_ID: :price_id + ITEM_ID: :item_id + PRICE_TYPE: :price_type + CURRENCY: :currency + PRICING_UNIT_ID: :pricing_unit_id + + def self?.values: -> ::Array[Orb::Models::Price::MeteredAllowance::CompositePriceFilter::field] + end + + type operator = :includes | :excludes + + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES: :includes + EXCLUDES: :excludes + + def self?.values: -> ::Array[Orb::Models::Price::MeteredAllowance::CompositePriceFilter::operator] + end + end + + type metered_allowance_config = + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String + + attr_accessor consumption_grouping_value: String + + attr_accessor grouping_key: String + + attr_accessor unit_amount: String + + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + + def initialize: ( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String + ) -> void + + def to_hash: -> { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + end + + type price_type = :usage_price | :fixed_price | :composite_price + + module PriceType + extend Orb::Internal::Type::Enum + + USAGE_PRICE: :usage_price + FIXED_PRICE: :fixed_price + COMPOSITE_PRICE: :composite_price + + def self?.values: -> ::Array[Orb::Models::Price::MeteredAllowance::price_type] + end + + type license_type = { id: String, grouping_key: String, name: String } + + class LicenseType < Orb::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor grouping_key: String + + attr_accessor name: String + + def initialize: ( + id: String, + grouping_key: String, + name: String + ) -> void + + def to_hash: -> { id: String, grouping_key: String, name: String } + end + end + type minimum_composite = { id: String, diff --git a/sig/orb/models/price_create_params.rbs b/sig/orb/models/price_create_params.rbs index a3562fbc..28bd11e5 100644 --- a/sig/orb/models/price_create_params.rbs +++ b/sig/orb/models/price_create_params.rbs @@ -49,6 +49,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 @@ -526,6 +528,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..356274c7 100644 --- a/sig/orb/models/price_evaluate_multiple_params.rbs +++ b/sig/orb/models/price_evaluate_multiple_params.rbs @@ -118,6 +118,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 @@ -613,6 +615,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..ac7842b2 100644 --- a/sig/orb/models/price_evaluate_preview_events_params.rbs +++ b/sig/orb/models/price_evaluate_preview_events_params.rbs @@ -164,6 +164,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 @@ -659,6 +661,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..04cbc195 100644 --- a/sig/orb/models/subscription_create_params.rbs +++ b/sig/orb/models/subscription_create_params.rbs @@ -324,6 +324,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 @@ -997,6 +999,364 @@ module Orb end end + type daily_credit_allowance = + { + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::cadence + + attr_accessor daily_credit_allowance_config: Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + + attr_accessor item_id: String + + attr_accessor model_type: :daily_credit_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :daily_credit_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::cadence] + end + + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String + + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + + def initialize: ( + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + ) -> void + + def to_hash: -> { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end + end + end + + type metered_allowance = + { + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::cadence + + attr_accessor item_id: String + + attr_accessor metered_allowance_config: Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :metered_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::cadence] + end + + type metered_allowance_config = + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String + + attr_accessor consumption_grouping_value: String + + attr_accessor grouping_key: String + + attr_accessor unit_amount: String + + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + + def initialize: ( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String + ) -> void + + def to_hash: -> { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + end + end + type percent = { cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent::cadence, @@ -1456,6 +1816,8 @@ module Orb | 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 @@ -1617,12 +1979,303 @@ module Orb ?tier_lower_bound: String? ) -> void - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end + 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::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::cadence] + end + end + + type tiered_with_proration = + { + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::cadence, + item_id: String, + 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::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::SubscriptionCreateParams::ReplacePrice::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::SubscriptionCreateParams::ReplacePrice::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::SubscriptionCreateParams::ReplacePrice::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::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::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::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::cadence, + item_id: String, + 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::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::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::cadence] + end + + type tiered_with_proration_config = + { + tiers: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + } + + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + attr_accessor tiers: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + + def initialize: ( + tiers: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + ) -> void + + def to_hash: -> { + tiers: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::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::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 GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence + + attr_accessor grouped_with_min_max_thresholds_config: Orb::SubscriptionCreateParams::ReplacePrice::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::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: -> { + 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 +2295,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 +2354,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 +2373,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 +2394,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 +2412,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 +2455,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 +2514,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 +2533,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 +2554,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 +2572,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 +2615,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 +2698,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 +2717,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 +2738,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 +2756,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 +2799,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..faba710d 100644 --- a/sig/orb/models/subscription_price_intervals_params.rbs +++ b/sig/orb/models/subscription_price_intervals_params.rbs @@ -267,6 +267,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 @@ -762,6 +764,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..70b16e6d 100644 --- a/sig/orb/models/subscription_schedule_plan_change_params.rbs +++ b/sig/orb/models/subscription_schedule_plan_change_params.rbs @@ -305,6 +305,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 @@ -978,6 +980,364 @@ module Orb end end + type daily_credit_allowance = + { + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::cadence + + attr_accessor daily_credit_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + + attr_accessor item_id: String + + attr_accessor model_type: :daily_credit_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :daily_credit_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::cadence] + end + + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String + + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + + def initialize: ( + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + ) -> void + + def to_hash: -> { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end + end + end + + type metered_allowance = + { + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::cadence + + attr_accessor item_id: String + + attr_accessor metered_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :metered_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::cadence, + item_id: String, + metered_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::cadence] + end + + type metered_allowance_config = + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String + + attr_accessor consumption_grouping_value: String + + attr_accessor grouping_key: String + + attr_accessor unit_amount: String + + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + + def initialize: ( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String + ) -> void + + def to_hash: -> { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + end + end + type percent = { cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::cadence, @@ -1438,6 +1798,8 @@ module Orb | 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 @@ -1599,12 +1961,303 @@ module Orb ?tier_lower_bound: String? ) -> void - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end + 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::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::cadence] + end + end + + type tiered_with_proration = + { + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::cadence, + item_id: String, + 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::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::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::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::cadence, + item_id: String, + 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::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::cadence] + end + + type tiered_with_proration_config = + { + tiers: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + } + + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + attr_accessor tiers: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + + def initialize: ( + tiers: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + ) -> void + + def to_hash: -> { + tiers: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::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 GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence + + attr_accessor grouped_with_min_max_thresholds_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::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: -> { + 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 +2277,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 +2336,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 +2355,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 +2376,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 +2394,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 +2437,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 +2496,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 +2515,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 +2536,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 +2554,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 +2597,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 +2680,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 +2699,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 +2720,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 +2738,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 +2781,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..941f8d6f 100644 --- a/test/orb/resources/prices/external_price_id_test.rb +++ b/test/orb/resources/prices/external_price_id_test.rb @@ -40,6 +40,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 @@ -944,6 +946,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, @@ -1081,6 +1147,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 @@ -1985,6 +2053,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..77aea204 100644 --- a/test/orb/resources/prices_test.rb +++ b/test/orb/resources/prices_test.rb @@ -50,6 +50,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 @@ -954,6 +956,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, @@ -1091,6 +1157,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 @@ -1995,6 +2063,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, @@ -2139,6 +2271,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 @@ -3043,6 +3177,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, @@ -3235,6 +3433,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 @@ -4139,6 +4339,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,