diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ee47b6d..75e8aef1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,14 +61,18 @@ jobs: run: rye build - name: Get GitHub OIDC Token - if: github.repository == 'stainless-sdks/orb-python' + if: |- + github.repository == 'stainless-sdks/orb-python' && + !startsWith(github.ref, 'refs/heads/stl/') id: github-oidc uses: actions/github-script@v8 with: script: core.setOutput('github_token', await core.getIDToken()); - name: Upload tarball - if: github.repository == 'stainless-sdks/orb-python' + if: |- + github.repository == 'stainless-sdks/orb-python' && + !startsWith(github.ref, 'refs/heads/stl/') env: URL: https://pkg.stainless.com/s AUTH: ${{ steps.github-oidc.outputs.github_token }} diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c3d8acd5..331e8361 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.55.0" + ".": "4.56.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index c80eee48..438843fd 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-c92fb451e13f157b3735f188acc8d57aa3adfbaac1683645e1ba4f432dd7a4f8.yml -openapi_spec_hash: dbcd87ecfbd3976eb3b99ec6f9fbc606 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-d6a851f21804170f796637f1911c3382f1c57f5ed6b9b77cd7d0c6f74c06e174.yml +openapi_spec_hash: 82df33badf54d0c7087a61145d379f58 config_hash: 3279841440b02d4e8303c961d6983492 diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c03365a..ce5abffb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,31 @@ # Changelog +## 4.56.0 (2026-03-07) + +Full Changelog: [v4.55.0...v4.56.0](https://github.com/orbcorp/orb-python/compare/v4.55.0...v4.56.0) + +### Features + +* **api:** api update ([deda5e1](https://github.com/orbcorp/orb-python/commit/deda5e1a4c4412e91ad61f038b5c9e17d3072a22)) +* **api:** api update ([425bac4](https://github.com/orbcorp/orb-python/commit/425bac4cc3a9df0085fad215bf5c66d108008d67)) +* **api:** api update ([cd1cd23](https://github.com/orbcorp/orb-python/commit/cd1cd2396264bbc01c71c6ba7e2dc937ee1b5928)) +* **api:** api update ([6b4583e](https://github.com/orbcorp/orb-python/commit/6b4583ede27c6245a828b670301e1bf37cf708a7)) +* **api:** api update ([b676980](https://github.com/orbcorp/orb-python/commit/b6769806d684451bd19d037fd80132e4a0de5930)) +* **api:** api update ([19af3f7](https://github.com/orbcorp/orb-python/commit/19af3f7d6238fb95b66cf2229e5095a0f2bb0df1)) +* **api:** api update ([3686dc6](https://github.com/orbcorp/orb-python/commit/3686dc6ec326e564578f5ab13c7d258d41de8def)) +* **api:** api update ([2fbc2b1](https://github.com/orbcorp/orb-python/commit/2fbc2b14d46648f4ef4ea57ead9cd08b444211b1)) + + +### Chores + +* **ci:** skip uploading artifacts on stainless-internal branches ([a2813c8](https://github.com/orbcorp/orb-python/commit/a2813c8575727ecbd2582b251095ed70a9b75613)) +* **docs:** add missing descriptions ([1bb4db8](https://github.com/orbcorp/orb-python/commit/1bb4db815a18a056aa19366c6622a66935d59577)) +* **internal:** add request options to SSE classes ([9110978](https://github.com/orbcorp/orb-python/commit/9110978adab2229b2eff3f3dfeb3ce6df2f5305e)) +* **internal:** make `test_proxy_environment_variables` more resilient ([e567054](https://github.com/orbcorp/orb-python/commit/e56705443f6920ad4b6eb750a5cd0488d8a119f3)) +* **internal:** make `test_proxy_environment_variables` more resilient to env ([a2da977](https://github.com/orbcorp/orb-python/commit/a2da97718dd34551d38475738e3fd701cc8e2fbe)) +* **test:** do not count install time for mock server timeout ([888e2ca](https://github.com/orbcorp/orb-python/commit/888e2ca02a4fd7cb2294bf0ce1af4b8cee014809)) +* update mock server docs ([0f016de](https://github.com/orbcorp/orb-python/commit/0f016de052ebb429752c7ffdc4ca061c19562469)) + ## 4.55.0 (2026-02-12) Full Changelog: [v4.54.0...v4.55.0](https://github.com/orbcorp/orb-python/compare/v4.54.0...v4.55.0) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ea9f566f..fcc61cec 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -88,8 +88,7 @@ $ pip install ./path-to-wheel-file.whl Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests. ```sh -# you will need npm installed -$ npx prism mock path/to/your/openapi.yml +$ ./scripts/mock ``` ```sh diff --git a/pyproject.toml b/pyproject.toml index 0f0bbaa4..42eb0e1e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "orb-billing" -version = "4.55.0" +version = "4.56.0" description = "The official Python library for the orb API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/scripts/mock b/scripts/mock index 0b28f6ea..bcf3b392 100755 --- a/scripts/mock +++ b/scripts/mock @@ -21,11 +21,22 @@ echo "==> Starting mock server with URL ${URL}" # Run prism 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=@stainless-api/prism-cli@5.15.0 -- prism --version + npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log & - # Wait for server to come online + # Wait for server to come online (max 30s) echo -n "Waiting for server" + attempts=0 while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do + attempts=$((attempts + 1)) + if [ "$attempts" -ge 300 ]; then + echo + echo "Timed out waiting for Prism server to start" + cat .prism.log + exit 1 + fi echo -n "." sleep 0.1 done diff --git a/src/orb/_client.py b/src/orb/_client.py index d1f4078c..7e29e1cb 100644 --- a/src/orb/_client.py +++ b/src/orb/_client.py @@ -156,66 +156,134 @@ def top_level(self) -> TopLevel: @cached_property def beta(self) -> Beta: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ from .resources.beta import Beta return Beta(self) @cached_property def coupons(self) -> Coupons: + """ + A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users. + """ from .resources.coupons import Coupons return Coupons(self) @cached_property def credit_notes(self) -> CreditNotes: + """ + The [Credit Note](/invoicing/credit-notes) resource represents a credit that has been applied to a + particular invoice. + """ from .resources.credit_notes import CreditNotes return CreditNotes(self) @cached_property def customers(self) -> Customers: + """ + A customer is a buyer of your products, and the other party to the billing relationship. + + In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these + match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an + `external_customer_id` with your own identifier. See + [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these + aliases work in Orb. + + In addition to having an identifier in your system, a customer may exist in a payment provider solution like + Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping. + + A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which + defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for + information on what this timezone parameter influences within Orb. + """ from .resources.customers import Customers return Customers(self) @cached_property def events(self) -> Events: + """ + The [Event](/core-concepts#event) resource represents a usage event that has been created for a + customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for + a given billing period. + """ from .resources.events import Events return Events(self) @cached_property def invoice_line_items(self) -> InvoiceLineItems: + """ + An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for + a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and + can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as + the result of an action, such as a cancellation. + """ from .resources.invoice_line_items import InvoiceLineItems return InvoiceLineItems(self) @cached_property def invoices(self) -> Invoices: + """ + An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for + a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and + can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as + the result of an action, such as a cancellation. + """ from .resources.invoices import Invoices return Invoices(self) @cached_property def items(self) -> Items: + """The Item resource represents a sellable product or good. + + Items are associated with all line items, billable metrics, + and prices and are used for defining external sync behavior for invoices and tax calculation purposes. + """ from .resources.items import Items return Items(self) @cached_property def metrics(self) -> Metrics: + """ + The Metric resource represents a calculation of a quantity based on events. + Metrics are defined by the query that transforms raw usage events into meaningful values for your customers. + """ from .resources.metrics import Metrics return Metrics(self) @cached_property def plans(self) -> Plans: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ from .resources.plans import Plans return Plans(self) @cached_property def prices(self) -> Prices: + """ + The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in + the form of an invoice line item. Prices take a quantity and determine an amount to bill. + + Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a + given Price object. The model_type field determines the key for the configuration object that is present. + + For more on the types of prices, see [the core concepts documentation](/core-concepts#plan-and-price) + """ from .resources.prices import Prices return Prices(self) @@ -228,6 +296,12 @@ def subscriptions(self) -> Subscriptions: @cached_property def alerts(self) -> Alerts: + """ + [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending, + usage, or credit balance and trigger webhooks when a threshold is exceeded. + + Alerts created through the API can be scoped to either customers or subscriptions. + """ from .resources.alerts import Alerts return Alerts(self) @@ -252,12 +326,19 @@ def webhooks(self) -> webhooks.Webhooks: @cached_property def credit_blocks(self) -> CreditBlocks: + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ from .resources.credit_blocks import CreditBlocks return CreditBlocks(self) @cached_property def license_types(self) -> LicenseTypes: + """ + 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. + """ from .resources.license_types import LicenseTypes return LicenseTypes(self) @@ -504,66 +585,134 @@ def top_level(self) -> AsyncTopLevel: @cached_property def beta(self) -> AsyncBeta: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ from .resources.beta import AsyncBeta return AsyncBeta(self) @cached_property def coupons(self) -> AsyncCoupons: + """ + A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users. + """ from .resources.coupons import AsyncCoupons return AsyncCoupons(self) @cached_property def credit_notes(self) -> AsyncCreditNotes: + """ + The [Credit Note](/invoicing/credit-notes) resource represents a credit that has been applied to a + particular invoice. + """ from .resources.credit_notes import AsyncCreditNotes return AsyncCreditNotes(self) @cached_property def customers(self) -> AsyncCustomers: + """ + A customer is a buyer of your products, and the other party to the billing relationship. + + In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these + match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an + `external_customer_id` with your own identifier. See + [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these + aliases work in Orb. + + In addition to having an identifier in your system, a customer may exist in a payment provider solution like + Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping. + + A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which + defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for + information on what this timezone parameter influences within Orb. + """ from .resources.customers import AsyncCustomers return AsyncCustomers(self) @cached_property def events(self) -> AsyncEvents: + """ + The [Event](/core-concepts#event) resource represents a usage event that has been created for a + customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for + a given billing period. + """ from .resources.events import AsyncEvents return AsyncEvents(self) @cached_property def invoice_line_items(self) -> AsyncInvoiceLineItems: + """ + An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for + a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and + can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as + the result of an action, such as a cancellation. + """ from .resources.invoice_line_items import AsyncInvoiceLineItems return AsyncInvoiceLineItems(self) @cached_property def invoices(self) -> AsyncInvoices: + """ + An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for + a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and + can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as + the result of an action, such as a cancellation. + """ from .resources.invoices import AsyncInvoices return AsyncInvoices(self) @cached_property def items(self) -> AsyncItems: + """The Item resource represents a sellable product or good. + + Items are associated with all line items, billable metrics, + and prices and are used for defining external sync behavior for invoices and tax calculation purposes. + """ from .resources.items import AsyncItems return AsyncItems(self) @cached_property def metrics(self) -> AsyncMetrics: + """ + The Metric resource represents a calculation of a quantity based on events. + Metrics are defined by the query that transforms raw usage events into meaningful values for your customers. + """ from .resources.metrics import AsyncMetrics return AsyncMetrics(self) @cached_property def plans(self) -> AsyncPlans: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ from .resources.plans import AsyncPlans return AsyncPlans(self) @cached_property def prices(self) -> AsyncPrices: + """ + The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in + the form of an invoice line item. Prices take a quantity and determine an amount to bill. + + Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a + given Price object. The model_type field determines the key for the configuration object that is present. + + For more on the types of prices, see [the core concepts documentation](/core-concepts#plan-and-price) + """ from .resources.prices import AsyncPrices return AsyncPrices(self) @@ -576,6 +725,12 @@ def subscriptions(self) -> AsyncSubscriptions: @cached_property def alerts(self) -> AsyncAlerts: + """ + [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending, + usage, or credit balance and trigger webhooks when a threshold is exceeded. + + Alerts created through the API can be scoped to either customers or subscriptions. + """ from .resources.alerts import AsyncAlerts return AsyncAlerts(self) @@ -600,12 +755,19 @@ def webhooks(self) -> webhooks.AsyncWebhooks: @cached_property def credit_blocks(self) -> AsyncCreditBlocks: + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ from .resources.credit_blocks import AsyncCreditBlocks return AsyncCreditBlocks(self) @cached_property def license_types(self) -> AsyncLicenseTypes: + """ + 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. + """ from .resources.license_types import AsyncLicenseTypes return AsyncLicenseTypes(self) @@ -793,66 +955,134 @@ def top_level(self) -> top_level.TopLevelWithRawResponse: @cached_property def beta(self) -> beta.BetaWithRawResponse: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ from .resources.beta import BetaWithRawResponse return BetaWithRawResponse(self._client.beta) @cached_property def coupons(self) -> coupons.CouponsWithRawResponse: + """ + A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users. + """ from .resources.coupons import CouponsWithRawResponse return CouponsWithRawResponse(self._client.coupons) @cached_property def credit_notes(self) -> credit_notes.CreditNotesWithRawResponse: + """ + The [Credit Note](/invoicing/credit-notes) resource represents a credit that has been applied to a + particular invoice. + """ from .resources.credit_notes import CreditNotesWithRawResponse return CreditNotesWithRawResponse(self._client.credit_notes) @cached_property def customers(self) -> customers.CustomersWithRawResponse: + """ + A customer is a buyer of your products, and the other party to the billing relationship. + + In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these + match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an + `external_customer_id` with your own identifier. See + [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these + aliases work in Orb. + + In addition to having an identifier in your system, a customer may exist in a payment provider solution like + Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping. + + A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which + defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for + information on what this timezone parameter influences within Orb. + """ from .resources.customers import CustomersWithRawResponse return CustomersWithRawResponse(self._client.customers) @cached_property def events(self) -> events.EventsWithRawResponse: + """ + The [Event](/core-concepts#event) resource represents a usage event that has been created for a + customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for + a given billing period. + """ from .resources.events import EventsWithRawResponse return EventsWithRawResponse(self._client.events) @cached_property def invoice_line_items(self) -> invoice_line_items.InvoiceLineItemsWithRawResponse: + """ + An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for + a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and + can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as + the result of an action, such as a cancellation. + """ from .resources.invoice_line_items import InvoiceLineItemsWithRawResponse return InvoiceLineItemsWithRawResponse(self._client.invoice_line_items) @cached_property def invoices(self) -> invoices.InvoicesWithRawResponse: + """ + An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for + a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and + can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as + the result of an action, such as a cancellation. + """ from .resources.invoices import InvoicesWithRawResponse return InvoicesWithRawResponse(self._client.invoices) @cached_property def items(self) -> items.ItemsWithRawResponse: + """The Item resource represents a sellable product or good. + + Items are associated with all line items, billable metrics, + and prices and are used for defining external sync behavior for invoices and tax calculation purposes. + """ from .resources.items import ItemsWithRawResponse return ItemsWithRawResponse(self._client.items) @cached_property def metrics(self) -> metrics.MetricsWithRawResponse: + """ + The Metric resource represents a calculation of a quantity based on events. + Metrics are defined by the query that transforms raw usage events into meaningful values for your customers. + """ from .resources.metrics import MetricsWithRawResponse return MetricsWithRawResponse(self._client.metrics) @cached_property def plans(self) -> plans.PlansWithRawResponse: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ from .resources.plans import PlansWithRawResponse return PlansWithRawResponse(self._client.plans) @cached_property def prices(self) -> prices.PricesWithRawResponse: + """ + The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in + the form of an invoice line item. Prices take a quantity and determine an amount to bill. + + Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a + given Price object. The model_type field determines the key for the configuration object that is present. + + For more on the types of prices, see [the core concepts documentation](/core-concepts#plan-and-price) + """ from .resources.prices import PricesWithRawResponse return PricesWithRawResponse(self._client.prices) @@ -865,6 +1095,12 @@ def subscriptions(self) -> subscriptions.SubscriptionsWithRawResponse: @cached_property def alerts(self) -> alerts.AlertsWithRawResponse: + """ + [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending, + usage, or credit balance and trigger webhooks when a threshold is exceeded. + + Alerts created through the API can be scoped to either customers or subscriptions. + """ from .resources.alerts import AlertsWithRawResponse return AlertsWithRawResponse(self._client.alerts) @@ -883,12 +1119,19 @@ def subscription_changes(self) -> subscription_changes.SubscriptionChangesWithRa @cached_property def credit_blocks(self) -> credit_blocks.CreditBlocksWithRawResponse: + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ from .resources.credit_blocks import CreditBlocksWithRawResponse return CreditBlocksWithRawResponse(self._client.credit_blocks) @cached_property def license_types(self) -> license_types.LicenseTypesWithRawResponse: + """ + 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. + """ from .resources.license_types import LicenseTypesWithRawResponse return LicenseTypesWithRawResponse(self._client.license_types) @@ -914,66 +1157,134 @@ def top_level(self) -> top_level.AsyncTopLevelWithRawResponse: @cached_property def beta(self) -> beta.AsyncBetaWithRawResponse: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ from .resources.beta import AsyncBetaWithRawResponse return AsyncBetaWithRawResponse(self._client.beta) @cached_property def coupons(self) -> coupons.AsyncCouponsWithRawResponse: + """ + A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users. + """ from .resources.coupons import AsyncCouponsWithRawResponse return AsyncCouponsWithRawResponse(self._client.coupons) @cached_property def credit_notes(self) -> credit_notes.AsyncCreditNotesWithRawResponse: + """ + The [Credit Note](/invoicing/credit-notes) resource represents a credit that has been applied to a + particular invoice. + """ from .resources.credit_notes import AsyncCreditNotesWithRawResponse return AsyncCreditNotesWithRawResponse(self._client.credit_notes) @cached_property def customers(self) -> customers.AsyncCustomersWithRawResponse: + """ + A customer is a buyer of your products, and the other party to the billing relationship. + + In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these + match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an + `external_customer_id` with your own identifier. See + [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these + aliases work in Orb. + + In addition to having an identifier in your system, a customer may exist in a payment provider solution like + Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping. + + A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which + defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for + information on what this timezone parameter influences within Orb. + """ from .resources.customers import AsyncCustomersWithRawResponse return AsyncCustomersWithRawResponse(self._client.customers) @cached_property def events(self) -> events.AsyncEventsWithRawResponse: + """ + The [Event](/core-concepts#event) resource represents a usage event that has been created for a + customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for + a given billing period. + """ from .resources.events import AsyncEventsWithRawResponse return AsyncEventsWithRawResponse(self._client.events) @cached_property def invoice_line_items(self) -> invoice_line_items.AsyncInvoiceLineItemsWithRawResponse: + """ + An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for + a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and + can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as + the result of an action, such as a cancellation. + """ from .resources.invoice_line_items import AsyncInvoiceLineItemsWithRawResponse return AsyncInvoiceLineItemsWithRawResponse(self._client.invoice_line_items) @cached_property def invoices(self) -> invoices.AsyncInvoicesWithRawResponse: + """ + An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for + a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and + can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as + the result of an action, such as a cancellation. + """ from .resources.invoices import AsyncInvoicesWithRawResponse return AsyncInvoicesWithRawResponse(self._client.invoices) @cached_property def items(self) -> items.AsyncItemsWithRawResponse: + """The Item resource represents a sellable product or good. + + Items are associated with all line items, billable metrics, + and prices and are used for defining external sync behavior for invoices and tax calculation purposes. + """ from .resources.items import AsyncItemsWithRawResponse return AsyncItemsWithRawResponse(self._client.items) @cached_property def metrics(self) -> metrics.AsyncMetricsWithRawResponse: + """ + The Metric resource represents a calculation of a quantity based on events. + Metrics are defined by the query that transforms raw usage events into meaningful values for your customers. + """ from .resources.metrics import AsyncMetricsWithRawResponse return AsyncMetricsWithRawResponse(self._client.metrics) @cached_property def plans(self) -> plans.AsyncPlansWithRawResponse: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ from .resources.plans import AsyncPlansWithRawResponse return AsyncPlansWithRawResponse(self._client.plans) @cached_property def prices(self) -> prices.AsyncPricesWithRawResponse: + """ + The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in + the form of an invoice line item. Prices take a quantity and determine an amount to bill. + + Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a + given Price object. The model_type field determines the key for the configuration object that is present. + + For more on the types of prices, see [the core concepts documentation](/core-concepts#plan-and-price) + """ from .resources.prices import AsyncPricesWithRawResponse return AsyncPricesWithRawResponse(self._client.prices) @@ -986,6 +1297,12 @@ def subscriptions(self) -> subscriptions.AsyncSubscriptionsWithRawResponse: @cached_property def alerts(self) -> alerts.AsyncAlertsWithRawResponse: + """ + [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending, + usage, or credit balance and trigger webhooks when a threshold is exceeded. + + Alerts created through the API can be scoped to either customers or subscriptions. + """ from .resources.alerts import AsyncAlertsWithRawResponse return AsyncAlertsWithRawResponse(self._client.alerts) @@ -1004,12 +1321,19 @@ def subscription_changes(self) -> subscription_changes.AsyncSubscriptionChangesW @cached_property def credit_blocks(self) -> credit_blocks.AsyncCreditBlocksWithRawResponse: + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ from .resources.credit_blocks import AsyncCreditBlocksWithRawResponse return AsyncCreditBlocksWithRawResponse(self._client.credit_blocks) @cached_property def license_types(self) -> license_types.AsyncLicenseTypesWithRawResponse: + """ + 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. + """ from .resources.license_types import AsyncLicenseTypesWithRawResponse return AsyncLicenseTypesWithRawResponse(self._client.license_types) @@ -1035,66 +1359,134 @@ def top_level(self) -> top_level.TopLevelWithStreamingResponse: @cached_property def beta(self) -> beta.BetaWithStreamingResponse: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ from .resources.beta import BetaWithStreamingResponse return BetaWithStreamingResponse(self._client.beta) @cached_property def coupons(self) -> coupons.CouponsWithStreamingResponse: + """ + A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users. + """ from .resources.coupons import CouponsWithStreamingResponse return CouponsWithStreamingResponse(self._client.coupons) @cached_property def credit_notes(self) -> credit_notes.CreditNotesWithStreamingResponse: + """ + The [Credit Note](/invoicing/credit-notes) resource represents a credit that has been applied to a + particular invoice. + """ from .resources.credit_notes import CreditNotesWithStreamingResponse return CreditNotesWithStreamingResponse(self._client.credit_notes) @cached_property def customers(self) -> customers.CustomersWithStreamingResponse: + """ + A customer is a buyer of your products, and the other party to the billing relationship. + + In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these + match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an + `external_customer_id` with your own identifier. See + [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these + aliases work in Orb. + + In addition to having an identifier in your system, a customer may exist in a payment provider solution like + Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping. + + A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which + defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for + information on what this timezone parameter influences within Orb. + """ from .resources.customers import CustomersWithStreamingResponse return CustomersWithStreamingResponse(self._client.customers) @cached_property def events(self) -> events.EventsWithStreamingResponse: + """ + The [Event](/core-concepts#event) resource represents a usage event that has been created for a + customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for + a given billing period. + """ from .resources.events import EventsWithStreamingResponse return EventsWithStreamingResponse(self._client.events) @cached_property def invoice_line_items(self) -> invoice_line_items.InvoiceLineItemsWithStreamingResponse: + """ + An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for + a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and + can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as + the result of an action, such as a cancellation. + """ from .resources.invoice_line_items import InvoiceLineItemsWithStreamingResponse return InvoiceLineItemsWithStreamingResponse(self._client.invoice_line_items) @cached_property def invoices(self) -> invoices.InvoicesWithStreamingResponse: + """ + An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for + a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and + can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as + the result of an action, such as a cancellation. + """ from .resources.invoices import InvoicesWithStreamingResponse return InvoicesWithStreamingResponse(self._client.invoices) @cached_property def items(self) -> items.ItemsWithStreamingResponse: + """The Item resource represents a sellable product or good. + + Items are associated with all line items, billable metrics, + and prices and are used for defining external sync behavior for invoices and tax calculation purposes. + """ from .resources.items import ItemsWithStreamingResponse return ItemsWithStreamingResponse(self._client.items) @cached_property def metrics(self) -> metrics.MetricsWithStreamingResponse: + """ + The Metric resource represents a calculation of a quantity based on events. + Metrics are defined by the query that transforms raw usage events into meaningful values for your customers. + """ from .resources.metrics import MetricsWithStreamingResponse return MetricsWithStreamingResponse(self._client.metrics) @cached_property def plans(self) -> plans.PlansWithStreamingResponse: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ from .resources.plans import PlansWithStreamingResponse return PlansWithStreamingResponse(self._client.plans) @cached_property def prices(self) -> prices.PricesWithStreamingResponse: + """ + The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in + the form of an invoice line item. Prices take a quantity and determine an amount to bill. + + Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a + given Price object. The model_type field determines the key for the configuration object that is present. + + For more on the types of prices, see [the core concepts documentation](/core-concepts#plan-and-price) + """ from .resources.prices import PricesWithStreamingResponse return PricesWithStreamingResponse(self._client.prices) @@ -1107,6 +1499,12 @@ def subscriptions(self) -> subscriptions.SubscriptionsWithStreamingResponse: @cached_property def alerts(self) -> alerts.AlertsWithStreamingResponse: + """ + [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending, + usage, or credit balance and trigger webhooks when a threshold is exceeded. + + Alerts created through the API can be scoped to either customers or subscriptions. + """ from .resources.alerts import AlertsWithStreamingResponse return AlertsWithStreamingResponse(self._client.alerts) @@ -1125,12 +1523,19 @@ def subscription_changes(self) -> subscription_changes.SubscriptionChangesWithSt @cached_property def credit_blocks(self) -> credit_blocks.CreditBlocksWithStreamingResponse: + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ from .resources.credit_blocks import CreditBlocksWithStreamingResponse return CreditBlocksWithStreamingResponse(self._client.credit_blocks) @cached_property def license_types(self) -> license_types.LicenseTypesWithStreamingResponse: + """ + 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. + """ from .resources.license_types import LicenseTypesWithStreamingResponse return LicenseTypesWithStreamingResponse(self._client.license_types) @@ -1156,66 +1561,134 @@ def top_level(self) -> top_level.AsyncTopLevelWithStreamingResponse: @cached_property def beta(self) -> beta.AsyncBetaWithStreamingResponse: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ from .resources.beta import AsyncBetaWithStreamingResponse return AsyncBetaWithStreamingResponse(self._client.beta) @cached_property def coupons(self) -> coupons.AsyncCouponsWithStreamingResponse: + """ + A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users. + """ from .resources.coupons import AsyncCouponsWithStreamingResponse return AsyncCouponsWithStreamingResponse(self._client.coupons) @cached_property def credit_notes(self) -> credit_notes.AsyncCreditNotesWithStreamingResponse: + """ + The [Credit Note](/invoicing/credit-notes) resource represents a credit that has been applied to a + particular invoice. + """ from .resources.credit_notes import AsyncCreditNotesWithStreamingResponse return AsyncCreditNotesWithStreamingResponse(self._client.credit_notes) @cached_property def customers(self) -> customers.AsyncCustomersWithStreamingResponse: + """ + A customer is a buyer of your products, and the other party to the billing relationship. + + In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these + match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an + `external_customer_id` with your own identifier. See + [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these + aliases work in Orb. + + In addition to having an identifier in your system, a customer may exist in a payment provider solution like + Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping. + + A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which + defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for + information on what this timezone parameter influences within Orb. + """ from .resources.customers import AsyncCustomersWithStreamingResponse return AsyncCustomersWithStreamingResponse(self._client.customers) @cached_property def events(self) -> events.AsyncEventsWithStreamingResponse: + """ + The [Event](/core-concepts#event) resource represents a usage event that has been created for a + customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for + a given billing period. + """ from .resources.events import AsyncEventsWithStreamingResponse return AsyncEventsWithStreamingResponse(self._client.events) @cached_property def invoice_line_items(self) -> invoice_line_items.AsyncInvoiceLineItemsWithStreamingResponse: + """ + An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for + a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and + can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as + the result of an action, such as a cancellation. + """ from .resources.invoice_line_items import AsyncInvoiceLineItemsWithStreamingResponse return AsyncInvoiceLineItemsWithStreamingResponse(self._client.invoice_line_items) @cached_property def invoices(self) -> invoices.AsyncInvoicesWithStreamingResponse: + """ + An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for + a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and + can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as + the result of an action, such as a cancellation. + """ from .resources.invoices import AsyncInvoicesWithStreamingResponse return AsyncInvoicesWithStreamingResponse(self._client.invoices) @cached_property def items(self) -> items.AsyncItemsWithStreamingResponse: + """The Item resource represents a sellable product or good. + + Items are associated with all line items, billable metrics, + and prices and are used for defining external sync behavior for invoices and tax calculation purposes. + """ from .resources.items import AsyncItemsWithStreamingResponse return AsyncItemsWithStreamingResponse(self._client.items) @cached_property def metrics(self) -> metrics.AsyncMetricsWithStreamingResponse: + """ + The Metric resource represents a calculation of a quantity based on events. + Metrics are defined by the query that transforms raw usage events into meaningful values for your customers. + """ from .resources.metrics import AsyncMetricsWithStreamingResponse return AsyncMetricsWithStreamingResponse(self._client.metrics) @cached_property def plans(self) -> plans.AsyncPlansWithStreamingResponse: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ from .resources.plans import AsyncPlansWithStreamingResponse return AsyncPlansWithStreamingResponse(self._client.plans) @cached_property def prices(self) -> prices.AsyncPricesWithStreamingResponse: + """ + The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in + the form of an invoice line item. Prices take a quantity and determine an amount to bill. + + Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a + given Price object. The model_type field determines the key for the configuration object that is present. + + For more on the types of prices, see [the core concepts documentation](/core-concepts#plan-and-price) + """ from .resources.prices import AsyncPricesWithStreamingResponse return AsyncPricesWithStreamingResponse(self._client.prices) @@ -1228,6 +1701,12 @@ def subscriptions(self) -> subscriptions.AsyncSubscriptionsWithStreamingResponse @cached_property def alerts(self) -> alerts.AsyncAlertsWithStreamingResponse: + """ + [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending, + usage, or credit balance and trigger webhooks when a threshold is exceeded. + + Alerts created through the API can be scoped to either customers or subscriptions. + """ from .resources.alerts import AsyncAlertsWithStreamingResponse return AsyncAlertsWithStreamingResponse(self._client.alerts) @@ -1246,12 +1725,19 @@ def subscription_changes(self) -> subscription_changes.AsyncSubscriptionChangesW @cached_property def credit_blocks(self) -> credit_blocks.AsyncCreditBlocksWithStreamingResponse: + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ from .resources.credit_blocks import AsyncCreditBlocksWithStreamingResponse return AsyncCreditBlocksWithStreamingResponse(self._client.credit_blocks) @cached_property def license_types(self) -> license_types.AsyncLicenseTypesWithStreamingResponse: + """ + 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. + """ from .resources.license_types import AsyncLicenseTypesWithStreamingResponse return AsyncLicenseTypesWithStreamingResponse(self._client.license_types) diff --git a/src/orb/_legacy_response.py b/src/orb/_legacy_response.py index 96cbe8bd..a78dda22 100644 --- a/src/orb/_legacy_response.py +++ b/src/orb/_legacy_response.py @@ -214,6 +214,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: ), response=self.http_response, client=cast(Any, self._client), + options=self._options, ), ) @@ -224,6 +225,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: cast_to=extract_stream_chunk_type(self._stream_cls), response=self.http_response, client=cast(Any, self._client), + options=self._options, ), ) @@ -237,6 +239,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: cast_to=cast_to, response=self.http_response, client=cast(Any, self._client), + options=self._options, ), ) diff --git a/src/orb/_response.py b/src/orb/_response.py index 2e125354..d8a81963 100644 --- a/src/orb/_response.py +++ b/src/orb/_response.py @@ -152,6 +152,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: ), response=self.http_response, client=cast(Any, self._client), + options=self._options, ), ) @@ -162,6 +163,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: cast_to=extract_stream_chunk_type(self._stream_cls), response=self.http_response, client=cast(Any, self._client), + options=self._options, ), ) @@ -175,6 +177,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: cast_to=cast_to, response=self.http_response, client=cast(Any, self._client), + options=self._options, ), ) diff --git a/src/orb/_streaming.py b/src/orb/_streaming.py index 943d03ab..321fe6aa 100644 --- a/src/orb/_streaming.py +++ b/src/orb/_streaming.py @@ -4,7 +4,7 @@ import json import inspect from types import TracebackType -from typing import TYPE_CHECKING, Any, Generic, TypeVar, Iterator, AsyncIterator, cast +from typing import TYPE_CHECKING, Any, Generic, TypeVar, Iterator, Optional, AsyncIterator, cast from typing_extensions import Self, Protocol, TypeGuard, override, get_origin, runtime_checkable import httpx @@ -13,6 +13,7 @@ if TYPE_CHECKING: from ._client import Orb, AsyncOrb + from ._models import FinalRequestOptions _T = TypeVar("_T") @@ -22,7 +23,7 @@ class Stream(Generic[_T]): """Provides the core interface to iterate over a synchronous stream response.""" response: httpx.Response - + _options: Optional[FinalRequestOptions] = None _decoder: SSEBytesDecoder def __init__( @@ -31,10 +32,12 @@ def __init__( cast_to: type[_T], response: httpx.Response, client: Orb, + options: Optional[FinalRequestOptions] = None, ) -> None: self.response = response self._cast_to = cast_to self._client = client + self._options = options self._decoder = client._make_sse_decoder() self._iterator = self.__stream__() @@ -85,7 +88,7 @@ class AsyncStream(Generic[_T]): """Provides the core interface to iterate over an asynchronous stream response.""" response: httpx.Response - + _options: Optional[FinalRequestOptions] = None _decoder: SSEDecoder | SSEBytesDecoder def __init__( @@ -94,10 +97,12 @@ def __init__( cast_to: type[_T], response: httpx.Response, client: AsyncOrb, + options: Optional[FinalRequestOptions] = None, ) -> None: self.response = response self._cast_to = cast_to self._client = client + self._options = options self._decoder = client._make_sse_decoder() self._iterator = self.__stream__() diff --git a/src/orb/_version.py b/src/orb/_version.py index 11898a79..c5a82e2e 100644 --- a/src/orb/_version.py +++ b/src/orb/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "orb" -__version__ = "4.55.0" # x-release-please-version +__version__ = "4.56.0" # x-release-please-version diff --git a/src/orb/resources/alerts.py b/src/orb/resources/alerts.py index 84f485f9..e077fdd7 100644 --- a/src/orb/resources/alerts.py +++ b/src/orb/resources/alerts.py @@ -18,7 +18,7 @@ alert_create_for_subscription_params, alert_create_for_external_customer_params, ) -from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given +from .._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -32,6 +32,13 @@ class Alerts(SyncAPIResource): + """ + [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending, + usage, or credit balance and trigger webhooks when a threshold is exceeded. + + Alerts created through the API can be scoped to either customers or subscriptions. + """ + @cached_property def with_raw_response(self) -> AlertsWithRawResponse: """ @@ -346,7 +353,9 @@ def create_for_subscription( *, thresholds: Iterable[ThresholdParam], type: Literal["usage_exceeded", "cost_exceeded"], + grouping_keys: Optional[SequenceNotStr[str]] | Omit = omit, metric_id: Optional[str] | Omit = omit, + pricing_unit_id: Optional[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -373,8 +382,14 @@ def create_for_subscription( type: The type of alert to create. This must be a valid alert type. + grouping_keys: The property keys to group cost alerts by. Only applicable for cost_exceeded + alerts. + metric_id: The metric to track usage for. + pricing_unit_id: The pricing unit to use for grouped cost alerts. Required when grouping_keys is + set. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -393,7 +408,9 @@ def create_for_subscription( { "thresholds": thresholds, "type": type, + "grouping_keys": grouping_keys, "metric_id": metric_id, + "pricing_unit_id": pricing_unit_id, }, alert_create_for_subscription_params.AlertCreateForSubscriptionParams, ), @@ -507,6 +524,13 @@ def enable( class AsyncAlerts(AsyncAPIResource): + """ + [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending, + usage, or credit balance and trigger webhooks when a threshold is exceeded. + + Alerts created through the API can be scoped to either customers or subscriptions. + """ + @cached_property def with_raw_response(self) -> AsyncAlertsWithRawResponse: """ @@ -821,7 +845,9 @@ async def create_for_subscription( *, thresholds: Iterable[ThresholdParam], type: Literal["usage_exceeded", "cost_exceeded"], + grouping_keys: Optional[SequenceNotStr[str]] | Omit = omit, metric_id: Optional[str] | Omit = omit, + pricing_unit_id: Optional[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -848,8 +874,14 @@ async def create_for_subscription( type: The type of alert to create. This must be a valid alert type. + grouping_keys: The property keys to group cost alerts by. Only applicable for cost_exceeded + alerts. + metric_id: The metric to track usage for. + pricing_unit_id: The pricing unit to use for grouped cost alerts. Required when grouping_keys is + set. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -868,7 +900,9 @@ async def create_for_subscription( { "thresholds": thresholds, "type": type, + "grouping_keys": grouping_keys, "metric_id": metric_id, + "pricing_unit_id": pricing_unit_id, }, alert_create_for_subscription_params.AlertCreateForSubscriptionParams, ), diff --git a/src/orb/resources/beta/beta.py b/src/orb/resources/beta/beta.py index eb85e15f..e235b311 100644 --- a/src/orb/resources/beta/beta.py +++ b/src/orb/resources/beta/beta.py @@ -29,8 +29,19 @@ class Beta(SyncAPIResource): + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ + @cached_property def external_plan_id(self) -> ExternalPlanID: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ return ExternalPlanID(self._client) @cached_property @@ -215,8 +226,19 @@ def set_default_plan_version( class AsyncBeta(AsyncAPIResource): + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ + @cached_property def external_plan_id(self) -> AsyncExternalPlanID: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ return AsyncExternalPlanID(self._client) @cached_property @@ -416,6 +438,11 @@ def __init__(self, beta: Beta) -> None: @cached_property def external_plan_id(self) -> ExternalPlanIDWithRawResponse: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ return ExternalPlanIDWithRawResponse(self._beta.external_plan_id) @@ -435,6 +462,11 @@ def __init__(self, beta: AsyncBeta) -> None: @cached_property def external_plan_id(self) -> AsyncExternalPlanIDWithRawResponse: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ return AsyncExternalPlanIDWithRawResponse(self._beta.external_plan_id) @@ -454,6 +486,11 @@ def __init__(self, beta: Beta) -> None: @cached_property def external_plan_id(self) -> ExternalPlanIDWithStreamingResponse: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ return ExternalPlanIDWithStreamingResponse(self._beta.external_plan_id) @@ -473,4 +510,9 @@ def __init__(self, beta: AsyncBeta) -> None: @cached_property def external_plan_id(self) -> AsyncExternalPlanIDWithStreamingResponse: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ return AsyncExternalPlanIDWithStreamingResponse(self._beta.external_plan_id) diff --git a/src/orb/resources/beta/external_plan_id.py b/src/orb/resources/beta/external_plan_id.py index d76ecb35..0053fb14 100644 --- a/src/orb/resources/beta/external_plan_id.py +++ b/src/orb/resources/beta/external_plan_id.py @@ -21,6 +21,12 @@ class ExternalPlanID(SyncAPIResource): + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ + @cached_property def with_raw_response(self) -> ExternalPlanIDWithRawResponse: """ @@ -206,6 +212,12 @@ def set_default_plan_version( class AsyncExternalPlanID(AsyncAPIResource): + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ + @cached_property def with_raw_response(self) -> AsyncExternalPlanIDWithRawResponse: """ diff --git a/src/orb/resources/coupons/coupons.py b/src/orb/resources/coupons/coupons.py index b89662c6..aae11168 100644 --- a/src/orb/resources/coupons/coupons.py +++ b/src/orb/resources/coupons/coupons.py @@ -29,8 +29,15 @@ class Coupons(SyncAPIResource): + """ + A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users. + """ + @cached_property def subscriptions(self) -> Subscriptions: + """ + A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users. + """ return Subscriptions(self._client) @cached_property @@ -254,8 +261,15 @@ def fetch( class AsyncCoupons(AsyncAPIResource): + """ + A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users. + """ + @cached_property def subscriptions(self) -> AsyncSubscriptions: + """ + A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users. + """ return AsyncSubscriptions(self._client) @cached_property @@ -497,6 +511,9 @@ def __init__(self, coupons: Coupons) -> None: @cached_property def subscriptions(self) -> SubscriptionsWithRawResponse: + """ + A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users. + """ return SubscriptionsWithRawResponse(self._coupons.subscriptions) @@ -519,6 +536,9 @@ def __init__(self, coupons: AsyncCoupons) -> None: @cached_property def subscriptions(self) -> AsyncSubscriptionsWithRawResponse: + """ + A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users. + """ return AsyncSubscriptionsWithRawResponse(self._coupons.subscriptions) @@ -541,6 +561,9 @@ def __init__(self, coupons: Coupons) -> None: @cached_property def subscriptions(self) -> SubscriptionsWithStreamingResponse: + """ + A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users. + """ return SubscriptionsWithStreamingResponse(self._coupons.subscriptions) @@ -563,4 +586,7 @@ def __init__(self, coupons: AsyncCoupons) -> None: @cached_property def subscriptions(self) -> AsyncSubscriptionsWithStreamingResponse: + """ + A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users. + """ return AsyncSubscriptionsWithStreamingResponse(self._coupons.subscriptions) diff --git a/src/orb/resources/coupons/subscriptions.py b/src/orb/resources/coupons/subscriptions.py index f3770de4..049d65c6 100644 --- a/src/orb/resources/coupons/subscriptions.py +++ b/src/orb/resources/coupons/subscriptions.py @@ -21,6 +21,10 @@ class Subscriptions(SyncAPIResource): + """ + A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users. + """ + @cached_property def with_raw_response(self) -> SubscriptionsWithRawResponse: """ @@ -96,6 +100,10 @@ def list( class AsyncSubscriptions(AsyncAPIResource): + """ + A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users. + """ + @cached_property def with_raw_response(self) -> AsyncSubscriptionsWithRawResponse: """ diff --git a/src/orb/resources/credit_blocks.py b/src/orb/resources/credit_blocks.py index dbba3823..a9260bbc 100644 --- a/src/orb/resources/credit_blocks.py +++ b/src/orb/resources/credit_blocks.py @@ -17,6 +17,10 @@ class CreditBlocks(SyncAPIResource): + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ + @cached_property def with_raw_response(self) -> CreditBlocksWithRawResponse: """ @@ -172,6 +176,10 @@ def list_invoices( class AsyncCreditBlocks(AsyncAPIResource): + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ + @cached_property def with_raw_response(self) -> AsyncCreditBlocksWithRawResponse: """ diff --git a/src/orb/resources/credit_notes.py b/src/orb/resources/credit_notes.py index 0a862b32..ef582988 100644 --- a/src/orb/resources/credit_notes.py +++ b/src/orb/resources/credit_notes.py @@ -23,6 +23,11 @@ class CreditNotes(SyncAPIResource): + """ + The [Credit Note](/invoicing/credit-notes) resource represents a credit that has been applied to a + particular invoice. + """ + @cached_property def with_raw_response(self) -> CreditNotesWithRawResponse: """ @@ -229,6 +234,11 @@ def fetch( class AsyncCreditNotes(AsyncAPIResource): + """ + The [Credit Note](/invoicing/credit-notes) resource represents a credit that has been applied to a + particular invoice. + """ + @cached_property def with_raw_response(self) -> AsyncCreditNotesWithRawResponse: """ diff --git a/src/orb/resources/customers/balance_transactions.py b/src/orb/resources/customers/balance_transactions.py index cf122136..e8e33a54 100644 --- a/src/orb/resources/customers/balance_transactions.py +++ b/src/orb/resources/customers/balance_transactions.py @@ -24,6 +24,23 @@ class BalanceTransactions(SyncAPIResource): + """ + A customer is a buyer of your products, and the other party to the billing relationship. + + In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these + match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an + `external_customer_id` with your own identifier. See + [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these + aliases work in Orb. + + In addition to having an identifier in your system, a customer may exist in a payment provider solution like + Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping. + + A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which + defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for + information on what this timezone parameter influences within Orb. + """ + @cached_property def with_raw_response(self) -> BalanceTransactionsWithRawResponse: """ @@ -178,6 +195,23 @@ def list( class AsyncBalanceTransactions(AsyncAPIResource): + """ + A customer is a buyer of your products, and the other party to the billing relationship. + + In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these + match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an + `external_customer_id` with your own identifier. See + [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these + aliases work in Orb. + + In addition to having an identifier in your system, a customer may exist in a payment provider solution like + Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping. + + A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which + defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for + information on what this timezone parameter influences within Orb. + """ + @cached_property def with_raw_response(self) -> AsyncBalanceTransactionsWithRawResponse: """ diff --git a/src/orb/resources/customers/costs.py b/src/orb/resources/customers/costs.py index 6b5f040e..44bb5fc2 100644 --- a/src/orb/resources/customers/costs.py +++ b/src/orb/resources/customers/costs.py @@ -23,6 +23,23 @@ class Costs(SyncAPIResource): + """ + A customer is a buyer of your products, and the other party to the billing relationship. + + In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these + match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an + `external_customer_id` with your own identifier. See + [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these + aliases work in Orb. + + In addition to having an identifier in your system, a customer may exist in a payment provider solution like + Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping. + + A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which + defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for + information on what this timezone parameter influences within Orb. + """ + @cached_property def with_raw_response(self) -> CostsWithRawResponse: """ @@ -398,6 +415,23 @@ def list_by_external_id( class AsyncCosts(AsyncAPIResource): + """ + A customer is a buyer of your products, and the other party to the billing relationship. + + In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these + match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an + `external_customer_id` with your own identifier. See + [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these + aliases work in Orb. + + In addition to having an identifier in your system, a customer may exist in a payment provider solution like + Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping. + + A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which + defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for + information on what this timezone parameter influences within Orb. + """ + @cached_property def with_raw_response(self) -> AsyncCostsWithRawResponse: """ diff --git a/src/orb/resources/customers/credits/credits.py b/src/orb/resources/customers/credits/credits.py index bd4f7c3a..8ccf6de2 100644 --- a/src/orb/resources/customers/credits/credits.py +++ b/src/orb/resources/customers/credits/credits.py @@ -39,12 +39,22 @@ class Credits(SyncAPIResource): + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ + @cached_property def ledger(self) -> Ledger: + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ return Ledger(self._client) @cached_property def top_ups(self) -> TopUps: + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ return TopUps(self._client) @cached_property @@ -228,12 +238,22 @@ def list_by_external_id( class AsyncCredits(AsyncAPIResource): + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ + @cached_property def ledger(self) -> AsyncLedger: + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ return AsyncLedger(self._client) @cached_property def top_ups(self) -> AsyncTopUps: + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ return AsyncTopUps(self._client) @cached_property @@ -429,10 +449,16 @@ def __init__(self, credits: Credits) -> None: @cached_property def ledger(self) -> LedgerWithRawResponse: + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ return LedgerWithRawResponse(self._credits.ledger) @cached_property def top_ups(self) -> TopUpsWithRawResponse: + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ return TopUpsWithRawResponse(self._credits.top_ups) @@ -449,10 +475,16 @@ def __init__(self, credits: AsyncCredits) -> None: @cached_property def ledger(self) -> AsyncLedgerWithRawResponse: + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ return AsyncLedgerWithRawResponse(self._credits.ledger) @cached_property def top_ups(self) -> AsyncTopUpsWithRawResponse: + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ return AsyncTopUpsWithRawResponse(self._credits.top_ups) @@ -469,10 +501,16 @@ def __init__(self, credits: Credits) -> None: @cached_property def ledger(self) -> LedgerWithStreamingResponse: + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ return LedgerWithStreamingResponse(self._credits.ledger) @cached_property def top_ups(self) -> TopUpsWithStreamingResponse: + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ return TopUpsWithStreamingResponse(self._credits.top_ups) @@ -489,8 +527,14 @@ def __init__(self, credits: AsyncCredits) -> None: @cached_property def ledger(self) -> AsyncLedgerWithStreamingResponse: + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ return AsyncLedgerWithStreamingResponse(self._credits.ledger) @cached_property def top_ups(self) -> AsyncTopUpsWithStreamingResponse: + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ return AsyncTopUpsWithStreamingResponse(self._credits.top_ups) diff --git a/src/orb/resources/customers/credits/ledger.py b/src/orb/resources/customers/credits/ledger.py index 4ae2e04d..1e952309 100644 --- a/src/orb/resources/customers/credits/ledger.py +++ b/src/orb/resources/customers/credits/ledger.py @@ -33,6 +33,10 @@ class Ledger(SyncAPIResource): + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ + @cached_property def with_raw_response(self) -> LedgerWithRawResponse: """ @@ -286,8 +290,14 @@ def create_entry( also generate a one-off invoice for the customer for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`, since the total charges on the invoice are calculated by multiplying the cost basis with the number of - credit units added. Additionally, Orb also enforces invoice generation when a - non-zero `per_unit_cost_basis` value is provided. + credit units added. If you invoice or handle payment of credits outside of Orb + (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to + `true` to prevent duplicate invoicing effects. + + - if `per_unit_cost_basis` is greater than zero, an invoice will be generated + and `invoice_settings` must be included + - if `invoice_settings` is passed, one of either `custom_due_date` or + `net_terms` is required to determine the due date ## Deducting Credits @@ -460,8 +470,14 @@ def create_entry( also generate a one-off invoice for the customer for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`, since the total charges on the invoice are calculated by multiplying the cost basis with the number of - credit units added. Additionally, Orb also enforces invoice generation when a - non-zero `per_unit_cost_basis` value is provided. + credit units added. If you invoice or handle payment of credits outside of Orb + (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to + `true` to prevent duplicate invoicing effects. + + - if `per_unit_cost_basis` is greater than zero, an invoice will be generated + and `invoice_settings` must be included + - if `invoice_settings` is passed, one of either `custom_due_date` or + `net_terms` is required to determine the due date ## Deducting Credits @@ -621,8 +637,14 @@ def create_entry( also generate a one-off invoice for the customer for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`, since the total charges on the invoice are calculated by multiplying the cost basis with the number of - credit units added. Additionally, Orb also enforces invoice generation when a - non-zero `per_unit_cost_basis` value is provided. + credit units added. If you invoice or handle payment of credits outside of Orb + (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to + `true` to prevent duplicate invoicing effects. + + - if `per_unit_cost_basis` is greater than zero, an invoice will be generated + and `invoice_settings` must be included + - if `invoice_settings` is passed, one of either `custom_due_date` or + `net_terms` is required to determine the due date ## Deducting Credits @@ -790,8 +812,14 @@ def create_entry( also generate a one-off invoice for the customer for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`, since the total charges on the invoice are calculated by multiplying the cost basis with the number of - credit units added. Additionally, Orb also enforces invoice generation when a - non-zero `per_unit_cost_basis` value is provided. + credit units added. If you invoice or handle payment of credits outside of Orb + (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to + `true` to prevent duplicate invoicing effects. + + - if `per_unit_cost_basis` is greater than zero, an invoice will be generated + and `invoice_settings` must be included + - if `invoice_settings` is passed, one of either `custom_due_date` or + `net_terms` is required to determine the due date ## Deducting Credits @@ -953,8 +981,14 @@ def create_entry( also generate a one-off invoice for the customer for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`, since the total charges on the invoice are calculated by multiplying the cost basis with the number of - credit units added. Additionally, Orb also enforces invoice generation when a - non-zero `per_unit_cost_basis` value is provided. + credit units added. If you invoice or handle payment of credits outside of Orb + (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to + `true` to prevent duplicate invoicing effects. + + - if `per_unit_cost_basis` is greater than zero, an invoice will be generated + and `invoice_settings` must be included + - if `invoice_settings` is passed, one of either `custom_due_date` or + `net_terms` is required to determine the due date ## Deducting Credits @@ -1193,8 +1227,14 @@ def create_entry_by_external_id( also generate a one-off invoice for the customer for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`, since the total charges on the invoice are calculated by multiplying the cost basis with the number of - credit units added. Additionally, Orb also enforces invoice generation when a - non-zero `per_unit_cost_basis` value is provided. + credit units added. If you invoice or handle payment of credits outside of Orb + (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to + `true` to prevent duplicate invoicing effects. + + - if `per_unit_cost_basis` is greater than zero, an invoice will be generated + and `invoice_settings` must be included + - if `invoice_settings` is passed, one of either `custom_due_date` or + `net_terms` is required to determine the due date ## Deducting Credits @@ -1367,8 +1407,14 @@ def create_entry_by_external_id( also generate a one-off invoice for the customer for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`, since the total charges on the invoice are calculated by multiplying the cost basis with the number of - credit units added. Additionally, Orb also enforces invoice generation when a - non-zero `per_unit_cost_basis` value is provided. + credit units added. If you invoice or handle payment of credits outside of Orb + (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to + `true` to prevent duplicate invoicing effects. + + - if `per_unit_cost_basis` is greater than zero, an invoice will be generated + and `invoice_settings` must be included + - if `invoice_settings` is passed, one of either `custom_due_date` or + `net_terms` is required to determine the due date ## Deducting Credits @@ -1528,8 +1574,14 @@ def create_entry_by_external_id( also generate a one-off invoice for the customer for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`, since the total charges on the invoice are calculated by multiplying the cost basis with the number of - credit units added. Additionally, Orb also enforces invoice generation when a - non-zero `per_unit_cost_basis` value is provided. + credit units added. If you invoice or handle payment of credits outside of Orb + (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to + `true` to prevent duplicate invoicing effects. + + - if `per_unit_cost_basis` is greater than zero, an invoice will be generated + and `invoice_settings` must be included + - if `invoice_settings` is passed, one of either `custom_due_date` or + `net_terms` is required to determine the due date ## Deducting Credits @@ -1697,8 +1749,14 @@ def create_entry_by_external_id( also generate a one-off invoice for the customer for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`, since the total charges on the invoice are calculated by multiplying the cost basis with the number of - credit units added. Additionally, Orb also enforces invoice generation when a - non-zero `per_unit_cost_basis` value is provided. + credit units added. If you invoice or handle payment of credits outside of Orb + (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to + `true` to prevent duplicate invoicing effects. + + - if `per_unit_cost_basis` is greater than zero, an invoice will be generated + and `invoice_settings` must be included + - if `invoice_settings` is passed, one of either `custom_due_date` or + `net_terms` is required to determine the due date ## Deducting Credits @@ -1860,8 +1918,14 @@ def create_entry_by_external_id( also generate a one-off invoice for the customer for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`, since the total charges on the invoice are calculated by multiplying the cost basis with the number of - credit units added. Additionally, Orb also enforces invoice generation when a - non-zero `per_unit_cost_basis` value is provided. + credit units added. If you invoice or handle payment of credits outside of Orb + (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to + `true` to prevent duplicate invoicing effects. + + - if `per_unit_cost_basis` is greater than zero, an invoice will be generated + and `invoice_settings` must be included + - if `invoice_settings` is passed, one of either `custom_due_date` or + `net_terms` is required to determine the due date ## Deducting Credits @@ -2190,6 +2254,10 @@ def list_by_external_id( class AsyncLedger(AsyncAPIResource): + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ + @cached_property def with_raw_response(self) -> AsyncLedgerWithRawResponse: """ @@ -2443,8 +2511,14 @@ async def create_entry( also generate a one-off invoice for the customer for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`, since the total charges on the invoice are calculated by multiplying the cost basis with the number of - credit units added. Additionally, Orb also enforces invoice generation when a - non-zero `per_unit_cost_basis` value is provided. + credit units added. If you invoice or handle payment of credits outside of Orb + (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to + `true` to prevent duplicate invoicing effects. + + - if `per_unit_cost_basis` is greater than zero, an invoice will be generated + and `invoice_settings` must be included + - if `invoice_settings` is passed, one of either `custom_due_date` or + `net_terms` is required to determine the due date ## Deducting Credits @@ -2617,8 +2691,14 @@ async def create_entry( also generate a one-off invoice for the customer for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`, since the total charges on the invoice are calculated by multiplying the cost basis with the number of - credit units added. Additionally, Orb also enforces invoice generation when a - non-zero `per_unit_cost_basis` value is provided. + credit units added. If you invoice or handle payment of credits outside of Orb + (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to + `true` to prevent duplicate invoicing effects. + + - if `per_unit_cost_basis` is greater than zero, an invoice will be generated + and `invoice_settings` must be included + - if `invoice_settings` is passed, one of either `custom_due_date` or + `net_terms` is required to determine the due date ## Deducting Credits @@ -2778,8 +2858,14 @@ async def create_entry( also generate a one-off invoice for the customer for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`, since the total charges on the invoice are calculated by multiplying the cost basis with the number of - credit units added. Additionally, Orb also enforces invoice generation when a - non-zero `per_unit_cost_basis` value is provided. + credit units added. If you invoice or handle payment of credits outside of Orb + (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to + `true` to prevent duplicate invoicing effects. + + - if `per_unit_cost_basis` is greater than zero, an invoice will be generated + and `invoice_settings` must be included + - if `invoice_settings` is passed, one of either `custom_due_date` or + `net_terms` is required to determine the due date ## Deducting Credits @@ -2947,8 +3033,14 @@ async def create_entry( also generate a one-off invoice for the customer for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`, since the total charges on the invoice are calculated by multiplying the cost basis with the number of - credit units added. Additionally, Orb also enforces invoice generation when a - non-zero `per_unit_cost_basis` value is provided. + credit units added. If you invoice or handle payment of credits outside of Orb + (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to + `true` to prevent duplicate invoicing effects. + + - if `per_unit_cost_basis` is greater than zero, an invoice will be generated + and `invoice_settings` must be included + - if `invoice_settings` is passed, one of either `custom_due_date` or + `net_terms` is required to determine the due date ## Deducting Credits @@ -3110,8 +3202,14 @@ async def create_entry( also generate a one-off invoice for the customer for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`, since the total charges on the invoice are calculated by multiplying the cost basis with the number of - credit units added. Additionally, Orb also enforces invoice generation when a - non-zero `per_unit_cost_basis` value is provided. + credit units added. If you invoice or handle payment of credits outside of Orb + (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to + `true` to prevent duplicate invoicing effects. + + - if `per_unit_cost_basis` is greater than zero, an invoice will be generated + and `invoice_settings` must be included + - if `invoice_settings` is passed, one of either `custom_due_date` or + `net_terms` is required to determine the due date ## Deducting Credits @@ -3350,8 +3448,14 @@ async def create_entry_by_external_id( also generate a one-off invoice for the customer for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`, since the total charges on the invoice are calculated by multiplying the cost basis with the number of - credit units added. Additionally, Orb also enforces invoice generation when a - non-zero `per_unit_cost_basis` value is provided. + credit units added. If you invoice or handle payment of credits outside of Orb + (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to + `true` to prevent duplicate invoicing effects. + + - if `per_unit_cost_basis` is greater than zero, an invoice will be generated + and `invoice_settings` must be included + - if `invoice_settings` is passed, one of either `custom_due_date` or + `net_terms` is required to determine the due date ## Deducting Credits @@ -3524,8 +3628,14 @@ async def create_entry_by_external_id( also generate a one-off invoice for the customer for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`, since the total charges on the invoice are calculated by multiplying the cost basis with the number of - credit units added. Additionally, Orb also enforces invoice generation when a - non-zero `per_unit_cost_basis` value is provided. + credit units added. If you invoice or handle payment of credits outside of Orb + (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to + `true` to prevent duplicate invoicing effects. + + - if `per_unit_cost_basis` is greater than zero, an invoice will be generated + and `invoice_settings` must be included + - if `invoice_settings` is passed, one of either `custom_due_date` or + `net_terms` is required to determine the due date ## Deducting Credits @@ -3685,8 +3795,14 @@ async def create_entry_by_external_id( also generate a one-off invoice for the customer for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`, since the total charges on the invoice are calculated by multiplying the cost basis with the number of - credit units added. Additionally, Orb also enforces invoice generation when a - non-zero `per_unit_cost_basis` value is provided. + credit units added. If you invoice or handle payment of credits outside of Orb + (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to + `true` to prevent duplicate invoicing effects. + + - if `per_unit_cost_basis` is greater than zero, an invoice will be generated + and `invoice_settings` must be included + - if `invoice_settings` is passed, one of either `custom_due_date` or + `net_terms` is required to determine the due date ## Deducting Credits @@ -3854,8 +3970,14 @@ async def create_entry_by_external_id( also generate a one-off invoice for the customer for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`, since the total charges on the invoice are calculated by multiplying the cost basis with the number of - credit units added. Additionally, Orb also enforces invoice generation when a - non-zero `per_unit_cost_basis` value is provided. + credit units added. If you invoice or handle payment of credits outside of Orb + (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to + `true` to prevent duplicate invoicing effects. + + - if `per_unit_cost_basis` is greater than zero, an invoice will be generated + and `invoice_settings` must be included + - if `invoice_settings` is passed, one of either `custom_due_date` or + `net_terms` is required to determine the due date ## Deducting Credits @@ -4017,8 +4139,14 @@ async def create_entry_by_external_id( also generate a one-off invoice for the customer for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`, since the total charges on the invoice are calculated by multiplying the cost basis with the number of - credit units added. Additionally, Orb also enforces invoice generation when a - non-zero `per_unit_cost_basis` value is provided. + credit units added. If you invoice or handle payment of credits outside of Orb + (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to + `true` to prevent duplicate invoicing effects. + + - if `per_unit_cost_basis` is greater than zero, an invoice will be generated + and `invoice_settings` must be included + - if `invoice_settings` is passed, one of either `custom_due_date` or + `net_terms` is required to determine the due date ## Deducting Credits diff --git a/src/orb/resources/customers/credits/top_ups.py b/src/orb/resources/customers/credits/top_ups.py index 6dc08792..52d36205 100644 --- a/src/orb/resources/customers/credits/top_ups.py +++ b/src/orb/resources/customers/credits/top_ups.py @@ -31,6 +31,10 @@ class TopUps(SyncAPIResource): + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ + @cached_property def with_raw_response(self) -> TopUpsWithRawResponse: """ @@ -426,6 +430,10 @@ def list_by_external_id( class AsyncTopUps(AsyncAPIResource): + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ + @cached_property def with_raw_response(self) -> AsyncTopUpsWithRawResponse: """ diff --git a/src/orb/resources/customers/customers.py b/src/orb/resources/customers/customers.py index 20ae377a..75d1f1ff 100644 --- a/src/orb/resources/customers/customers.py +++ b/src/orb/resources/customers/customers.py @@ -57,16 +57,68 @@ class Customers(SyncAPIResource): + """ + A customer is a buyer of your products, and the other party to the billing relationship. + + In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these + match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an + `external_customer_id` with your own identifier. See + [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these + aliases work in Orb. + + In addition to having an identifier in your system, a customer may exist in a payment provider solution like + Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping. + + A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which + defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for + information on what this timezone parameter influences within Orb. + """ + @cached_property def costs(self) -> Costs: + """ + A customer is a buyer of your products, and the other party to the billing relationship. + + In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these + match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an + `external_customer_id` with your own identifier. See + [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these + aliases work in Orb. + + In addition to having an identifier in your system, a customer may exist in a payment provider solution like + Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping. + + A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which + defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for + information on what this timezone parameter influences within Orb. + """ return Costs(self._client) @cached_property def credits(self) -> Credits: + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ return Credits(self._client) @cached_property def balance_transactions(self) -> BalanceTransactions: + """ + A customer is a buyer of your products, and the other party to the billing relationship. + + In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these + match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an + `external_customer_id` with your own identifier. See + [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these + aliases work in Orb. + + In addition to having an identifier in your system, a customer may exist in a payment provider solution like + Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping. + + A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which + defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for + information on what this timezone parameter influences within Orb. + """ return BalanceTransactions(self._client) @cached_property @@ -409,9 +461,10 @@ def update( """ This endpoint can be used to update the `payment_provider`, `payment_provider_id`, `name`, `email`, `email_delivery`, `tax_id`, - `auto_collection`, `metadata`, `shipping_address`, `billing_address`, and - `additional_emails` of an existing customer. Other fields on a customer are - currently immutable. + `auto_collection`, `metadata`, `shipping_address`, `billing_address`, + `additional_emails`, and `currency` of an existing customer. `currency` can only + be set if it has not already been set on the customer. Other fields on a + customer are currently immutable. Args: additional_emails: Additional email addresses for this customer. If populated, these email @@ -427,8 +480,10 @@ def update( manual approval.If `null` is specified, the customer's auto issuance setting will be inherited from the account-level setting. - currency: An ISO 4217 currency string used for the customer's invoices and balance. If not - set at creation time, will be set at subscription creation time. + currency: An ISO 4217 currency string used for the customer's invoices and balance. This + can only be set if the customer does not already have a currency configured. If + not set at creation or update time, it will be set at subscription creation + time. email: A valid customer email, to be used for invoicing and notifications. @@ -992,8 +1047,10 @@ def update_by_external_id( manual approval.If `null` is specified, the customer's auto issuance setting will be inherited from the account-level setting. - currency: An ISO 4217 currency string used for the customer's invoices and balance. If not - set at creation time, will be set at subscription creation time. + currency: An ISO 4217 currency string used for the customer's invoices and balance. This + can only be set if the customer does not already have a currency configured. If + not set at creation or update time, it will be set at subscription creation + time. email: A valid customer email, to be used for invoicing and notifications. @@ -1221,16 +1278,68 @@ def update_by_external_id( class AsyncCustomers(AsyncAPIResource): + """ + A customer is a buyer of your products, and the other party to the billing relationship. + + In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these + match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an + `external_customer_id` with your own identifier. See + [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these + aliases work in Orb. + + In addition to having an identifier in your system, a customer may exist in a payment provider solution like + Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping. + + A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which + defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for + information on what this timezone parameter influences within Orb. + """ + @cached_property def costs(self) -> AsyncCosts: + """ + A customer is a buyer of your products, and the other party to the billing relationship. + + In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these + match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an + `external_customer_id` with your own identifier. See + [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these + aliases work in Orb. + + In addition to having an identifier in your system, a customer may exist in a payment provider solution like + Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping. + + A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which + defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for + information on what this timezone parameter influences within Orb. + """ return AsyncCosts(self._client) @cached_property def credits(self) -> AsyncCredits: + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ return AsyncCredits(self._client) @cached_property def balance_transactions(self) -> AsyncBalanceTransactions: + """ + A customer is a buyer of your products, and the other party to the billing relationship. + + In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these + match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an + `external_customer_id` with your own identifier. See + [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these + aliases work in Orb. + + In addition to having an identifier in your system, a customer may exist in a payment provider solution like + Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping. + + A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which + defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for + information on what this timezone parameter influences within Orb. + """ return AsyncBalanceTransactions(self._client) @cached_property @@ -1573,9 +1682,10 @@ async def update( """ This endpoint can be used to update the `payment_provider`, `payment_provider_id`, `name`, `email`, `email_delivery`, `tax_id`, - `auto_collection`, `metadata`, `shipping_address`, `billing_address`, and - `additional_emails` of an existing customer. Other fields on a customer are - currently immutable. + `auto_collection`, `metadata`, `shipping_address`, `billing_address`, + `additional_emails`, and `currency` of an existing customer. `currency` can only + be set if it has not already been set on the customer. Other fields on a + customer are currently immutable. Args: additional_emails: Additional email addresses for this customer. If populated, these email @@ -1591,8 +1701,10 @@ async def update( manual approval.If `null` is specified, the customer's auto issuance setting will be inherited from the account-level setting. - currency: An ISO 4217 currency string used for the customer's invoices and balance. If not - set at creation time, will be set at subscription creation time. + currency: An ISO 4217 currency string used for the customer's invoices and balance. This + can only be set if the customer does not already have a currency configured. If + not set at creation or update time, it will be set at subscription creation + time. email: A valid customer email, to be used for invoicing and notifications. @@ -2156,8 +2268,10 @@ async def update_by_external_id( manual approval.If `null` is specified, the customer's auto issuance setting will be inherited from the account-level setting. - currency: An ISO 4217 currency string used for the customer's invoices and balance. If not - set at creation time, will be set at subscription creation time. + currency: An ISO 4217 currency string used for the customer's invoices and balance. This + can only be set if the customer does not already have a currency configured. If + not set at creation or update time, it will be set at subscription creation + time. email: A valid customer email, to be used for invoicing and notifications. @@ -2418,14 +2532,49 @@ def __init__(self, customers: Customers) -> None: @cached_property def costs(self) -> CostsWithRawResponse: + """ + A customer is a buyer of your products, and the other party to the billing relationship. + + In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these + match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an + `external_customer_id` with your own identifier. See + [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these + aliases work in Orb. + + In addition to having an identifier in your system, a customer may exist in a payment provider solution like + Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping. + + A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which + defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for + information on what this timezone parameter influences within Orb. + """ return CostsWithRawResponse(self._customers.costs) @cached_property def credits(self) -> CreditsWithRawResponse: + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ return CreditsWithRawResponse(self._customers.credits) @cached_property def balance_transactions(self) -> BalanceTransactionsWithRawResponse: + """ + A customer is a buyer of your products, and the other party to the billing relationship. + + In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these + match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an + `external_customer_id` with your own identifier. See + [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these + aliases work in Orb. + + In addition to having an identifier in your system, a customer may exist in a payment provider solution like + Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping. + + A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which + defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for + information on what this timezone parameter influences within Orb. + """ return BalanceTransactionsWithRawResponse(self._customers.balance_transactions) @@ -2463,14 +2612,49 @@ def __init__(self, customers: AsyncCustomers) -> None: @cached_property def costs(self) -> AsyncCostsWithRawResponse: + """ + A customer is a buyer of your products, and the other party to the billing relationship. + + In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these + match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an + `external_customer_id` with your own identifier. See + [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these + aliases work in Orb. + + In addition to having an identifier in your system, a customer may exist in a payment provider solution like + Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping. + + A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which + defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for + information on what this timezone parameter influences within Orb. + """ return AsyncCostsWithRawResponse(self._customers.costs) @cached_property def credits(self) -> AsyncCreditsWithRawResponse: + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ return AsyncCreditsWithRawResponse(self._customers.credits) @cached_property def balance_transactions(self) -> AsyncBalanceTransactionsWithRawResponse: + """ + A customer is a buyer of your products, and the other party to the billing relationship. + + In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these + match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an + `external_customer_id` with your own identifier. See + [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these + aliases work in Orb. + + In addition to having an identifier in your system, a customer may exist in a payment provider solution like + Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping. + + A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which + defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for + information on what this timezone parameter influences within Orb. + """ return AsyncBalanceTransactionsWithRawResponse(self._customers.balance_transactions) @@ -2508,14 +2692,49 @@ def __init__(self, customers: Customers) -> None: @cached_property def costs(self) -> CostsWithStreamingResponse: + """ + A customer is a buyer of your products, and the other party to the billing relationship. + + In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these + match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an + `external_customer_id` with your own identifier. See + [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these + aliases work in Orb. + + In addition to having an identifier in your system, a customer may exist in a payment provider solution like + Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping. + + A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which + defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for + information on what this timezone parameter influences within Orb. + """ return CostsWithStreamingResponse(self._customers.costs) @cached_property def credits(self) -> CreditsWithStreamingResponse: + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ return CreditsWithStreamingResponse(self._customers.credits) @cached_property def balance_transactions(self) -> BalanceTransactionsWithStreamingResponse: + """ + A customer is a buyer of your products, and the other party to the billing relationship. + + In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these + match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an + `external_customer_id` with your own identifier. See + [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these + aliases work in Orb. + + In addition to having an identifier in your system, a customer may exist in a payment provider solution like + Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping. + + A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which + defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for + information on what this timezone parameter influences within Orb. + """ return BalanceTransactionsWithStreamingResponse(self._customers.balance_transactions) @@ -2553,12 +2772,47 @@ def __init__(self, customers: AsyncCustomers) -> None: @cached_property def costs(self) -> AsyncCostsWithStreamingResponse: + """ + A customer is a buyer of your products, and the other party to the billing relationship. + + In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these + match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an + `external_customer_id` with your own identifier. See + [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these + aliases work in Orb. + + In addition to having an identifier in your system, a customer may exist in a payment provider solution like + Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping. + + A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which + defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for + information on what this timezone parameter influences within Orb. + """ return AsyncCostsWithStreamingResponse(self._customers.costs) @cached_property def credits(self) -> AsyncCreditsWithStreamingResponse: + """ + The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb. + """ return AsyncCreditsWithStreamingResponse(self._customers.credits) @cached_property def balance_transactions(self) -> AsyncBalanceTransactionsWithStreamingResponse: + """ + A customer is a buyer of your products, and the other party to the billing relationship. + + In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these + match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an + `external_customer_id` with your own identifier. See + [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these + aliases work in Orb. + + In addition to having an identifier in your system, a customer may exist in a payment provider solution like + Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping. + + A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which + defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for + information on what this timezone parameter influences within Orb. + """ return AsyncBalanceTransactionsWithStreamingResponse(self._customers.balance_transactions) diff --git a/src/orb/resources/events/backfills.py b/src/orb/resources/events/backfills.py index 7839e27c..44d97075 100644 --- a/src/orb/resources/events/backfills.py +++ b/src/orb/resources/events/backfills.py @@ -26,6 +26,12 @@ class Backfills(SyncAPIResource): + """ + The [Event](/core-concepts#event) resource represents a usage event that has been created for a + customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for + a given billing period. + """ + @cached_property def with_raw_response(self) -> BackfillsWithRawResponse: """ @@ -345,6 +351,12 @@ def revert( class AsyncBackfills(AsyncAPIResource): + """ + The [Event](/core-concepts#event) resource represents a usage event that has been created for a + customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for + a given billing period. + """ + @cached_property def with_raw_response(self) -> AsyncBackfillsWithRawResponse: """ diff --git a/src/orb/resources/events/events.py b/src/orb/resources/events/events.py index 0d372f1a..570f2450 100644 --- a/src/orb/resources/events/events.py +++ b/src/orb/resources/events/events.py @@ -40,12 +40,28 @@ class Events(SyncAPIResource): + """ + The [Event](/core-concepts#event) resource represents a usage event that has been created for a + customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for + a given billing period. + """ + @cached_property def backfills(self) -> Backfills: + """ + The [Event](/core-concepts#event) resource represents a usage event that has been created for a + customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for + a given billing period. + """ return Backfills(self._client) @cached_property def volume(self) -> Volume: + """ + The [Event](/core-concepts#event) resource represents a usage event that has been created for a + customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for + a given billing period. + """ return Volume(self._client) @cached_property @@ -591,12 +607,28 @@ def search( class AsyncEvents(AsyncAPIResource): + """ + The [Event](/core-concepts#event) resource represents a usage event that has been created for a + customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for + a given billing period. + """ + @cached_property def backfills(self) -> AsyncBackfills: + """ + The [Event](/core-concepts#event) resource represents a usage event that has been created for a + customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for + a given billing period. + """ return AsyncBackfills(self._client) @cached_property def volume(self) -> AsyncVolume: + """ + The [Event](/core-concepts#event) resource represents a usage event that has been created for a + customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for + a given billing period. + """ return AsyncVolume(self._client) @cached_property @@ -1160,10 +1192,20 @@ def __init__(self, events: Events) -> None: @cached_property def backfills(self) -> BackfillsWithRawResponse: + """ + The [Event](/core-concepts#event) resource represents a usage event that has been created for a + customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for + a given billing period. + """ return BackfillsWithRawResponse(self._events.backfills) @cached_property def volume(self) -> VolumeWithRawResponse: + """ + The [Event](/core-concepts#event) resource represents a usage event that has been created for a + customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for + a given billing period. + """ return VolumeWithRawResponse(self._events.volume) @@ -1186,10 +1228,20 @@ def __init__(self, events: AsyncEvents) -> None: @cached_property def backfills(self) -> AsyncBackfillsWithRawResponse: + """ + The [Event](/core-concepts#event) resource represents a usage event that has been created for a + customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for + a given billing period. + """ return AsyncBackfillsWithRawResponse(self._events.backfills) @cached_property def volume(self) -> AsyncVolumeWithRawResponse: + """ + The [Event](/core-concepts#event) resource represents a usage event that has been created for a + customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for + a given billing period. + """ return AsyncVolumeWithRawResponse(self._events.volume) @@ -1212,10 +1264,20 @@ def __init__(self, events: Events) -> None: @cached_property def backfills(self) -> BackfillsWithStreamingResponse: + """ + The [Event](/core-concepts#event) resource represents a usage event that has been created for a + customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for + a given billing period. + """ return BackfillsWithStreamingResponse(self._events.backfills) @cached_property def volume(self) -> VolumeWithStreamingResponse: + """ + The [Event](/core-concepts#event) resource represents a usage event that has been created for a + customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for + a given billing period. + """ return VolumeWithStreamingResponse(self._events.volume) @@ -1238,8 +1300,18 @@ def __init__(self, events: AsyncEvents) -> None: @cached_property def backfills(self) -> AsyncBackfillsWithStreamingResponse: + """ + The [Event](/core-concepts#event) resource represents a usage event that has been created for a + customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for + a given billing period. + """ return AsyncBackfillsWithStreamingResponse(self._events.backfills) @cached_property def volume(self) -> AsyncVolumeWithStreamingResponse: + """ + The [Event](/core-concepts#event) resource represents a usage event that has been created for a + customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for + a given billing period. + """ return AsyncVolumeWithStreamingResponse(self._events.volume) diff --git a/src/orb/resources/events/volume.py b/src/orb/resources/events/volume.py index b2be9b8e..1342b46c 100644 --- a/src/orb/resources/events/volume.py +++ b/src/orb/resources/events/volume.py @@ -21,6 +21,12 @@ class Volume(SyncAPIResource): + """ + The [Event](/core-concepts#event) resource represents a usage event that has been created for a + customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for + a given billing period. + """ + @cached_property def with_raw_response(self) -> VolumeWithRawResponse: """ @@ -115,6 +121,12 @@ def list( class AsyncVolume(AsyncAPIResource): + """ + The [Event](/core-concepts#event) resource represents a usage event that has been created for a + customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for + a given billing period. + """ + @cached_property def with_raw_response(self) -> AsyncVolumeWithRawResponse: """ diff --git a/src/orb/resources/invoice_line_items.py b/src/orb/resources/invoice_line_items.py index 0bc3c106..0c2d31dc 100644 --- a/src/orb/resources/invoice_line_items.py +++ b/src/orb/resources/invoice_line_items.py @@ -21,6 +21,13 @@ class InvoiceLineItems(SyncAPIResource): + """ + An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for + a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and + can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as + the result of an action, such as a cancellation. + """ + @cached_property def with_raw_response(self) -> InvoiceLineItemsWithRawResponse: """ @@ -133,6 +140,13 @@ def create( class AsyncInvoiceLineItems(AsyncAPIResource): + """ + An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for + a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and + can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as + the result of an action, such as a cancellation. + """ + @cached_property def with_raw_response(self) -> AsyncInvoiceLineItemsWithRawResponse: """ diff --git a/src/orb/resources/invoices.py b/src/orb/resources/invoices.py index 6660d1f6..eb3c8db8 100644 --- a/src/orb/resources/invoices.py +++ b/src/orb/resources/invoices.py @@ -36,6 +36,13 @@ class Invoices(SyncAPIResource): + """ + An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for + a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and + can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as + the result of an action, such as a cancellation. + """ + @cached_property def with_raw_response(self) -> InvoicesWithRawResponse: """ @@ -61,6 +68,7 @@ def create( currency: str, invoice_date: Union[str, datetime], line_items: Iterable[invoice_create_params.LineItem], + auto_collection: Optional[bool] | Omit = omit, customer_id: Optional[str] | Omit = omit, discount: Optional[Discount] | Omit = omit, due_date: Union[Union[str, date], Union[str, datetime], None] | Omit = omit, @@ -87,6 +95,10 @@ def create( invoice_date: Optional invoice date to set. Must be in the past, if not set, `invoice_date` is set to the current time in the customer's timezone. + auto_collection: Determines whether this invoice will automatically attempt to charge a saved + payment method, if any. If not specified, the invoice inherits the customer's + auto_collection setting. + customer_id: The id of the `Customer` to create this invoice for. One of `customer_id` and `external_customer_id` are required. @@ -132,6 +144,7 @@ def create( "currency": currency, "invoice_date": invoice_date, "line_items": line_items, + "auto_collection": auto_collection, "customer_id": customer_id, "discount": discount, "due_date": due_date, @@ -157,6 +170,7 @@ def update( self, invoice_id: str, *, + auto_collection: Optional[bool] | Omit = omit, due_date: Union[Union[str, date], Union[str, datetime], None] | Omit = omit, invoice_date: Union[Union[str, date], Union[str, datetime], None] | Omit = omit, metadata: Optional[Dict[str, Optional[str]]] | Omit = omit, @@ -170,15 +184,20 @@ def update( idempotency_key: str | None = None, ) -> Invoice: """ - This endpoint allows you to update the `metadata`, `net_terms`, `due_date`, and - `invoice_date` properties on an invoice. If you pass null for the metadata - value, it will clear any existing metadata for that invoice. + This endpoint allows you to update the `metadata`, `net_terms`, `due_date`, + `invoice_date`, and `auto_collection` properties on an invoice. If you pass null + for the metadata value, it will clear any existing metadata for that invoice. `metadata` can be modified regardless of invoice state. `net_terms`, `due_date`, - and `invoice_date` can only be modified if the invoice is in a `draft` state. - `invoice_date` can only be modified for non-subscription invoices. + `invoice_date`, and `auto_collection` can only be modified if the invoice is in + a `draft` state. `invoice_date` can only be modified for non-subscription + invoices. Args: + auto_collection: Determines whether this invoice will automatically attempt to charge a saved + payment method, if any. Can only be modified on draft invoices. If not + specified, the invoice's existing setting is unchanged. + due_date: An optional custom due date for the invoice. If not set, the due date will be calculated based on the `net_terms` value. @@ -210,6 +229,7 @@ def update( f"/invoices/{invoice_id}", body=maybe_transform( { + "auto_collection": auto_collection, "due_date": due_date, "invoice_date": invoice_date, "metadata": metadata, @@ -813,6 +833,13 @@ def void( class AsyncInvoices(AsyncAPIResource): + """ + An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for + a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and + can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as + the result of an action, such as a cancellation. + """ + @cached_property def with_raw_response(self) -> AsyncInvoicesWithRawResponse: """ @@ -838,6 +865,7 @@ async def create( currency: str, invoice_date: Union[str, datetime], line_items: Iterable[invoice_create_params.LineItem], + auto_collection: Optional[bool] | Omit = omit, customer_id: Optional[str] | Omit = omit, discount: Optional[Discount] | Omit = omit, due_date: Union[Union[str, date], Union[str, datetime], None] | Omit = omit, @@ -864,6 +892,10 @@ async def create( invoice_date: Optional invoice date to set. Must be in the past, if not set, `invoice_date` is set to the current time in the customer's timezone. + auto_collection: Determines whether this invoice will automatically attempt to charge a saved + payment method, if any. If not specified, the invoice inherits the customer's + auto_collection setting. + customer_id: The id of the `Customer` to create this invoice for. One of `customer_id` and `external_customer_id` are required. @@ -909,6 +941,7 @@ async def create( "currency": currency, "invoice_date": invoice_date, "line_items": line_items, + "auto_collection": auto_collection, "customer_id": customer_id, "discount": discount, "due_date": due_date, @@ -934,6 +967,7 @@ async def update( self, invoice_id: str, *, + auto_collection: Optional[bool] | Omit = omit, due_date: Union[Union[str, date], Union[str, datetime], None] | Omit = omit, invoice_date: Union[Union[str, date], Union[str, datetime], None] | Omit = omit, metadata: Optional[Dict[str, Optional[str]]] | Omit = omit, @@ -947,15 +981,20 @@ async def update( idempotency_key: str | None = None, ) -> Invoice: """ - This endpoint allows you to update the `metadata`, `net_terms`, `due_date`, and - `invoice_date` properties on an invoice. If you pass null for the metadata - value, it will clear any existing metadata for that invoice. + This endpoint allows you to update the `metadata`, `net_terms`, `due_date`, + `invoice_date`, and `auto_collection` properties on an invoice. If you pass null + for the metadata value, it will clear any existing metadata for that invoice. `metadata` can be modified regardless of invoice state. `net_terms`, `due_date`, - and `invoice_date` can only be modified if the invoice is in a `draft` state. - `invoice_date` can only be modified for non-subscription invoices. + `invoice_date`, and `auto_collection` can only be modified if the invoice is in + a `draft` state. `invoice_date` can only be modified for non-subscription + invoices. Args: + auto_collection: Determines whether this invoice will automatically attempt to charge a saved + payment method, if any. Can only be modified on draft invoices. If not + specified, the invoice's existing setting is unchanged. + due_date: An optional custom due date for the invoice. If not set, the due date will be calculated based on the `net_terms` value. @@ -987,6 +1026,7 @@ async def update( f"/invoices/{invoice_id}", body=await async_maybe_transform( { + "auto_collection": auto_collection, "due_date": due_date, "invoice_date": invoice_date, "metadata": metadata, diff --git a/src/orb/resources/items.py b/src/orb/resources/items.py index d1cd7d7d..bc39f209 100644 --- a/src/orb/resources/items.py +++ b/src/orb/resources/items.py @@ -21,6 +21,12 @@ class Items(SyncAPIResource): + """The Item resource represents a sellable product or good. + + Items are associated with all line items, billable metrics, + and prices and are used for defining external sync behavior for invoices and tax calculation purposes. + """ + @cached_property def with_raw_response(self) -> ItemsWithRawResponse: """ @@ -271,6 +277,12 @@ def fetch( class AsyncItems(AsyncAPIResource): + """The Item resource represents a sellable product or good. + + Items are associated with all line items, billable metrics, + and prices and are used for defining external sync behavior for invoices and tax calculation purposes. + """ + @cached_property def with_raw_response(self) -> AsyncItemsWithRawResponse: """ diff --git a/src/orb/resources/license_types.py b/src/orb/resources/license_types.py index 0809c648..bf2b5545 100644 --- a/src/orb/resources/license_types.py +++ b/src/orb/resources/license_types.py @@ -23,6 +23,11 @@ class LicenseTypes(SyncAPIResource): + """ + 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. + """ + @cached_property def with_raw_response(self) -> LicenseTypesWithRawResponse: """ @@ -188,6 +193,11 @@ def list( class AsyncLicenseTypes(AsyncAPIResource): + """ + 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. + """ + @cached_property def with_raw_response(self) -> AsyncLicenseTypesWithRawResponse: """ diff --git a/src/orb/resources/metrics.py b/src/orb/resources/metrics.py index 6f62951d..eb9d4922 100644 --- a/src/orb/resources/metrics.py +++ b/src/orb/resources/metrics.py @@ -22,6 +22,11 @@ class Metrics(SyncAPIResource): + """ + The Metric resource represents a calculation of a quantity based on events. + Metrics are defined by the query that transforms raw usage events into meaningful values for your customers. + """ + @cached_property def with_raw_response(self) -> MetricsWithRawResponse: """ @@ -251,6 +256,11 @@ def fetch( class AsyncMetrics(AsyncAPIResource): + """ + The Metric resource represents a calculation of a quantity based on events. + Metrics are defined by the query that transforms raw usage events into meaningful values for your customers. + """ + @cached_property def with_raw_response(self) -> AsyncMetricsWithRawResponse: """ diff --git a/src/orb/resources/plans/external_plan_id.py b/src/orb/resources/plans/external_plan_id.py index 1017afcc..53828bbc 100644 --- a/src/orb/resources/plans/external_plan_id.py +++ b/src/orb/resources/plans/external_plan_id.py @@ -20,6 +20,12 @@ class ExternalPlanID(SyncAPIResource): + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ + @cached_property def with_raw_response(self) -> ExternalPlanIDWithRawResponse: """ @@ -151,6 +157,12 @@ def fetch( class AsyncExternalPlanID(AsyncAPIResource): + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ + @cached_property def with_raw_response(self) -> AsyncExternalPlanIDWithRawResponse: """ diff --git a/src/orb/resources/plans/migrations.py b/src/orb/resources/plans/migrations.py index 593a7e10..825a71df 100644 --- a/src/orb/resources/plans/migrations.py +++ b/src/orb/resources/plans/migrations.py @@ -23,6 +23,12 @@ class Migrations(SyncAPIResource): + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ + @cached_property def with_raw_response(self) -> MigrationsWithRawResponse: """ @@ -178,6 +184,12 @@ def cancel( class AsyncMigrations(AsyncAPIResource): + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ + @cached_property def with_raw_response(self) -> AsyncMigrationsWithRawResponse: """ diff --git a/src/orb/resources/plans/plans.py b/src/orb/resources/plans/plans.py index 64d0bad8..1b7a400a 100644 --- a/src/orb/resources/plans/plans.py +++ b/src/orb/resources/plans/plans.py @@ -39,12 +39,28 @@ class Plans(SyncAPIResource): + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ + @cached_property def external_plan_id(self) -> ExternalPlanID: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ return ExternalPlanID(self._client) @cached_property def migrations(self) -> Migrations: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ return Migrations(self._client) @cached_property @@ -328,12 +344,28 @@ def fetch( class AsyncPlans(AsyncAPIResource): + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ + @cached_property def external_plan_id(self) -> AsyncExternalPlanID: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ return AsyncExternalPlanID(self._client) @cached_property def migrations(self) -> AsyncMigrations: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ return AsyncMigrations(self._client) @cached_property @@ -635,10 +667,20 @@ def __init__(self, plans: Plans) -> None: @cached_property def external_plan_id(self) -> ExternalPlanIDWithRawResponse: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ return ExternalPlanIDWithRawResponse(self._plans.external_plan_id) @cached_property def migrations(self) -> MigrationsWithRawResponse: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ return MigrationsWithRawResponse(self._plans.migrations) @@ -661,10 +703,20 @@ def __init__(self, plans: AsyncPlans) -> None: @cached_property def external_plan_id(self) -> AsyncExternalPlanIDWithRawResponse: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ return AsyncExternalPlanIDWithRawResponse(self._plans.external_plan_id) @cached_property def migrations(self) -> AsyncMigrationsWithRawResponse: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ return AsyncMigrationsWithRawResponse(self._plans.migrations) @@ -687,10 +739,20 @@ def __init__(self, plans: Plans) -> None: @cached_property def external_plan_id(self) -> ExternalPlanIDWithStreamingResponse: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ return ExternalPlanIDWithStreamingResponse(self._plans.external_plan_id) @cached_property def migrations(self) -> MigrationsWithStreamingResponse: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ return MigrationsWithStreamingResponse(self._plans.migrations) @@ -713,8 +775,18 @@ def __init__(self, plans: AsyncPlans) -> None: @cached_property def external_plan_id(self) -> AsyncExternalPlanIDWithStreamingResponse: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ return AsyncExternalPlanIDWithStreamingResponse(self._plans.external_plan_id) @cached_property def migrations(self) -> AsyncMigrationsWithStreamingResponse: + """ + The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a + customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices + in the [Price resource](/reference/price). + """ return AsyncMigrationsWithStreamingResponse(self._plans.migrations) diff --git a/src/orb/resources/prices/external_price_id.py b/src/orb/resources/prices/external_price_id.py index 8d023ee9..bf986e2d 100644 --- a/src/orb/resources/prices/external_price_id.py +++ b/src/orb/resources/prices/external_price_id.py @@ -20,6 +20,16 @@ class ExternalPriceID(SyncAPIResource): + """ + The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in + the form of an invoice line item. Prices take a quantity and determine an amount to bill. + + Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a + given Price object. The model_type field determines the key for the configuration object that is present. + + For more on the types of prices, see [the core concepts documentation](/core-concepts#plan-and-price) + """ + @cached_property def with_raw_response(self) -> ExternalPriceIDWithRawResponse: """ @@ -134,6 +144,16 @@ def fetch( class AsyncExternalPriceID(AsyncAPIResource): + """ + The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in + the form of an invoice line item. Prices take a quantity and determine an amount to bill. + + Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a + given Price object. The model_type field determines the key for the configuration object that is present. + + For more on the types of prices, see [the core concepts documentation](/core-concepts#plan-and-price) + """ + @cached_property def with_raw_response(self) -> AsyncExternalPriceIDWithRawResponse: """ diff --git a/src/orb/resources/prices/prices.py b/src/orb/resources/prices/prices.py index 1c568a13..9fedb3ed 100644 --- a/src/orb/resources/prices/prices.py +++ b/src/orb/resources/prices/prices.py @@ -49,8 +49,27 @@ class Prices(SyncAPIResource): + """ + The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in + the form of an invoice line item. Prices take a quantity and determine an amount to bill. + + Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a + given Price object. The model_type field determines the key for the configuration object that is present. + + For more on the types of prices, see [the core concepts documentation](/core-concepts#plan-and-price) + """ + @cached_property def external_price_id(self) -> ExternalPriceID: + """ + The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in + the form of an invoice line item. Prices take a quantity and determine an amount to bill. + + Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a + given Price object. The model_type field determines the key for the configuration object that is present. + + For more on the types of prices, see [the core concepts documentation](/core-concepts#plan-and-price) + """ return ExternalPriceID(self._client) @cached_property @@ -3503,6 +3522,7 @@ def evaluate( external_customer_id: Optional[str] | Omit = omit, filter: Optional[str] | Omit = omit, grouping_keys: SequenceNotStr[str] | Omit = omit, + metric_parameter_overrides: Optional[Dict[str, object]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3555,6 +3575,9 @@ def evaluate( [computed properties](/extensibility/advanced-metrics#computed-properties)) used to group the underlying billable metric + metric_parameter_overrides: Optional overrides for parameterized billable metric parameters. If the metric + has parameter definitions and no overrides are provided, defaults will be used. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3577,6 +3600,7 @@ def evaluate( "external_customer_id": external_customer_id, "filter": filter, "grouping_keys": grouping_keys, + "metric_parameter_overrides": metric_parameter_overrides, }, price_evaluate_params.PriceEvaluateParams, ), @@ -3801,8 +3825,27 @@ def fetch( class AsyncPrices(AsyncAPIResource): + """ + The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in + the form of an invoice line item. Prices take a quantity and determine an amount to bill. + + Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a + given Price object. The model_type field determines the key for the configuration object that is present. + + For more on the types of prices, see [the core concepts documentation](/core-concepts#plan-and-price) + """ + @cached_property def external_price_id(self) -> AsyncExternalPriceID: + """ + The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in + the form of an invoice line item. Prices take a quantity and determine an amount to bill. + + Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a + given Price object. The model_type field determines the key for the configuration object that is present. + + For more on the types of prices, see [the core concepts documentation](/core-concepts#plan-and-price) + """ return AsyncExternalPriceID(self._client) @cached_property @@ -7255,6 +7298,7 @@ async def evaluate( external_customer_id: Optional[str] | Omit = omit, filter: Optional[str] | Omit = omit, grouping_keys: SequenceNotStr[str] | Omit = omit, + metric_parameter_overrides: Optional[Dict[str, object]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -7307,6 +7351,9 @@ async def evaluate( [computed properties](/extensibility/advanced-metrics#computed-properties)) used to group the underlying billable metric + metric_parameter_overrides: Optional overrides for parameterized billable metric parameters. If the metric + has parameter definitions and no overrides are provided, defaults will be used. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -7329,6 +7376,7 @@ async def evaluate( "external_customer_id": external_customer_id, "filter": filter, "grouping_keys": grouping_keys, + "metric_parameter_overrides": metric_parameter_overrides, }, price_evaluate_params.PriceEvaluateParams, ), @@ -7580,6 +7628,15 @@ def __init__(self, prices: Prices) -> None: @cached_property def external_price_id(self) -> ExternalPriceIDWithRawResponse: + """ + The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in + the form of an invoice line item. Prices take a quantity and determine an amount to bill. + + Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a + given Price object. The model_type field determines the key for the configuration object that is present. + + For more on the types of prices, see [the core concepts documentation](/core-concepts#plan-and-price) + """ return ExternalPriceIDWithRawResponse(self._prices.external_price_id) @@ -7611,6 +7668,15 @@ def __init__(self, prices: AsyncPrices) -> None: @cached_property def external_price_id(self) -> AsyncExternalPriceIDWithRawResponse: + """ + The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in + the form of an invoice line item. Prices take a quantity and determine an amount to bill. + + Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a + given Price object. The model_type field determines the key for the configuration object that is present. + + For more on the types of prices, see [the core concepts documentation](/core-concepts#plan-and-price) + """ return AsyncExternalPriceIDWithRawResponse(self._prices.external_price_id) @@ -7642,6 +7708,15 @@ def __init__(self, prices: Prices) -> None: @cached_property def external_price_id(self) -> ExternalPriceIDWithStreamingResponse: + """ + The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in + the form of an invoice line item. Prices take a quantity and determine an amount to bill. + + Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a + given Price object. The model_type field determines the key for the configuration object that is present. + + For more on the types of prices, see [the core concepts documentation](/core-concepts#plan-and-price) + """ return ExternalPriceIDWithStreamingResponse(self._prices.external_price_id) @@ -7673,4 +7748,13 @@ def __init__(self, prices: AsyncPrices) -> None: @cached_property def external_price_id(self) -> AsyncExternalPriceIDWithStreamingResponse: + """ + The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in + the form of an invoice line item. Prices take a quantity and determine an amount to bill. + + Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a + given Price object. The model_type field determines the key for the configuration object that is present. + + For more on the types of prices, see [the core concepts documentation](/core-concepts#plan-and-price) + """ return AsyncExternalPriceIDWithStreamingResponse(self._prices.external_price_id) diff --git a/src/orb/types/alert.py b/src/orb/types/alert.py index 433daf36..08ad5113 100644 --- a/src/orb/types/alert.py +++ b/src/orb/types/alert.py @@ -105,5 +105,11 @@ class Alert(BaseModel): This field is only present for credit balance alerts. """ + grouping_keys: Optional[List[str]] = None + """The property keys to group cost alerts by. + + Only present for cost alerts with grouping enabled. + """ + license_type: Optional[LicenseType] = None """Minified license type for alert serialization.""" diff --git a/src/orb/types/alert_create_for_subscription_params.py b/src/orb/types/alert_create_for_subscription_params.py index 9b8f2208..8a35f6ff 100644 --- a/src/orb/types/alert_create_for_subscription_params.py +++ b/src/orb/types/alert_create_for_subscription_params.py @@ -5,6 +5,7 @@ from typing import Iterable, Optional from typing_extensions import Literal, Required, TypedDict +from .._types import SequenceNotStr from .threshold_param import ThresholdParam __all__ = ["AlertCreateForSubscriptionParams"] @@ -17,5 +18,17 @@ class AlertCreateForSubscriptionParams(TypedDict, total=False): type: Required[Literal["usage_exceeded", "cost_exceeded"]] """The type of alert to create. This must be a valid alert type.""" + grouping_keys: Optional[SequenceNotStr[str]] + """The property keys to group cost alerts by. + + Only applicable for cost_exceeded alerts. + """ + metric_id: Optional[str] """The metric to track usage for.""" + + pricing_unit_id: Optional[str] + """The pricing unit to use for grouped cost alerts. + + Required when grouping_keys is set. + """ diff --git a/src/orb/types/beta/external_plan_id_create_plan_version_params.py b/src/orb/types/beta/external_plan_id_create_plan_version_params.py index 6b31bed1..2b0a54b8 100644 --- a/src/orb/types/beta/external_plan_id_create_plan_version_params.py +++ b/src/orb/types/beta/external_plan_id_create_plan_version_params.py @@ -5,8 +5,13 @@ from typing import Dict, Union, Iterable, Optional from typing_extensions import Literal, Required, TypeAlias, TypedDict +from ..shared_params.bulk_config import BulkConfig from ..shared_params.new_maximum import NewMaximum from ..shared_params.new_minimum import NewMinimum +from ..shared_params.unit_config import UnitConfig +from ..shared_params.matrix_config import MatrixConfig +from ..shared_params.tiered_config import TieredConfig +from ..shared_params.package_config import PackageConfig from ..shared_params.new_usage_discount import NewUsageDiscount from ..shared_params.new_amount_discount import NewAmountDiscount from ..shared_params.new_plan_bulk_price import NewPlanBulkPrice @@ -17,6 +22,7 @@ from ..shared_params.new_plan_package_price import NewPlanPackagePrice from ..shared_params.new_percentage_discount import NewPercentageDiscount from ..shared_params.unit_conversion_rate_config import UnitConversionRateConfig +from ..shared_params.matrix_with_allocation_config import MatrixWithAllocationConfig from ..shared_params.new_plan_grouped_tiered_price import NewPlanGroupedTieredPrice from ..shared_params.new_plan_tiered_package_price import NewPlanTieredPackagePrice from ..shared_params.tiered_conversion_rate_config import TieredConversionRateConfig @@ -48,6 +54,143 @@ "AddAdjustment", "AddAdjustmentAdjustment", "AddPrice", + "AddPriceLicenseAllocationPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationUnitPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationUnitPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationUnitPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigFilter", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigTier", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationPackagePrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationPackagePriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationPackagePriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTable", + "AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfigTier", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfigTier", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfigTier", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTier", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPricePackageWithAllocationConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceUnitWithPercentConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfigTier", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceUnitWithProrationConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceGroupedAllocationConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfigTier", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactor", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmount", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmount", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfigTier", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTier", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactor", + "AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactor", + "AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTier", + "AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValue", + "AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceMinimumCompositeConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePricePercentConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationEventOutputPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceEventOutputConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceConversionRateConfig", "AddPricePrice", "AddPricePriceNewPlanBulkWithFiltersPrice", "AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfig", @@ -75,6 +218,143 @@ "ReplaceAdjustment", "ReplaceAdjustmentAdjustment", "ReplacePrice", + "ReplacePriceLicenseAllocationPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigFilter", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigTier", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackagePrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackagePriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackagePriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTable", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfigTier", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfigTier", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfigTier", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTier", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPricePackageWithAllocationConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceUnitWithPercentConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfigTier", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceUnitWithProrationConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceGroupedAllocationConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfigTier", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactor", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmount", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmount", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfigTier", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTier", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactor", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactor", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTier", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValue", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceMinimumCompositeConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePricePercentConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationEventOutputPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceEventOutputConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceConversionRateConfig", "ReplacePricePrice", "ReplacePricePriceNewPlanBulkWithFiltersPrice", "ReplacePricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfig", @@ -139,57 +419,8391 @@ class AddAdjustment(TypedDict, total=False): """The phase to add this adjustment to.""" +class AddPriceLicenseAllocationPriceNewLicenseAllocationUnitPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationUnitPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationUnitPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationUnitPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["unit"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + unit_config: Required[UnitConfig] + """Configuration for unit pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPriceLicenseAllocationPriceNewLicenseAllocationUnitPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["tiered"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_config: Required[TieredConfig] + """Configuration for tiered pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationBulkPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationBulkPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationBulkPrice(TypedDict, total=False): + bulk_config: Required[BulkConfig] + """Configuration for bulk pricing""" + + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationBulkPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["bulk"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPriceLicenseAllocationPriceNewLicenseAllocationBulkPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigFilter( + TypedDict, total=False +): + """Configuration for a single property filter""" + + property_key: Required[str] + """Event property key to filter on""" + + property_value: Required[str] + """Event property value to match""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigTier( + TypedDict, total=False +): + """Configuration for a single bulk pricing tier""" + + unit_amount: Required[str] + """Amount per unit""" + + tier_lower_bound: Optional[str] + """The lower bound for this tier""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfig( + TypedDict, total=False +): + """Configuration for bulk_with_filters pricing""" + + filters: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigFilter] + ] + """Property filters to apply (all must match)""" + + tiers: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigTier] + ] + """Bulk tiers for rating based on total usage volume""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPrice(TypedDict, total=False): + bulk_with_filters_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfig + ] + """Configuration for bulk_with_filters pricing""" + + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["bulk_with_filters"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationPackagePriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationPackagePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationPackagePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["package"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + package_config: Required[PackageConfig] + """Configuration for package pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPriceLicenseAllocationPriceNewLicenseAllocationPackagePriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + matrix_config: Required[MatrixConfig] + """Configuration for matrix pricing""" + + model_type: Required[Literal["matrix"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTable( + TypedDict, total=False +): + """Configuration for a single threshold""" + + threshold: Required[str] + + total_amount: Required[str] + """Total amount for this threshold""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfig( + TypedDict, total=False +): + """Configuration for threshold_total_amount pricing""" + + consumption_table: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTable + ] + ] + """ + When the quantity consumed passes a provided threshold, the configured total + will be charged + """ + + prorate: Optional[bool] + """If true, the unit price will be prorated to the billing period""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["threshold_total_amount"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + threshold_total_amount_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfig + ] + """Configuration for threshold_total_amount pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfigTier( + TypedDict, total=False +): + """Configuration for a single tier with business logic""" + + per_unit: Required[str] + """Price per package""" + + tier_lower_bound: Required[str] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfig(TypedDict, total=False): + """Configuration for tiered_package pricing""" + + package_size: Required[str] + + tiers: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfigTier] + ] + """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. + """ + + +AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["tiered_package"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_package_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfig + ] + """Configuration for tiered_package pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfigTier( + TypedDict, total=False +): + """Configuration for a single tier""" + + minimum_amount: Required[str] + + tier_lower_bound: Required[str] + + unit_amount: Required[str] + """Per unit amount""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfig( + TypedDict, total=False +): + """Configuration for tiered_with_minimum pricing""" + + tiers: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfigTier] + ] + """Tiered pricing with a minimum amount dependent on the volume tier. + + Tiers are defined using exclusive lower bounds. + """ + + hide_zero_amount_tiers: bool + """If true, tiers with an accrued amount of 0 will not be included in the rating.""" + + prorate: bool + """If true, the unit price will be prorated to the billing period""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["tiered_with_minimum"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_with_minimum_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfig + ] + """Configuration for tiered_with_minimum pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfigTier( + TypedDict, total=False +): + """Configuration for a single tier""" + + tier_lower_bound: Required[str] + + unit_amount: Required[str] + """Per unit amount""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfig(TypedDict, total=False): + """Configuration for grouped_tiered pricing""" + + grouping_key: Required[str] + """The billable metric property used to group before tiering""" + + tiers: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfigTier] + ] + """ + Apply tiered pricing to each segment generated after grouping with the provided + key + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_tiered_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfig + ] + """Configuration for grouped_tiered pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_tiered"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTier( + TypedDict, total=False +): + """Configuration for a single tier""" + + minimum_amount: Required[str] + + per_unit: Required[str] + + tier_lower_bound: Required[str] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfig( + TypedDict, total=False +): + """Configuration for tiered_package_with_minimum pricing""" + + package_size: Required[float] + + tiers: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTier + ] + ] + """Apply tiered pricing after rounding up the quantity to the package size. + + Tiers are defined using exclusive lower bounds. + """ + + +AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["tiered_package_with_minimum"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_package_with_minimum_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfig + ] + """Configuration for tiered_package_with_minimum pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPricePackageWithAllocationConfig( + TypedDict, total=False +): + """Configuration for package_with_allocation pricing""" + + allocation: Required[str] + + package_amount: Required[str] + + package_size: Required[str] + + +AddPriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["package_with_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + package_with_allocation_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPricePackageWithAllocationConfig + ] + """Configuration for package_with_allocation pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceUnitWithPercentConfig( + TypedDict, total=False +): + """Configuration for unit_with_percent pricing""" + + percent: Required[str] + """What percent, out of 100, of the calculated total to charge""" + + unit_amount: Required[str] + """Rate per unit of usage""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["unit_with_percent"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + unit_with_percent_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceUnitWithPercentConfig + ] + """Configuration for unit_with_percent pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + matrix_with_allocation_config: Required[MatrixWithAllocationConfig] + """Configuration for matrix_with_allocation pricing""" + + model_type: Required[Literal["matrix_with_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfigTier( + TypedDict, total=False +): + """Configuration for a single tiered with proration tier""" + + tier_lower_bound: Required[str] + """Inclusive tier starting value""" + + unit_amount: Required[str] + """Amount per unit""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfig( + TypedDict, total=False +): + """Configuration for tiered_with_proration pricing""" + + tiers: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfigTier + ] + ] + """ + Tiers for rating based on total usage quantities into the specified tier with + proration + """ + + +AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["tiered_with_proration"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_with_proration_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfig + ] + """Configuration for tiered_with_proration pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceUnitWithProrationConfig( + TypedDict, total=False +): + """Configuration for unit_with_proration pricing""" + + unit_amount: Required[str] + """Rate per unit of usage""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["unit_with_proration"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + unit_with_proration_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceUnitWithProrationConfig + ] + """Configuration for unit_with_proration pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceGroupedAllocationConfig( + TypedDict, total=False +): + """Configuration for grouped_allocation pricing""" + + allocation: Required[str] + """Usage allocation per group""" + + grouping_key: Required[str] + """How to determine the groups that should each be allocated some quantity""" + + overage_unit_rate: Required[str] + """Unit rate for post-allocation""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_allocation_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceGroupedAllocationConfig + ] + """Configuration for grouped_allocation pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfigTier( + TypedDict, total=False +): + """Configuration for a single bulk pricing tier with proration""" + + unit_amount: Required[str] + """Cost per unit""" + + tier_lower_bound: Optional[str] + """The lower bound for this tier""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfig( + TypedDict, total=False +): + """Configuration for bulk_with_proration pricing""" + + tiers: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfigTier] + ] + """Bulk tiers for rating based on total usage volume""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPrice(TypedDict, total=False): + bulk_with_proration_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfig + ] + """Configuration for bulk_with_proration pricing""" + + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["bulk_with_proration"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfig( + TypedDict, total=False +): + """Configuration for grouped_with_prorated_minimum pricing""" + + grouping_key: Required[str] + """How to determine the groups that should each have a minimum""" + + minimum: Required[str] + """The minimum amount to charge per group""" + + unit_rate: Required[str] + """The amount to charge per unit""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceConversionRateConfig: TypeAlias = ( + Union[UnitConversionRateConfig, TieredConversionRateConfig] +) + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_with_prorated_minimum_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfig + ] + """Configuration for grouped_with_prorated_minimum pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_with_prorated_minimum"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactor( + TypedDict, total=False +): + """Configuration for a scaling factor""" + + scaling_factor: Required[str] + + scaling_value: Required[str] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmount( + TypedDict, total=False +): + """Configuration for a unit amount""" + + pricing_value: Required[str] + + unit_amount: Required[str] + """Per unit amount""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfig( + TypedDict, total=False +): + """Configuration for grouped_with_metered_minimum pricing""" + + grouping_key: Required[str] + """Used to partition the usage into groups. + + The minimum amount is applied to each group. + """ + + minimum_unit_amount: Required[str] + """The minimum amount to charge per group per unit""" + + pricing_key: Required[str] + """Used to determine the unit rate""" + + scaling_factors: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactor + ] + ] + """Scale the unit rates by the scaling factor.""" + + scaling_key: Required[str] + """Used to determine the unit rate scaling factor""" + + unit_amounts: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmount + ] + ] + """Apply per unit pricing to each pricing value. + + The minimum amount is applied any unmatched usage. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_with_metered_minimum_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfig + ] + """Configuration for grouped_with_metered_minimum pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_with_metered_minimum"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig( + TypedDict, total=False +): + """Configuration for grouped_with_min_max_thresholds pricing""" + + grouping_key: Required[str] + """The event property used to group before applying thresholds""" + + maximum_charge: Required[str] + """The maximum amount to charge each group""" + + minimum_charge: Required[str] + """The minimum amount to charge each group, regardless of usage""" + + per_unit_rate: Required[str] + """The base price charged per group""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceConversionRateConfig: TypeAlias = ( + Union[UnitConversionRateConfig, TieredConversionRateConfig] +) + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_with_min_max_thresholds_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig + ] + """Configuration for grouped_with_min_max_thresholds pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_with_min_max_thresholds"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmount( + TypedDict, total=False +): + """Configuration for a unit amount item""" + + dimension_value: Required[str] + """The dimension value""" + + display_name: Required[str] + """Display name for this dimension value""" + + unit_amount: Required[str] + """Per unit amount""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfig( + TypedDict, total=False +): + """Configuration for matrix_with_display_name pricing""" + + dimension: Required[str] + """Used to determine the unit rate""" + + unit_amounts: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmount + ] + ] + """Apply per unit pricing to each dimension value""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + matrix_with_display_name_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfig + ] + """Configuration for matrix_with_display_name pricing""" + + model_type: Required[Literal["matrix_with_display_name"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfigTier( + TypedDict, total=False +): + """Configuration for a single tier""" + + per_unit: Required[str] + """Per package""" + + tier_lower_bound: Required[str] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfig( + TypedDict, total=False +): + """Configuration for grouped_tiered_package pricing""" + + grouping_key: Required[str] + """The event property used to group before tiering""" + + package_size: Required[str] + + tiers: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfigTier + ] + ] + """Apply tiered pricing after rounding up the quantity to the package size. + + Tiers are defined using exclusive lower bounds. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_tiered_package_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfig + ] + """Configuration for grouped_tiered_package pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_tiered_package"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTier( + TypedDict, total=False +): + """Configuration for a single tier""" + + tier_lower_bound: Required[str] + + unit_amount: Required[str] + """Per unit amount""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfig( + TypedDict, total=False +): + """Configuration for max_group_tiered_package pricing""" + + grouping_key: Required[str] + """ + The event property used to group before tiering the group with the highest value + """ + + package_size: Required[str] + + tiers: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTier + ] + ] + """Apply tiered pricing to the largest group after grouping with the provided key.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + max_group_tiered_package_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfig + ] + """Configuration for max_group_tiered_package pricing""" + + model_type: Required[Literal["max_group_tiered_package"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactor( + TypedDict, total=False +): + """Configuration for a single matrix scaling factor""" + + first_dimension_value: Required[str] + + scaling_factor: Required[str] + + second_dimension_value: Optional[str] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfig( + TypedDict, total=False +): + """Configuration for scalable_matrix_with_unit_pricing pricing""" + + first_dimension: Required[str] + """Used to determine the unit rate""" + + matrix_scaling_factors: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactor + ] + ] + """Apply a scaling factor to each dimension""" + + unit_price: Required[str] + """The final unit price to rate against the output of the matrix""" + + grouping_key: Optional[str] + """The property used to group this price""" + + prorate: Optional[bool] + """If true, the unit price will be prorated to the billing period""" + + second_dimension: Optional[str] + """Used to determine the unit rate (optional)""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceConversionRateConfig: TypeAlias = ( + Union[UnitConversionRateConfig, TieredConversionRateConfig] +) + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["scalable_matrix_with_unit_pricing"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + scalable_matrix_with_unit_pricing_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfig + ] + """Configuration for scalable_matrix_with_unit_pricing pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactor( + TypedDict, total=False +): + """Configuration for a single matrix scaling factor""" + + first_dimension_value: Required[str] + + scaling_factor: Required[str] + + second_dimension_value: Optional[str] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTier( + TypedDict, total=False +): + """Configuration for a single tier entry with business logic""" + + tier_lower_bound: Required[str] + + unit_amount: Required[str] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfig( + TypedDict, total=False +): + """Configuration for scalable_matrix_with_tiered_pricing pricing""" + + first_dimension: Required[str] + """Used for the scalable matrix first dimension""" + + matrix_scaling_factors: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactor + ] + ] + """Apply a scaling factor to each dimension""" + + tiers: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTier + ] + ] + + second_dimension: Optional[str] + """Used for the scalable matrix second dimension (optional)""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceLicenseAllocation + ] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["scalable_matrix_with_tiered_pricing"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + scalable_matrix_with_tiered_pricing_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfig + ] + """Configuration for scalable_matrix_with_tiered_pricing pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValue( + TypedDict, total=False +): + """Configuration for a dimension value entry""" + + grouping_key: Required[str] + """Grouping key value""" + + tier_lower_bound: Required[str] + """Tier lower bound""" + + unit_amount: Required[str] + """Unit amount for this combination""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig( + TypedDict, total=False +): + """Configuration for cumulative_grouped_bulk pricing""" + + dimension_values: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValue + ] + ] + """Each tier lower bound must have the same group of values.""" + + group: Required[str] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + cumulative_grouped_bulk_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig + ] + """Configuration for cumulative_grouped_bulk pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["cumulative_grouped_bulk"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig( + TypedDict, total=False +): + """Configuration for cumulative_grouped_allocation pricing""" + + cumulative_allocation: Required[str] + """The overall allocation across all groups""" + + group_allocation: Required[str] + """The allocation per individual group""" + + grouping_key: Required[str] + """The event property used to group usage before applying allocations""" + + unit_amount: Required[str] + """The amount to charge for each unit outside of the allocation""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceConversionRateConfig: TypeAlias = ( + Union[UnitConversionRateConfig, TieredConversionRateConfig] +) + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + cumulative_grouped_allocation_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig + ] + """Configuration for cumulative_grouped_allocation pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["cumulative_grouped_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceMinimumCompositeConfig( + TypedDict, total=False +): + """Configuration for minimum_composite pricing""" + + minimum_amount: Required[str] + """The minimum amount to apply""" + + prorated: bool + """If true, subtotals from this price are prorated based on the service period""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + minimum_composite_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceMinimumCompositeConfig + ] + """Configuration for minimum_composite pricing""" + + model_type: Required[Literal["minimum_composite"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePricePercentConfig(TypedDict, total=False): + """Configuration for percent pricing""" + + percent: Required[float] + """What percent of the component subtotals to charge""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["percent"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + percent_config: Required[AddPriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePricePercentConfig] + """Configuration for percent pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceEventOutputConfig(TypedDict, total=False): + """Configuration for event_output pricing""" + + unit_rating_key: Required[str] + """The key in the event data to extract the unit rate from.""" + + default_unit_rate: Optional[str] + """ + 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. + """ + + grouping_key: Optional[str] + """An optional key in the event data to group by (e.g., event ID). + + All events will also be grouped by their unit rate. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationEventOutputPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + event_output_config: Required[AddPriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceEventOutputConfig] + """Configuration for event_output pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["event_output"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +AddPriceLicenseAllocationPrice: TypeAlias = Union[ + AddPriceLicenseAllocationPriceNewLicenseAllocationUnitPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationBulkPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationPackagePrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationEventOutputPrice, +] + + class AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigFilter(TypedDict, total=False): """Configuration for a single property filter""" - property_key: Required[str] - """Event property key to filter on""" + property_key: Required[str] + """Event property key to filter on""" + + property_value: Required[str] + """Event property value to match""" + + +class AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigTier(TypedDict, total=False): + """Configuration for a single bulk pricing tier""" + + unit_amount: Required[str] + """Amount per unit""" + + tier_lower_bound: Optional[str] + """The lower bound for this tier""" + + +class AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfig(TypedDict, total=False): + """Configuration for bulk_with_filters pricing""" + + filters: Required[Iterable[AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigFilter]] + """Property filters to apply (all must match)""" + + tiers: Required[Iterable[AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigTier]] + """Bulk tiers for rating based on total usage volume""" + + +AddPricePriceNewPlanBulkWithFiltersPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPricePriceNewPlanBulkWithFiltersPrice(TypedDict, total=False): + bulk_with_filters_config: Required[AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfig] + """Configuration for bulk_with_filters pricing""" + + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["bulk_with_filters"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPricePriceNewPlanBulkWithFiltersPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier(TypedDict, total=False): + """Configuration for a single tiered with proration tier""" + + tier_lower_bound: Required[str] + """Inclusive tier starting value""" + + unit_amount: Required[str] + """Amount per unit""" + + +class AddPricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfig(TypedDict, total=False): + """Configuration for tiered_with_proration pricing""" + + tiers: Required[Iterable[AddPricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier]] + """ + Tiers for rating based on total usage quantities into the specified tier with + proration + """ + + +AddPricePriceNewPlanTieredWithProrationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPricePriceNewPlanTieredWithProrationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["tiered_with_proration"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_with_proration_config: Required[AddPricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfig] + """Configuration for tiered_with_proration pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPricePriceNewPlanTieredWithProrationPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig(TypedDict, total=False): + """Configuration for grouped_with_min_max_thresholds pricing""" + + grouping_key: Required[str] + """The event property used to group before applying thresholds""" + + maximum_charge: Required[str] + """The maximum amount to charge each group""" + + minimum_charge: Required[str] + """The minimum amount to charge each group, regardless of usage""" + + per_unit_rate: Required[str] + """The base price charged per group""" + + +AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPricePriceNewPlanGroupedWithMinMaxThresholdsPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_with_min_max_thresholds_config: Required[ + AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig + ] + """Configuration for grouped_with_min_max_thresholds pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_with_min_max_thresholds"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig(TypedDict, total=False): + """Configuration for cumulative_grouped_allocation pricing""" + + cumulative_allocation: Required[str] + """The overall allocation across all groups""" + + group_allocation: Required[str] + """The allocation per individual group""" + + grouping_key: Required[str] + """The event property used to group usage before applying allocations""" + + unit_amount: Required[str] + """The amount to charge for each unit outside of the allocation""" + + +AddPricePriceNewPlanCumulativeGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPricePriceNewPlanCumulativeGroupedAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + cumulative_grouped_allocation_config: Required[ + AddPricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig + ] + """Configuration for cumulative_grouped_allocation pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["cumulative_grouped_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPricePriceNewPlanCumulativeGroupedAllocationPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPricePriceNewPlanPercentCompositePricePercentConfig(TypedDict, total=False): + """Configuration for percent pricing""" + + percent: Required[float] + """What percent of the component subtotals to charge""" + + +AddPricePriceNewPlanPercentCompositePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPricePriceNewPlanPercentCompositePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["percent"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + percent_config: Required[AddPricePriceNewPlanPercentCompositePricePercentConfig] + """Configuration for percent pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPricePriceNewPlanPercentCompositePriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPricePriceNewPlanEventOutputPriceEventOutputConfig(TypedDict, total=False): + """Configuration for event_output pricing""" + + unit_rating_key: Required[str] + """The key in the event data to extract the unit rate from.""" + + default_unit_rate: Optional[str] + """ + 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. + """ + + grouping_key: Optional[str] + """An optional key in the event data to group by (e.g., event ID). + + All events will also be grouped by their unit rate. + """ + + +AddPricePriceNewPlanEventOutputPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPricePriceNewPlanEventOutputPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + event_output_config: Required[AddPricePriceNewPlanEventOutputPriceEventOutputConfig] + """Configuration for event_output pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["event_output"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPricePriceNewPlanEventOutputPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +AddPricePrice: TypeAlias = Union[ + NewPlanUnitPrice, + NewPlanTieredPrice, + NewPlanBulkPrice, + AddPricePriceNewPlanBulkWithFiltersPrice, + NewPlanPackagePrice, + NewPlanMatrixPrice, + NewPlanThresholdTotalAmountPrice, + NewPlanTieredPackagePrice, + NewPlanTieredWithMinimumPrice, + NewPlanGroupedTieredPrice, + NewPlanTieredPackageWithMinimumPrice, + NewPlanPackageWithAllocationPrice, + NewPlanUnitWithPercentPrice, + NewPlanMatrixWithAllocationPrice, + AddPricePriceNewPlanTieredWithProrationPrice, + NewPlanUnitWithProrationPrice, + NewPlanGroupedAllocationPrice, + NewPlanBulkWithProrationPrice, + NewPlanGroupedWithProratedMinimumPrice, + NewPlanGroupedWithMeteredMinimumPrice, + AddPricePriceNewPlanGroupedWithMinMaxThresholdsPrice, + NewPlanMatrixWithDisplayNamePrice, + NewPlanGroupedTieredPackagePrice, + NewPlanMaxGroupTieredPackagePrice, + NewPlanScalableMatrixWithUnitPricingPrice, + NewPlanScalableMatrixWithTieredPricingPrice, + NewPlanCumulativeGroupedBulkPrice, + AddPricePriceNewPlanCumulativeGroupedAllocationPrice, + NewPlanMinimumCompositePrice, + AddPricePriceNewPlanPercentCompositePrice, + AddPricePriceNewPlanEventOutputPrice, +] + + +class AddPrice(TypedDict, total=False): + allocation_price: Optional[NewAllocationPrice] + """The allocation price to add to the plan.""" + + license_allocation_price: Optional[AddPriceLicenseAllocationPrice] + """The license allocation price to add to the plan.""" + + plan_phase_order: Optional[int] + """The phase to add this price to.""" + + price: Optional[AddPricePrice] + """New plan price request body params.""" + + +class RemoveAdjustment(TypedDict, total=False): + adjustment_id: Required[str] + """The id of the adjustment to remove from on the plan.""" + + plan_phase_order: Optional[int] + """The phase to remove this adjustment from.""" + + +class RemovePrice(TypedDict, total=False): + price_id: Required[str] + """The id of the price to remove from the plan.""" + + plan_phase_order: Optional[int] + """The phase to remove this price from.""" + + +ReplaceAdjustmentAdjustment: TypeAlias = Union[ + NewPercentageDiscount, NewUsageDiscount, NewAmountDiscount, NewMinimum, NewMaximum +] + + +class ReplaceAdjustment(TypedDict, total=False): + adjustment: Required[ReplaceAdjustmentAdjustment] + """The definition of a new adjustment to create and add to the plan.""" + + replaces_adjustment_id: Required[str] + """The id of the adjustment on the plan to replace in the plan.""" + + plan_phase_order: Optional[int] + """The phase to replace this adjustment from.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["unit"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + unit_config: Required[UnitConfig] + """Configuration for unit pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["tiered"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_config: Required[TieredConfig] + """Configuration for tiered pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkPrice(TypedDict, total=False): + bulk_config: Required[BulkConfig] + """Configuration for bulk pricing""" + + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["bulk"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigFilter( + TypedDict, total=False +): + """Configuration for a single property filter""" + + property_key: Required[str] + """Event property key to filter on""" + + property_value: Required[str] + """Event property value to match""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigTier( + TypedDict, total=False +): + """Configuration for a single bulk pricing tier""" + + unit_amount: Required[str] + """Amount per unit""" + + tier_lower_bound: Optional[str] + """The lower bound for this tier""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfig( + TypedDict, total=False +): + """Configuration for bulk_with_filters pricing""" + + filters: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigFilter] + ] + """Property filters to apply (all must match)""" + + tiers: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigTier] + ] + """Bulk tiers for rating based on total usage volume""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPrice(TypedDict, total=False): + bulk_with_filters_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfig + ] + """Configuration for bulk_with_filters pricing""" + + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["bulk_with_filters"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackagePriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackagePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackagePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["package"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + package_config: Required[PackageConfig] + """Configuration for package pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackagePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + matrix_config: Required[MatrixConfig] + """Configuration for matrix pricing""" + + model_type: Required[Literal["matrix"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTable( + TypedDict, total=False +): + """Configuration for a single threshold""" + + threshold: Required[str] + + total_amount: Required[str] + """Total amount for this threshold""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfig( + TypedDict, total=False +): + """Configuration for threshold_total_amount pricing""" + + consumption_table: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTable + ] + ] + """ + When the quantity consumed passes a provided threshold, the configured total + will be charged + """ + + prorate: Optional[bool] + """If true, the unit price will be prorated to the billing period""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["threshold_total_amount"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + threshold_total_amount_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfig + ] + """Configuration for threshold_total_amount pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfigTier( + TypedDict, total=False +): + """Configuration for a single tier with business logic""" + + per_unit: Required[str] + """Price per package""" + + tier_lower_bound: Required[str] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfig( + TypedDict, total=False +): + """Configuration for tiered_package pricing""" + + package_size: Required[str] + + tiers: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfigTier] + ] + """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. + """ + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["tiered_package"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_package_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfig + ] + """Configuration for tiered_package pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfigTier( + TypedDict, total=False +): + """Configuration for a single tier""" + + minimum_amount: Required[str] + + tier_lower_bound: Required[str] + + unit_amount: Required[str] + """Per unit amount""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfig( + TypedDict, total=False +): + """Configuration for tiered_with_minimum pricing""" + + tiers: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfigTier + ] + ] + """Tiered pricing with a minimum amount dependent on the volume tier. + + Tiers are defined using exclusive lower bounds. + """ + + hide_zero_amount_tiers: bool + """If true, tiers with an accrued amount of 0 will not be included in the rating.""" + + prorate: bool + """If true, the unit price will be prorated to the billing period""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["tiered_with_minimum"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_with_minimum_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfig + ] + """Configuration for tiered_with_minimum pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfigTier( + TypedDict, total=False +): + """Configuration for a single tier""" + + tier_lower_bound: Required[str] + + unit_amount: Required[str] + """Per unit amount""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfig( + TypedDict, total=False +): + """Configuration for grouped_tiered pricing""" + + grouping_key: Required[str] + """The billable metric property used to group before tiering""" + + tiers: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfigTier] + ] + """ + Apply tiered pricing to each segment generated after grouping with the provided + key + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_tiered_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfig + ] + """Configuration for grouped_tiered pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_tiered"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTier( + TypedDict, total=False +): + """Configuration for a single tier""" + + minimum_amount: Required[str] + + per_unit: Required[str] + + tier_lower_bound: Required[str] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfig( + TypedDict, total=False +): + """Configuration for tiered_package_with_minimum pricing""" + + package_size: Required[float] + + tiers: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTier + ] + ] + """Apply tiered pricing after rounding up the quantity to the package size. + + Tiers are defined using exclusive lower bounds. + """ + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceConversionRateConfig: TypeAlias = ( + Union[UnitConversionRateConfig, TieredConversionRateConfig] +) + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["tiered_package_with_minimum"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_package_with_minimum_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfig + ] + """Configuration for tiered_package_with_minimum pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPricePackageWithAllocationConfig( + TypedDict, total=False +): + """Configuration for package_with_allocation pricing""" + + allocation: Required[str] + + package_amount: Required[str] + + package_size: Required[str] + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["package_with_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + package_with_allocation_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPricePackageWithAllocationConfig + ] + """Configuration for package_with_allocation pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceUnitWithPercentConfig( + TypedDict, total=False +): + """Configuration for unit_with_percent pricing""" + + percent: Required[str] + """What percent, out of 100, of the calculated total to charge""" + + unit_amount: Required[str] + """Rate per unit of usage""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["unit_with_percent"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + unit_with_percent_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceUnitWithPercentConfig + ] + """Configuration for unit_with_percent pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + matrix_with_allocation_config: Required[MatrixWithAllocationConfig] + """Configuration for matrix_with_allocation pricing""" + + model_type: Required[Literal["matrix_with_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfigTier( + TypedDict, total=False +): + """Configuration for a single tiered with proration tier""" + + tier_lower_bound: Required[str] + """Inclusive tier starting value""" + + unit_amount: Required[str] + """Amount per unit""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfig( + TypedDict, total=False +): + """Configuration for tiered_with_proration pricing""" + + tiers: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfigTier + ] + ] + """ + Tiers for rating based on total usage quantities into the specified tier with + proration + """ + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["tiered_with_proration"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_with_proration_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfig + ] + """Configuration for tiered_with_proration pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceUnitWithProrationConfig( + TypedDict, total=False +): + """Configuration for unit_with_proration pricing""" + + unit_amount: Required[str] + """Rate per unit of usage""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["unit_with_proration"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + unit_with_proration_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceUnitWithProrationConfig + ] + """Configuration for unit_with_proration pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceGroupedAllocationConfig( + TypedDict, total=False +): + """Configuration for grouped_allocation pricing""" + + allocation: Required[str] + """Usage allocation per group""" + + grouping_key: Required[str] + """How to determine the groups that should each be allocated some quantity""" + + overage_unit_rate: Required[str] + """Unit rate for post-allocation""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_allocation_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceGroupedAllocationConfig + ] + """Configuration for grouped_allocation pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfigTier( + TypedDict, total=False +): + """Configuration for a single bulk pricing tier with proration""" + + unit_amount: Required[str] + """Cost per unit""" + + tier_lower_bound: Optional[str] + """The lower bound for this tier""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfig( + TypedDict, total=False +): + """Configuration for bulk_with_proration pricing""" + + tiers: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfigTier + ] + ] + """Bulk tiers for rating based on total usage volume""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPrice(TypedDict, total=False): + bulk_with_proration_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfig + ] + """Configuration for bulk_with_proration pricing""" + + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["bulk_with_proration"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfig( + TypedDict, total=False +): + """Configuration for grouped_with_prorated_minimum pricing""" + + grouping_key: Required[str] + """How to determine the groups that should each have a minimum""" + + minimum: Required[str] + """The minimum amount to charge per group""" + + unit_rate: Required[str] + """The amount to charge per unit""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceConversionRateConfig: TypeAlias = ( + Union[UnitConversionRateConfig, TieredConversionRateConfig] +) + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_with_prorated_minimum_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfig + ] + """Configuration for grouped_with_prorated_minimum pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_with_prorated_minimum"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactor( + TypedDict, total=False +): + """Configuration for a scaling factor""" + + scaling_factor: Required[str] + + scaling_value: Required[str] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmount( + TypedDict, total=False +): + """Configuration for a unit amount""" + + pricing_value: Required[str] + + unit_amount: Required[str] + """Per unit amount""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfig( + TypedDict, total=False +): + """Configuration for grouped_with_metered_minimum pricing""" + + grouping_key: Required[str] + """Used to partition the usage into groups. + + The minimum amount is applied to each group. + """ + + minimum_unit_amount: Required[str] + """The minimum amount to charge per group per unit""" + + pricing_key: Required[str] + """Used to determine the unit rate""" + + scaling_factors: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactor + ] + ] + """Scale the unit rates by the scaling factor.""" + + scaling_key: Required[str] + """Used to determine the unit rate scaling factor""" + + unit_amounts: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmount + ] + ] + """Apply per unit pricing to each pricing value. + + The minimum amount is applied any unmatched usage. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceConversionRateConfig: TypeAlias = ( + Union[UnitConversionRateConfig, TieredConversionRateConfig] +) + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_with_metered_minimum_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfig + ] + """Configuration for grouped_with_metered_minimum pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_with_metered_minimum"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig( + TypedDict, total=False +): + """Configuration for grouped_with_min_max_thresholds pricing""" + + grouping_key: Required[str] + """The event property used to group before applying thresholds""" + + maximum_charge: Required[str] + """The maximum amount to charge each group""" + + minimum_charge: Required[str] + """The minimum amount to charge each group, regardless of usage""" + + per_unit_rate: Required[str] + """The base price charged per group""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_with_min_max_thresholds_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig + ] + """Configuration for grouped_with_min_max_thresholds pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceLicenseAllocation + ] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_with_min_max_thresholds"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmount( + TypedDict, total=False +): + """Configuration for a unit amount item""" + + dimension_value: Required[str] + """The dimension value""" + + display_name: Required[str] + """Display name for this dimension value""" + + unit_amount: Required[str] + """Per unit amount""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfig( + TypedDict, total=False +): + """Configuration for matrix_with_display_name pricing""" + + dimension: Required[str] + """Used to determine the unit rate""" + + unit_amounts: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmount + ] + ] + """Apply per unit pricing to each dimension value""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + matrix_with_display_name_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfig + ] + """Configuration for matrix_with_display_name pricing""" + + model_type: Required[Literal["matrix_with_display_name"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfigTier( + TypedDict, total=False +): + """Configuration for a single tier""" + + per_unit: Required[str] + """Per package""" + + tier_lower_bound: Required[str] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfig( + TypedDict, total=False +): + """Configuration for grouped_tiered_package pricing""" + + grouping_key: Required[str] + """The event property used to group before tiering""" + + package_size: Required[str] + + tiers: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfigTier + ] + ] + """Apply tiered pricing after rounding up the quantity to the package size. + + Tiers are defined using exclusive lower bounds. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_tiered_package_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfig + ] + """Configuration for grouped_tiered_package pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_tiered_package"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTier( + TypedDict, total=False +): + """Configuration for a single tier""" + + tier_lower_bound: Required[str] + + unit_amount: Required[str] + """Per unit amount""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfig( + TypedDict, total=False +): + """Configuration for max_group_tiered_package pricing""" + + grouping_key: Required[str] + """ + The event property used to group before tiering the group with the highest value + """ + + package_size: Required[str] + + tiers: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTier + ] + ] + """Apply tiered pricing to the largest group after grouping with the provided key.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + max_group_tiered_package_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfig + ] + """Configuration for max_group_tiered_package pricing""" + + model_type: Required[Literal["max_group_tiered_package"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactor( + TypedDict, total=False +): + """Configuration for a single matrix scaling factor""" + + first_dimension_value: Required[str] + + scaling_factor: Required[str] + + second_dimension_value: Optional[str] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfig( + TypedDict, total=False +): + """Configuration for scalable_matrix_with_unit_pricing pricing""" + + first_dimension: Required[str] + """Used to determine the unit rate""" + + matrix_scaling_factors: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactor + ] + ] + """Apply a scaling factor to each dimension""" + + unit_price: Required[str] + """The final unit price to rate against the output of the matrix""" + + grouping_key: Optional[str] + """The property used to group this price""" + + prorate: Optional[bool] + """If true, the unit price will be prorated to the billing period""" + + second_dimension: Optional[str] + """Used to determine the unit rate (optional)""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceLicenseAllocation + ] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["scalable_matrix_with_unit_pricing"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + scalable_matrix_with_unit_pricing_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfig + ] + """Configuration for scalable_matrix_with_unit_pricing pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. - property_value: Required[str] - """Event property value to match""" + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ -class AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigTier(TypedDict, total=False): - """Configuration for a single bulk pricing tier""" + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactor( + TypedDict, total=False +): + """Configuration for a single matrix scaling factor""" + + first_dimension_value: Required[str] + + scaling_factor: Required[str] + + second_dimension_value: Optional[str] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTier( + TypedDict, total=False +): + """Configuration for a single tier entry with business logic""" + + tier_lower_bound: Required[str] unit_amount: Required[str] - """Amount per unit""" - tier_lower_bound: Optional[str] - """The lower bound for this tier""" +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfig( + TypedDict, total=False +): + """Configuration for scalable_matrix_with_tiered_pricing pricing""" -class AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfig(TypedDict, total=False): - """Configuration for bulk_with_filters pricing""" + first_dimension: Required[str] + """Used for the scalable matrix first dimension""" - filters: Required[Iterable[AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigFilter]] - """Property filters to apply (all must match)""" + matrix_scaling_factors: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactor + ] + ] + """Apply a scaling factor to each dimension""" - tiers: Required[Iterable[AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigTier]] - """Bulk tiers for rating based on total usage volume""" + tiers: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTier + ] + ] + second_dimension: Optional[str] + """Used for the scalable matrix second dimension (optional)""" -AddPricePriceNewPlanBulkWithFiltersPriceConversionRateConfig: TypeAlias = Union[ + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceConversionRateConfig: TypeAlias = Union[ UnitConversionRateConfig, TieredConversionRateConfig ] -class AddPricePriceNewPlanBulkWithFiltersPrice(TypedDict, total=False): - bulk_with_filters_config: Required[AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfig] - """Configuration for bulk_with_filters pricing""" - +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPrice( + TypedDict, total=False +): cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] """The cadence to bill for this price on.""" item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["bulk_with_filters"]] + license_allocations: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceLicenseAllocation + ] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["scalable_matrix_with_tiered_pricing"]] """The pricing model type""" name: Required[str] """The name of the price.""" + scalable_matrix_with_tiered_pricing_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfig + ] + """Configuration for scalable_matrix_with_tiered_pricing pricing""" + billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -211,7 +8825,9 @@ class AddPricePriceNewPlanBulkWithFiltersPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" - conversion_rate_config: Optional[AddPricePriceNewPlanBulkWithFiltersPriceConversionRateConfig] + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceConversionRateConfig + ] """The configuration for the rate of the price currency to the invoicing currency.""" currency: Optional[str] @@ -258,47 +8874,81 @@ class AddPricePriceNewPlanBulkWithFiltersPrice(TypedDict, total=False): """ -class AddPricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier(TypedDict, total=False): - """Configuration for a single tiered with proration tier""" +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValue( + TypedDict, total=False +): + """Configuration for a dimension value entry""" + + grouping_key: Required[str] + """Grouping key value""" tier_lower_bound: Required[str] - """Inclusive tier starting value""" + """Tier lower bound""" unit_amount: Required[str] - """Amount per unit""" + """Unit amount for this combination""" -class AddPricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfig(TypedDict, total=False): - """Configuration for tiered_with_proration pricing""" +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig( + TypedDict, total=False +): + """Configuration for cumulative_grouped_bulk pricing""" - tiers: Required[Iterable[AddPricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier]] - """ - Tiers for rating based on total usage quantities into the specified tier with - proration - """ + dimension_values: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValue + ] + ] + """Each tier lower bound must have the same group of values.""" + group: Required[str] -AddPricePriceNewPlanTieredWithProrationPriceConversionRateConfig: TypeAlias = Union[ + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceConversionRateConfig: TypeAlias = Union[ UnitConversionRateConfig, TieredConversionRateConfig ] -class AddPricePriceNewPlanTieredWithProrationPrice(TypedDict, total=False): +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPrice(TypedDict, total=False): cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] """The cadence to bill for this price on.""" + cumulative_grouped_bulk_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig + ] + """Configuration for cumulative_grouped_bulk pricing""" + item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["tiered_with_proration"]] + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["cumulative_grouped_bulk"]] """The pricing model type""" name: Required[str] """The name of the price.""" - tiered_with_proration_config: Required[AddPricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfig] - """Configuration for tiered_with_proration pricing""" - billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -320,7 +8970,9 @@ class AddPricePriceNewPlanTieredWithProrationPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" - conversion_rate_config: Optional[AddPricePriceNewPlanTieredWithProrationPriceConversionRateConfig] + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceConversionRateConfig + ] """The configuration for the rate of the price currency to the invoicing currency.""" currency: Optional[str] @@ -367,40 +9019,66 @@ class AddPricePriceNewPlanTieredWithProrationPrice(TypedDict, total=False): """ -class AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig(TypedDict, total=False): - """Configuration for grouped_with_min_max_thresholds pricing""" +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig( + TypedDict, total=False +): + """Configuration for cumulative_grouped_allocation pricing""" + + cumulative_allocation: Required[str] + """The overall allocation across all groups""" + + group_allocation: Required[str] + """The allocation per individual group""" grouping_key: Required[str] - """The event property used to group before applying thresholds""" + """The event property used to group usage before applying allocations""" - maximum_charge: Required[str] - """The maximum amount to charge each group""" + unit_amount: Required[str] + """The amount to charge for each unit outside of the allocation""" - minimum_charge: Required[str] - """The minimum amount to charge each group, regardless of usage""" - per_unit_rate: Required[str] - """The base price charged per group""" +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + currency: Required[str] + """The currency of the license allocation.""" -AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig: TypeAlias = Union[ + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[ UnitConversionRateConfig, TieredConversionRateConfig ] -class AddPricePriceNewPlanGroupedWithMinMaxThresholdsPrice(TypedDict, total=False): +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPrice(TypedDict, total=False): cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] """The cadence to bill for this price on.""" - grouped_with_min_max_thresholds_config: Required[ - AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig + cumulative_grouped_allocation_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig ] - """Configuration for grouped_with_min_max_thresholds pricing""" + """Configuration for cumulative_grouped_allocation pricing""" item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["grouped_with_min_max_thresholds"]] + license_allocations: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceLicenseAllocation + ] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["cumulative_grouped_allocation"]] """The pricing model type""" name: Required[str] @@ -427,7 +9105,9 @@ class AddPricePriceNewPlanGroupedWithMinMaxThresholdsPrice(TypedDict, total=Fals conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" - conversion_rate_config: Optional[AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig] + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceConversionRateConfig + ] """The configuration for the rate of the price currency to the invoicing currency.""" currency: Optional[str] @@ -474,40 +9154,58 @@ class AddPricePriceNewPlanGroupedWithMinMaxThresholdsPrice(TypedDict, total=Fals """ -class AddPricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig(TypedDict, total=False): - """Configuration for cumulative_grouped_allocation pricing""" +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" - cumulative_allocation: Required[str] - """The overall allocation across all groups""" + currency: Required[str] + """The currency of the license allocation.""" - group_allocation: Required[str] - """The allocation per individual group""" + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" - grouping_key: Required[str] - """The event property used to group usage before applying allocations""" - unit_amount: Required[str] - """The amount to charge for each unit outside of the allocation""" +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceMinimumCompositeConfig( + TypedDict, total=False +): + """Configuration for minimum_composite pricing""" + minimum_amount: Required[str] + """The minimum amount to apply""" -AddPricePriceNewPlanCumulativeGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[ + prorated: bool + """If true, subtotals from this price are prorated based on the service period""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceConversionRateConfig: TypeAlias = Union[ UnitConversionRateConfig, TieredConversionRateConfig ] -class AddPricePriceNewPlanCumulativeGroupedAllocationPrice(TypedDict, total=False): +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePrice(TypedDict, total=False): cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] """The cadence to bill for this price on.""" - cumulative_grouped_allocation_config: Required[ - AddPricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig - ] - """Configuration for cumulative_grouped_allocation pricing""" - item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["cumulative_grouped_allocation"]] + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + minimum_composite_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceMinimumCompositeConfig + ] + """Configuration for minimum_composite pricing""" + + model_type: Required[Literal["minimum_composite"]] """The pricing model type""" name: Required[str] @@ -534,7 +9232,9 @@ class AddPricePriceNewPlanCumulativeGroupedAllocationPrice(TypedDict, total=Fals conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" - conversion_rate_config: Optional[AddPricePriceNewPlanCumulativeGroupedAllocationPriceConversionRateConfig] + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceConversionRateConfig + ] """The configuration for the rate of the price currency to the invoicing currency.""" currency: Optional[str] @@ -581,32 +9281,54 @@ class AddPricePriceNewPlanCumulativeGroupedAllocationPrice(TypedDict, total=Fals """ -class AddPricePriceNewPlanPercentCompositePricePercentConfig(TypedDict, total=False): +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePricePercentConfig(TypedDict, total=False): """Configuration for percent pricing""" percent: Required[float] """What percent of the component subtotals to charge""" -AddPricePriceNewPlanPercentCompositePriceConversionRateConfig: TypeAlias = Union[ +ReplacePriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceConversionRateConfig: TypeAlias = Union[ UnitConversionRateConfig, TieredConversionRateConfig ] -class AddPricePriceNewPlanPercentCompositePrice(TypedDict, total=False): +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePrice(TypedDict, total=False): cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] """The cadence to bill for this price on.""" item_id: Required[str] """The id of the item the price will be associated with.""" + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + model_type: Required[Literal["percent"]] """The pricing model type""" name: Required[str] """The name of the price.""" - percent_config: Required[AddPricePriceNewPlanPercentCompositePricePercentConfig] + percent_config: Required[ReplacePriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePricePercentConfig] """Configuration for percent pricing""" billable_metric_id: Optional[str] @@ -630,7 +9352,9 @@ class AddPricePriceNewPlanPercentCompositePrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" - conversion_rate_config: Optional[AddPricePriceNewPlanPercentCompositePriceConversionRateConfig] + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceConversionRateConfig + ] """The configuration for the rate of the price currency to the invoicing currency.""" currency: Optional[str] @@ -677,7 +9401,7 @@ class AddPricePriceNewPlanPercentCompositePrice(TypedDict, total=False): """ -class AddPricePriceNewPlanEventOutputPriceEventOutputConfig(TypedDict, total=False): +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceEventOutputConfig(TypedDict, total=False): """Configuration for event_output pricing""" unit_rating_key: Required[str] @@ -697,21 +9421,43 @@ class AddPricePriceNewPlanEventOutputPriceEventOutputConfig(TypedDict, total=Fal """ -AddPricePriceNewPlanEventOutputPriceConversionRateConfig: TypeAlias = Union[ +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceConversionRateConfig: TypeAlias = Union[ UnitConversionRateConfig, TieredConversionRateConfig ] -class AddPricePriceNewPlanEventOutputPrice(TypedDict, total=False): +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationEventOutputPrice(TypedDict, total=False): cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] """The cadence to bill for this price on.""" - event_output_config: Required[AddPricePriceNewPlanEventOutputPriceEventOutputConfig] + event_output_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceEventOutputConfig + ] """Configuration for event_output pricing""" item_id: Required[str] """The id of the item the price will be associated with.""" + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + model_type: Required[Literal["event_output"]] """The pricing model type""" @@ -739,7 +9485,9 @@ class AddPricePriceNewPlanEventOutputPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" - conversion_rate_config: Optional[AddPricePriceNewPlanEventOutputPriceConversionRateConfig] + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceConversionRateConfig + ] """The configuration for the rate of the price currency to the invoicing currency.""" currency: Optional[str] @@ -786,84 +9534,41 @@ class AddPricePriceNewPlanEventOutputPrice(TypedDict, total=False): """ -AddPricePrice: TypeAlias = Union[ - NewPlanUnitPrice, - NewPlanTieredPrice, - NewPlanBulkPrice, - AddPricePriceNewPlanBulkWithFiltersPrice, - NewPlanPackagePrice, - NewPlanMatrixPrice, - NewPlanThresholdTotalAmountPrice, - NewPlanTieredPackagePrice, - NewPlanTieredWithMinimumPrice, - NewPlanGroupedTieredPrice, - NewPlanTieredPackageWithMinimumPrice, - NewPlanPackageWithAllocationPrice, - NewPlanUnitWithPercentPrice, - NewPlanMatrixWithAllocationPrice, - AddPricePriceNewPlanTieredWithProrationPrice, - NewPlanUnitWithProrationPrice, - NewPlanGroupedAllocationPrice, - NewPlanBulkWithProrationPrice, - NewPlanGroupedWithProratedMinimumPrice, - NewPlanGroupedWithMeteredMinimumPrice, - AddPricePriceNewPlanGroupedWithMinMaxThresholdsPrice, - NewPlanMatrixWithDisplayNamePrice, - NewPlanGroupedTieredPackagePrice, - NewPlanMaxGroupTieredPackagePrice, - NewPlanScalableMatrixWithUnitPricingPrice, - NewPlanScalableMatrixWithTieredPricingPrice, - NewPlanCumulativeGroupedBulkPrice, - AddPricePriceNewPlanCumulativeGroupedAllocationPrice, - NewPlanMinimumCompositePrice, - AddPricePriceNewPlanPercentCompositePrice, - AddPricePriceNewPlanEventOutputPrice, -] - - -class AddPrice(TypedDict, total=False): - allocation_price: Optional[NewAllocationPrice] - """The allocation price to add to the plan.""" - - plan_phase_order: Optional[int] - """The phase to add this price to.""" - - price: Optional[AddPricePrice] - """New plan price request body params.""" - - -class RemoveAdjustment(TypedDict, total=False): - adjustment_id: Required[str] - """The id of the adjustment to remove from on the plan.""" - - plan_phase_order: Optional[int] - """The phase to remove this adjustment from.""" - - -class RemovePrice(TypedDict, total=False): - price_id: Required[str] - """The id of the price to remove from the plan.""" - - plan_phase_order: Optional[int] - """The phase to remove this price from.""" - - -ReplaceAdjustmentAdjustment: TypeAlias = Union[ - NewPercentageDiscount, NewUsageDiscount, NewAmountDiscount, NewMinimum, NewMaximum +ReplacePriceLicenseAllocationPrice: TypeAlias = Union[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackagePrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationEventOutputPrice, ] -class ReplaceAdjustment(TypedDict, total=False): - adjustment: Required[ReplaceAdjustmentAdjustment] - """The definition of a new adjustment to create and add to the plan.""" - - replaces_adjustment_id: Required[str] - """The id of the adjustment on the plan to replace in the plan.""" - - plan_phase_order: Optional[int] - """The phase to replace this adjustment from.""" - - class ReplacePricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigFilter(TypedDict, total=False): """Configuration for a single property filter""" @@ -1553,6 +10258,9 @@ class ReplacePrice(TypedDict, total=False): allocation_price: Optional[NewAllocationPrice] """The allocation price to add to the plan.""" + license_allocation_price: Optional[ReplacePriceLicenseAllocationPrice] + """The license allocation price to add to the plan.""" + plan_phase_order: Optional[int] """The phase to replace this price from.""" diff --git a/src/orb/types/beta_create_plan_version_params.py b/src/orb/types/beta_create_plan_version_params.py index 813cbba0..75b96c24 100644 --- a/src/orb/types/beta_create_plan_version_params.py +++ b/src/orb/types/beta_create_plan_version_params.py @@ -5,8 +5,13 @@ from typing import Dict, Union, Iterable, Optional from typing_extensions import Literal, Required, TypeAlias, TypedDict +from .shared_params.bulk_config import BulkConfig from .shared_params.new_maximum import NewMaximum from .shared_params.new_minimum import NewMinimum +from .shared_params.unit_config import UnitConfig +from .shared_params.matrix_config import MatrixConfig +from .shared_params.tiered_config import TieredConfig +from .shared_params.package_config import PackageConfig from .shared_params.new_usage_discount import NewUsageDiscount from .shared_params.new_amount_discount import NewAmountDiscount from .shared_params.new_plan_bulk_price import NewPlanBulkPrice @@ -17,6 +22,7 @@ from .shared_params.new_plan_package_price import NewPlanPackagePrice from .shared_params.new_percentage_discount import NewPercentageDiscount from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig +from .shared_params.matrix_with_allocation_config import MatrixWithAllocationConfig from .shared_params.new_plan_grouped_tiered_price import NewPlanGroupedTieredPrice from .shared_params.new_plan_tiered_package_price import NewPlanTieredPackagePrice from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig @@ -48,6 +54,143 @@ "AddAdjustment", "AddAdjustmentAdjustment", "AddPrice", + "AddPriceLicenseAllocationPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationUnitPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationUnitPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationUnitPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigFilter", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigTier", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationPackagePrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationPackagePriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationPackagePriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTable", + "AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfigTier", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfigTier", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfigTier", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTier", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPricePackageWithAllocationConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceUnitWithPercentConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfigTier", + "AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceUnitWithProrationConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceGroupedAllocationConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfigTier", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactor", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmount", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmount", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfigTier", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTier", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactor", + "AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactor", + "AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTier", + "AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValue", + "AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceMinimumCompositeConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePricePercentConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceConversionRateConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationEventOutputPrice", + "AddPriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceEventOutputConfig", + "AddPriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceLicenseAllocation", + "AddPriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceConversionRateConfig", "AddPricePrice", "AddPricePriceNewPlanBulkWithFiltersPrice", "AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfig", @@ -75,6 +218,143 @@ "ReplaceAdjustment", "ReplaceAdjustmentAdjustment", "ReplacePrice", + "ReplacePriceLicenseAllocationPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigFilter", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigTier", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackagePrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackagePriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackagePriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTable", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfigTier", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfigTier", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfigTier", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTier", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPricePackageWithAllocationConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceUnitWithPercentConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfigTier", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceUnitWithProrationConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceGroupedAllocationConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfigTier", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactor", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmount", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmount", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfigTier", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTier", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactor", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactor", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTier", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValue", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceMinimumCompositeConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePricePercentConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceConversionRateConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationEventOutputPrice", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceEventOutputConfig", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceLicenseAllocation", + "ReplacePriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceConversionRateConfig", "ReplacePricePrice", "ReplacePricePriceNewPlanBulkWithFiltersPrice", "ReplacePricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfig", @@ -139,57 +419,8391 @@ class AddAdjustment(TypedDict, total=False): """The phase to add this adjustment to.""" +class AddPriceLicenseAllocationPriceNewLicenseAllocationUnitPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationUnitPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationUnitPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationUnitPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["unit"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + unit_config: Required[UnitConfig] + """Configuration for unit pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPriceLicenseAllocationPriceNewLicenseAllocationUnitPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["tiered"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_config: Required[TieredConfig] + """Configuration for tiered pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationBulkPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationBulkPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationBulkPrice(TypedDict, total=False): + bulk_config: Required[BulkConfig] + """Configuration for bulk pricing""" + + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationBulkPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["bulk"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPriceLicenseAllocationPriceNewLicenseAllocationBulkPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigFilter( + TypedDict, total=False +): + """Configuration for a single property filter""" + + property_key: Required[str] + """Event property key to filter on""" + + property_value: Required[str] + """Event property value to match""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigTier( + TypedDict, total=False +): + """Configuration for a single bulk pricing tier""" + + unit_amount: Required[str] + """Amount per unit""" + + tier_lower_bound: Optional[str] + """The lower bound for this tier""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfig( + TypedDict, total=False +): + """Configuration for bulk_with_filters pricing""" + + filters: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigFilter] + ] + """Property filters to apply (all must match)""" + + tiers: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigTier] + ] + """Bulk tiers for rating based on total usage volume""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPrice(TypedDict, total=False): + bulk_with_filters_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfig + ] + """Configuration for bulk_with_filters pricing""" + + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["bulk_with_filters"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationPackagePriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationPackagePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationPackagePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["package"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + package_config: Required[PackageConfig] + """Configuration for package pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPriceLicenseAllocationPriceNewLicenseAllocationPackagePriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + matrix_config: Required[MatrixConfig] + """Configuration for matrix pricing""" + + model_type: Required[Literal["matrix"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTable( + TypedDict, total=False +): + """Configuration for a single threshold""" + + threshold: Required[str] + + total_amount: Required[str] + """Total amount for this threshold""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfig( + TypedDict, total=False +): + """Configuration for threshold_total_amount pricing""" + + consumption_table: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTable + ] + ] + """ + When the quantity consumed passes a provided threshold, the configured total + will be charged + """ + + prorate: Optional[bool] + """If true, the unit price will be prorated to the billing period""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["threshold_total_amount"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + threshold_total_amount_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfig + ] + """Configuration for threshold_total_amount pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfigTier( + TypedDict, total=False +): + """Configuration for a single tier with business logic""" + + per_unit: Required[str] + """Price per package""" + + tier_lower_bound: Required[str] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfig(TypedDict, total=False): + """Configuration for tiered_package pricing""" + + package_size: Required[str] + + tiers: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfigTier] + ] + """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. + """ + + +AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["tiered_package"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_package_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfig + ] + """Configuration for tiered_package pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfigTier( + TypedDict, total=False +): + """Configuration for a single tier""" + + minimum_amount: Required[str] + + tier_lower_bound: Required[str] + + unit_amount: Required[str] + """Per unit amount""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfig( + TypedDict, total=False +): + """Configuration for tiered_with_minimum pricing""" + + tiers: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfigTier] + ] + """Tiered pricing with a minimum amount dependent on the volume tier. + + Tiers are defined using exclusive lower bounds. + """ + + hide_zero_amount_tiers: bool + """If true, tiers with an accrued amount of 0 will not be included in the rating.""" + + prorate: bool + """If true, the unit price will be prorated to the billing period""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["tiered_with_minimum"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_with_minimum_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfig + ] + """Configuration for tiered_with_minimum pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfigTier( + TypedDict, total=False +): + """Configuration for a single tier""" + + tier_lower_bound: Required[str] + + unit_amount: Required[str] + """Per unit amount""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfig(TypedDict, total=False): + """Configuration for grouped_tiered pricing""" + + grouping_key: Required[str] + """The billable metric property used to group before tiering""" + + tiers: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfigTier] + ] + """ + Apply tiered pricing to each segment generated after grouping with the provided + key + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_tiered_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfig + ] + """Configuration for grouped_tiered pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_tiered"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTier( + TypedDict, total=False +): + """Configuration for a single tier""" + + minimum_amount: Required[str] + + per_unit: Required[str] + + tier_lower_bound: Required[str] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfig( + TypedDict, total=False +): + """Configuration for tiered_package_with_minimum pricing""" + + package_size: Required[float] + + tiers: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTier + ] + ] + """Apply tiered pricing after rounding up the quantity to the package size. + + Tiers are defined using exclusive lower bounds. + """ + + +AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["tiered_package_with_minimum"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_package_with_minimum_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfig + ] + """Configuration for tiered_package_with_minimum pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPricePackageWithAllocationConfig( + TypedDict, total=False +): + """Configuration for package_with_allocation pricing""" + + allocation: Required[str] + + package_amount: Required[str] + + package_size: Required[str] + + +AddPriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["package_with_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + package_with_allocation_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPricePackageWithAllocationConfig + ] + """Configuration for package_with_allocation pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceUnitWithPercentConfig( + TypedDict, total=False +): + """Configuration for unit_with_percent pricing""" + + percent: Required[str] + """What percent, out of 100, of the calculated total to charge""" + + unit_amount: Required[str] + """Rate per unit of usage""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["unit_with_percent"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + unit_with_percent_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceUnitWithPercentConfig + ] + """Configuration for unit_with_percent pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + matrix_with_allocation_config: Required[MatrixWithAllocationConfig] + """Configuration for matrix_with_allocation pricing""" + + model_type: Required[Literal["matrix_with_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfigTier( + TypedDict, total=False +): + """Configuration for a single tiered with proration tier""" + + tier_lower_bound: Required[str] + """Inclusive tier starting value""" + + unit_amount: Required[str] + """Amount per unit""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfig( + TypedDict, total=False +): + """Configuration for tiered_with_proration pricing""" + + tiers: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfigTier + ] + ] + """ + Tiers for rating based on total usage quantities into the specified tier with + proration + """ + + +AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["tiered_with_proration"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_with_proration_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfig + ] + """Configuration for tiered_with_proration pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceUnitWithProrationConfig( + TypedDict, total=False +): + """Configuration for unit_with_proration pricing""" + + unit_amount: Required[str] + """Rate per unit of usage""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["unit_with_proration"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + unit_with_proration_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceUnitWithProrationConfig + ] + """Configuration for unit_with_proration pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceGroupedAllocationConfig( + TypedDict, total=False +): + """Configuration for grouped_allocation pricing""" + + allocation: Required[str] + """Usage allocation per group""" + + grouping_key: Required[str] + """How to determine the groups that should each be allocated some quantity""" + + overage_unit_rate: Required[str] + """Unit rate for post-allocation""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_allocation_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceGroupedAllocationConfig + ] + """Configuration for grouped_allocation pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfigTier( + TypedDict, total=False +): + """Configuration for a single bulk pricing tier with proration""" + + unit_amount: Required[str] + """Cost per unit""" + + tier_lower_bound: Optional[str] + """The lower bound for this tier""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfig( + TypedDict, total=False +): + """Configuration for bulk_with_proration pricing""" + + tiers: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfigTier] + ] + """Bulk tiers for rating based on total usage volume""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPrice(TypedDict, total=False): + bulk_with_proration_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfig + ] + """Configuration for bulk_with_proration pricing""" + + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["bulk_with_proration"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfig( + TypedDict, total=False +): + """Configuration for grouped_with_prorated_minimum pricing""" + + grouping_key: Required[str] + """How to determine the groups that should each have a minimum""" + + minimum: Required[str] + """The minimum amount to charge per group""" + + unit_rate: Required[str] + """The amount to charge per unit""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceConversionRateConfig: TypeAlias = ( + Union[UnitConversionRateConfig, TieredConversionRateConfig] +) + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_with_prorated_minimum_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfig + ] + """Configuration for grouped_with_prorated_minimum pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_with_prorated_minimum"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactor( + TypedDict, total=False +): + """Configuration for a scaling factor""" + + scaling_factor: Required[str] + + scaling_value: Required[str] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmount( + TypedDict, total=False +): + """Configuration for a unit amount""" + + pricing_value: Required[str] + + unit_amount: Required[str] + """Per unit amount""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfig( + TypedDict, total=False +): + """Configuration for grouped_with_metered_minimum pricing""" + + grouping_key: Required[str] + """Used to partition the usage into groups. + + The minimum amount is applied to each group. + """ + + minimum_unit_amount: Required[str] + """The minimum amount to charge per group per unit""" + + pricing_key: Required[str] + """Used to determine the unit rate""" + + scaling_factors: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactor + ] + ] + """Scale the unit rates by the scaling factor.""" + + scaling_key: Required[str] + """Used to determine the unit rate scaling factor""" + + unit_amounts: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmount + ] + ] + """Apply per unit pricing to each pricing value. + + The minimum amount is applied any unmatched usage. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_with_metered_minimum_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfig + ] + """Configuration for grouped_with_metered_minimum pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_with_metered_minimum"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig( + TypedDict, total=False +): + """Configuration for grouped_with_min_max_thresholds pricing""" + + grouping_key: Required[str] + """The event property used to group before applying thresholds""" + + maximum_charge: Required[str] + """The maximum amount to charge each group""" + + minimum_charge: Required[str] + """The minimum amount to charge each group, regardless of usage""" + + per_unit_rate: Required[str] + """The base price charged per group""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceConversionRateConfig: TypeAlias = ( + Union[UnitConversionRateConfig, TieredConversionRateConfig] +) + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_with_min_max_thresholds_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig + ] + """Configuration for grouped_with_min_max_thresholds pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_with_min_max_thresholds"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmount( + TypedDict, total=False +): + """Configuration for a unit amount item""" + + dimension_value: Required[str] + """The dimension value""" + + display_name: Required[str] + """Display name for this dimension value""" + + unit_amount: Required[str] + """Per unit amount""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfig( + TypedDict, total=False +): + """Configuration for matrix_with_display_name pricing""" + + dimension: Required[str] + """Used to determine the unit rate""" + + unit_amounts: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmount + ] + ] + """Apply per unit pricing to each dimension value""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + matrix_with_display_name_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfig + ] + """Configuration for matrix_with_display_name pricing""" + + model_type: Required[Literal["matrix_with_display_name"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfigTier( + TypedDict, total=False +): + """Configuration for a single tier""" + + per_unit: Required[str] + """Per package""" + + tier_lower_bound: Required[str] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfig( + TypedDict, total=False +): + """Configuration for grouped_tiered_package pricing""" + + grouping_key: Required[str] + """The event property used to group before tiering""" + + package_size: Required[str] + + tiers: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfigTier + ] + ] + """Apply tiered pricing after rounding up the quantity to the package size. + + Tiers are defined using exclusive lower bounds. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_tiered_package_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfig + ] + """Configuration for grouped_tiered_package pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_tiered_package"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTier( + TypedDict, total=False +): + """Configuration for a single tier""" + + tier_lower_bound: Required[str] + + unit_amount: Required[str] + """Per unit amount""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfig( + TypedDict, total=False +): + """Configuration for max_group_tiered_package pricing""" + + grouping_key: Required[str] + """ + The event property used to group before tiering the group with the highest value + """ + + package_size: Required[str] + + tiers: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTier + ] + ] + """Apply tiered pricing to the largest group after grouping with the provided key.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + max_group_tiered_package_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfig + ] + """Configuration for max_group_tiered_package pricing""" + + model_type: Required[Literal["max_group_tiered_package"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactor( + TypedDict, total=False +): + """Configuration for a single matrix scaling factor""" + + first_dimension_value: Required[str] + + scaling_factor: Required[str] + + second_dimension_value: Optional[str] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfig( + TypedDict, total=False +): + """Configuration for scalable_matrix_with_unit_pricing pricing""" + + first_dimension: Required[str] + """Used to determine the unit rate""" + + matrix_scaling_factors: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactor + ] + ] + """Apply a scaling factor to each dimension""" + + unit_price: Required[str] + """The final unit price to rate against the output of the matrix""" + + grouping_key: Optional[str] + """The property used to group this price""" + + prorate: Optional[bool] + """If true, the unit price will be prorated to the billing period""" + + second_dimension: Optional[str] + """Used to determine the unit rate (optional)""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceConversionRateConfig: TypeAlias = ( + Union[UnitConversionRateConfig, TieredConversionRateConfig] +) + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["scalable_matrix_with_unit_pricing"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + scalable_matrix_with_unit_pricing_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfig + ] + """Configuration for scalable_matrix_with_unit_pricing pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactor( + TypedDict, total=False +): + """Configuration for a single matrix scaling factor""" + + first_dimension_value: Required[str] + + scaling_factor: Required[str] + + second_dimension_value: Optional[str] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTier( + TypedDict, total=False +): + """Configuration for a single tier entry with business logic""" + + tier_lower_bound: Required[str] + + unit_amount: Required[str] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfig( + TypedDict, total=False +): + """Configuration for scalable_matrix_with_tiered_pricing pricing""" + + first_dimension: Required[str] + """Used for the scalable matrix first dimension""" + + matrix_scaling_factors: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactor + ] + ] + """Apply a scaling factor to each dimension""" + + tiers: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTier + ] + ] + + second_dimension: Optional[str] + """Used for the scalable matrix second dimension (optional)""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceLicenseAllocation + ] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["scalable_matrix_with_tiered_pricing"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + scalable_matrix_with_tiered_pricing_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfig + ] + """Configuration for scalable_matrix_with_tiered_pricing pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValue( + TypedDict, total=False +): + """Configuration for a dimension value entry""" + + grouping_key: Required[str] + """Grouping key value""" + + tier_lower_bound: Required[str] + """Tier lower bound""" + + unit_amount: Required[str] + """Unit amount for this combination""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig( + TypedDict, total=False +): + """Configuration for cumulative_grouped_bulk pricing""" + + dimension_values: Required[ + Iterable[ + AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValue + ] + ] + """Each tier lower bound must have the same group of values.""" + + group: Required[str] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + cumulative_grouped_bulk_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig + ] + """Configuration for cumulative_grouped_bulk pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["cumulative_grouped_bulk"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig( + TypedDict, total=False +): + """Configuration for cumulative_grouped_allocation pricing""" + + cumulative_allocation: Required[str] + """The overall allocation across all groups""" + + group_allocation: Required[str] + """The allocation per individual group""" + + grouping_key: Required[str] + """The event property used to group usage before applying allocations""" + + unit_amount: Required[str] + """The amount to charge for each unit outside of the allocation""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceConversionRateConfig: TypeAlias = ( + Union[UnitConversionRateConfig, TieredConversionRateConfig] +) + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + cumulative_grouped_allocation_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig + ] + """Configuration for cumulative_grouped_allocation pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["cumulative_grouped_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceMinimumCompositeConfig( + TypedDict, total=False +): + """Configuration for minimum_composite pricing""" + + minimum_amount: Required[str] + """The minimum amount to apply""" + + prorated: bool + """If true, subtotals from this price are prorated based on the service period""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + minimum_composite_config: Required[ + AddPriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceMinimumCompositeConfig + ] + """Configuration for minimum_composite pricing""" + + model_type: Required[Literal["minimum_composite"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePricePercentConfig(TypedDict, total=False): + """Configuration for percent pricing""" + + percent: Required[float] + """What percent of the component subtotals to charge""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["percent"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + percent_config: Required[AddPriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePricePercentConfig] + """Configuration for percent pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceEventOutputConfig(TypedDict, total=False): + """Configuration for event_output pricing""" + + unit_rating_key: Required[str] + """The key in the event data to extract the unit rate from.""" + + default_unit_rate: Optional[str] + """ + 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. + """ + + grouping_key: Optional[str] + """An optional key in the event data to group by (e.g., event ID). + + All events will also be grouped by their unit rate. + """ + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +AddPriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceLicenseAllocationPriceNewLicenseAllocationEventOutputPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + event_output_config: Required[AddPriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceEventOutputConfig] + """Configuration for event_output pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[AddPriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["event_output"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + AddPriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +AddPriceLicenseAllocationPrice: TypeAlias = Union[ + AddPriceLicenseAllocationPriceNewLicenseAllocationUnitPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationBulkPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationPackagePrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePrice, + AddPriceLicenseAllocationPriceNewLicenseAllocationEventOutputPrice, +] + + class AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigFilter(TypedDict, total=False): """Configuration for a single property filter""" - property_key: Required[str] - """Event property key to filter on""" + property_key: Required[str] + """Event property key to filter on""" + + property_value: Required[str] + """Event property value to match""" + + +class AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigTier(TypedDict, total=False): + """Configuration for a single bulk pricing tier""" + + unit_amount: Required[str] + """Amount per unit""" + + tier_lower_bound: Optional[str] + """The lower bound for this tier""" + + +class AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfig(TypedDict, total=False): + """Configuration for bulk_with_filters pricing""" + + filters: Required[Iterable[AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigFilter]] + """Property filters to apply (all must match)""" + + tiers: Required[Iterable[AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigTier]] + """Bulk tiers for rating based on total usage volume""" + + +AddPricePriceNewPlanBulkWithFiltersPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPricePriceNewPlanBulkWithFiltersPrice(TypedDict, total=False): + bulk_with_filters_config: Required[AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfig] + """Configuration for bulk_with_filters pricing""" + + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["bulk_with_filters"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPricePriceNewPlanBulkWithFiltersPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier(TypedDict, total=False): + """Configuration for a single tiered with proration tier""" + + tier_lower_bound: Required[str] + """Inclusive tier starting value""" + + unit_amount: Required[str] + """Amount per unit""" + + +class AddPricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfig(TypedDict, total=False): + """Configuration for tiered_with_proration pricing""" + + tiers: Required[Iterable[AddPricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier]] + """ + Tiers for rating based on total usage quantities into the specified tier with + proration + """ + + +AddPricePriceNewPlanTieredWithProrationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPricePriceNewPlanTieredWithProrationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["tiered_with_proration"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_with_proration_config: Required[AddPricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfig] + """Configuration for tiered_with_proration pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPricePriceNewPlanTieredWithProrationPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig(TypedDict, total=False): + """Configuration for grouped_with_min_max_thresholds pricing""" + + grouping_key: Required[str] + """The event property used to group before applying thresholds""" + + maximum_charge: Required[str] + """The maximum amount to charge each group""" + + minimum_charge: Required[str] + """The minimum amount to charge each group, regardless of usage""" + + per_unit_rate: Required[str] + """The base price charged per group""" + + +AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPricePriceNewPlanGroupedWithMinMaxThresholdsPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_with_min_max_thresholds_config: Required[ + AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig + ] + """Configuration for grouped_with_min_max_thresholds pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_with_min_max_thresholds"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig(TypedDict, total=False): + """Configuration for cumulative_grouped_allocation pricing""" + + cumulative_allocation: Required[str] + """The overall allocation across all groups""" + + group_allocation: Required[str] + """The allocation per individual group""" + + grouping_key: Required[str] + """The event property used to group usage before applying allocations""" + + unit_amount: Required[str] + """The amount to charge for each unit outside of the allocation""" + + +AddPricePriceNewPlanCumulativeGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPricePriceNewPlanCumulativeGroupedAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + cumulative_grouped_allocation_config: Required[ + AddPricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig + ] + """Configuration for cumulative_grouped_allocation pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["cumulative_grouped_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPricePriceNewPlanCumulativeGroupedAllocationPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPricePriceNewPlanPercentCompositePricePercentConfig(TypedDict, total=False): + """Configuration for percent pricing""" + + percent: Required[float] + """What percent of the component subtotals to charge""" + + +AddPricePriceNewPlanPercentCompositePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPricePriceNewPlanPercentCompositePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["percent"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + percent_config: Required[AddPricePriceNewPlanPercentCompositePricePercentConfig] + """Configuration for percent pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPricePriceNewPlanPercentCompositePriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class AddPricePriceNewPlanEventOutputPriceEventOutputConfig(TypedDict, total=False): + """Configuration for event_output pricing""" + + unit_rating_key: Required[str] + """The key in the event data to extract the unit rate from.""" + + default_unit_rate: Optional[str] + """ + 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. + """ + + grouping_key: Optional[str] + """An optional key in the event data to group by (e.g., event ID). + + All events will also be grouped by their unit rate. + """ + + +AddPricePriceNewPlanEventOutputPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPricePriceNewPlanEventOutputPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + event_output_config: Required[AddPricePriceNewPlanEventOutputPriceEventOutputConfig] + """Configuration for event_output pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["event_output"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPricePriceNewPlanEventOutputPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +AddPricePrice: TypeAlias = Union[ + NewPlanUnitPrice, + NewPlanTieredPrice, + NewPlanBulkPrice, + AddPricePriceNewPlanBulkWithFiltersPrice, + NewPlanPackagePrice, + NewPlanMatrixPrice, + NewPlanThresholdTotalAmountPrice, + NewPlanTieredPackagePrice, + NewPlanTieredWithMinimumPrice, + NewPlanGroupedTieredPrice, + NewPlanTieredPackageWithMinimumPrice, + NewPlanPackageWithAllocationPrice, + NewPlanUnitWithPercentPrice, + NewPlanMatrixWithAllocationPrice, + AddPricePriceNewPlanTieredWithProrationPrice, + NewPlanUnitWithProrationPrice, + NewPlanGroupedAllocationPrice, + NewPlanBulkWithProrationPrice, + NewPlanGroupedWithProratedMinimumPrice, + NewPlanGroupedWithMeteredMinimumPrice, + AddPricePriceNewPlanGroupedWithMinMaxThresholdsPrice, + NewPlanMatrixWithDisplayNamePrice, + NewPlanGroupedTieredPackagePrice, + NewPlanMaxGroupTieredPackagePrice, + NewPlanScalableMatrixWithUnitPricingPrice, + NewPlanScalableMatrixWithTieredPricingPrice, + NewPlanCumulativeGroupedBulkPrice, + AddPricePriceNewPlanCumulativeGroupedAllocationPrice, + NewPlanMinimumCompositePrice, + AddPricePriceNewPlanPercentCompositePrice, + AddPricePriceNewPlanEventOutputPrice, +] + + +class AddPrice(TypedDict, total=False): + allocation_price: Optional[NewAllocationPrice] + """The allocation price to add to the plan.""" + + license_allocation_price: Optional[AddPriceLicenseAllocationPrice] + """The license allocation price to add to the plan.""" + + plan_phase_order: Optional[int] + """The phase to add this price to.""" + + price: Optional[AddPricePrice] + """New plan price request body params.""" + + +class RemoveAdjustment(TypedDict, total=False): + adjustment_id: Required[str] + """The id of the adjustment to remove from on the plan.""" + + plan_phase_order: Optional[int] + """The phase to remove this adjustment from.""" + + +class RemovePrice(TypedDict, total=False): + price_id: Required[str] + """The id of the price to remove from the plan.""" + + plan_phase_order: Optional[int] + """The phase to remove this price from.""" + + +ReplaceAdjustmentAdjustment: TypeAlias = Union[ + NewPercentageDiscount, NewUsageDiscount, NewAmountDiscount, NewMinimum, NewMaximum +] + + +class ReplaceAdjustment(TypedDict, total=False): + adjustment: Required[ReplaceAdjustmentAdjustment] + """The definition of a new adjustment to create and add to the plan.""" + + replaces_adjustment_id: Required[str] + """The id of the adjustment on the plan to replace in the plan.""" + + plan_phase_order: Optional[int] + """The phase to replace this adjustment from.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["unit"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + unit_config: Required[UnitConfig] + """Configuration for unit pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["tiered"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_config: Required[TieredConfig] + """Configuration for tiered pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkPrice(TypedDict, total=False): + bulk_config: Required[BulkConfig] + """Configuration for bulk pricing""" + + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["bulk"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigFilter( + TypedDict, total=False +): + """Configuration for a single property filter""" + + property_key: Required[str] + """Event property key to filter on""" + + property_value: Required[str] + """Event property value to match""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigTier( + TypedDict, total=False +): + """Configuration for a single bulk pricing tier""" + + unit_amount: Required[str] + """Amount per unit""" + + tier_lower_bound: Optional[str] + """The lower bound for this tier""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfig( + TypedDict, total=False +): + """Configuration for bulk_with_filters pricing""" + + filters: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigFilter] + ] + """Property filters to apply (all must match)""" + + tiers: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigTier] + ] + """Bulk tiers for rating based on total usage volume""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPrice(TypedDict, total=False): + bulk_with_filters_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfig + ] + """Configuration for bulk_with_filters pricing""" + + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["bulk_with_filters"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackagePriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackagePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackagePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["package"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + package_config: Required[PackageConfig] + """Configuration for package pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackagePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + matrix_config: Required[MatrixConfig] + """Configuration for matrix pricing""" + + model_type: Required[Literal["matrix"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTable( + TypedDict, total=False +): + """Configuration for a single threshold""" + + threshold: Required[str] + + total_amount: Required[str] + """Total amount for this threshold""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfig( + TypedDict, total=False +): + """Configuration for threshold_total_amount pricing""" + + consumption_table: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTable + ] + ] + """ + When the quantity consumed passes a provided threshold, the configured total + will be charged + """ + + prorate: Optional[bool] + """If true, the unit price will be prorated to the billing period""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["threshold_total_amount"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + threshold_total_amount_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfig + ] + """Configuration for threshold_total_amount pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfigTier( + TypedDict, total=False +): + """Configuration for a single tier with business logic""" + + per_unit: Required[str] + """Price per package""" + + tier_lower_bound: Required[str] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfig( + TypedDict, total=False +): + """Configuration for tiered_package pricing""" + + package_size: Required[str] + + tiers: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfigTier] + ] + """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. + """ + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["tiered_package"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_package_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfig + ] + """Configuration for tiered_package pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfigTier( + TypedDict, total=False +): + """Configuration for a single tier""" + + minimum_amount: Required[str] + + tier_lower_bound: Required[str] + + unit_amount: Required[str] + """Per unit amount""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfig( + TypedDict, total=False +): + """Configuration for tiered_with_minimum pricing""" + + tiers: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfigTier + ] + ] + """Tiered pricing with a minimum amount dependent on the volume tier. + + Tiers are defined using exclusive lower bounds. + """ + + hide_zero_amount_tiers: bool + """If true, tiers with an accrued amount of 0 will not be included in the rating.""" + + prorate: bool + """If true, the unit price will be prorated to the billing period""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["tiered_with_minimum"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_with_minimum_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfig + ] + """Configuration for tiered_with_minimum pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfigTier( + TypedDict, total=False +): + """Configuration for a single tier""" + + tier_lower_bound: Required[str] + + unit_amount: Required[str] + """Per unit amount""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfig( + TypedDict, total=False +): + """Configuration for grouped_tiered pricing""" + + grouping_key: Required[str] + """The billable metric property used to group before tiering""" + + tiers: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfigTier] + ] + """ + Apply tiered pricing to each segment generated after grouping with the provided + key + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_tiered_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfig + ] + """Configuration for grouped_tiered pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_tiered"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTier( + TypedDict, total=False +): + """Configuration for a single tier""" + + minimum_amount: Required[str] + + per_unit: Required[str] + + tier_lower_bound: Required[str] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfig( + TypedDict, total=False +): + """Configuration for tiered_package_with_minimum pricing""" + + package_size: Required[float] + + tiers: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTier + ] + ] + """Apply tiered pricing after rounding up the quantity to the package size. + + Tiers are defined using exclusive lower bounds. + """ + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceConversionRateConfig: TypeAlias = ( + Union[UnitConversionRateConfig, TieredConversionRateConfig] +) + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["tiered_package_with_minimum"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_package_with_minimum_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfig + ] + """Configuration for tiered_package_with_minimum pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPricePackageWithAllocationConfig( + TypedDict, total=False +): + """Configuration for package_with_allocation pricing""" + + allocation: Required[str] + + package_amount: Required[str] + + package_size: Required[str] + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["package_with_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + package_with_allocation_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPricePackageWithAllocationConfig + ] + """Configuration for package_with_allocation pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceUnitWithPercentConfig( + TypedDict, total=False +): + """Configuration for unit_with_percent pricing""" + + percent: Required[str] + """What percent, out of 100, of the calculated total to charge""" + + unit_amount: Required[str] + """Rate per unit of usage""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["unit_with_percent"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + unit_with_percent_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceUnitWithPercentConfig + ] + """Configuration for unit_with_percent pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + matrix_with_allocation_config: Required[MatrixWithAllocationConfig] + """Configuration for matrix_with_allocation pricing""" + + model_type: Required[Literal["matrix_with_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfigTier( + TypedDict, total=False +): + """Configuration for a single tiered with proration tier""" + + tier_lower_bound: Required[str] + """Inclusive tier starting value""" + + unit_amount: Required[str] + """Amount per unit""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfig( + TypedDict, total=False +): + """Configuration for tiered_with_proration pricing""" + + tiers: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfigTier + ] + ] + """ + Tiers for rating based on total usage quantities into the specified tier with + proration + """ + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["tiered_with_proration"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_with_proration_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfig + ] + """Configuration for tiered_with_proration pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceUnitWithProrationConfig( + TypedDict, total=False +): + """Configuration for unit_with_proration pricing""" + + unit_amount: Required[str] + """Rate per unit of usage""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["unit_with_proration"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + unit_with_proration_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceUnitWithProrationConfig + ] + """Configuration for unit_with_proration pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceGroupedAllocationConfig( + TypedDict, total=False +): + """Configuration for grouped_allocation pricing""" + + allocation: Required[str] + """Usage allocation per group""" + + grouping_key: Required[str] + """How to determine the groups that should each be allocated some quantity""" + + overage_unit_rate: Required[str] + """Unit rate for post-allocation""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_allocation_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceGroupedAllocationConfig + ] + """Configuration for grouped_allocation pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfigTier( + TypedDict, total=False +): + """Configuration for a single bulk pricing tier with proration""" + + unit_amount: Required[str] + """Cost per unit""" + + tier_lower_bound: Optional[str] + """The lower bound for this tier""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfig( + TypedDict, total=False +): + """Configuration for bulk_with_proration pricing""" + + tiers: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfigTier + ] + ] + """Bulk tiers for rating based on total usage volume""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPrice(TypedDict, total=False): + bulk_with_proration_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfig + ] + """Configuration for bulk_with_proration pricing""" + + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["bulk_with_proration"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfig( + TypedDict, total=False +): + """Configuration for grouped_with_prorated_minimum pricing""" + + grouping_key: Required[str] + """How to determine the groups that should each have a minimum""" + + minimum: Required[str] + """The minimum amount to charge per group""" + + unit_rate: Required[str] + """The amount to charge per unit""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceConversionRateConfig: TypeAlias = ( + Union[UnitConversionRateConfig, TieredConversionRateConfig] +) + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_with_prorated_minimum_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfig + ] + """Configuration for grouped_with_prorated_minimum pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_with_prorated_minimum"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactor( + TypedDict, total=False +): + """Configuration for a scaling factor""" + + scaling_factor: Required[str] + + scaling_value: Required[str] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmount( + TypedDict, total=False +): + """Configuration for a unit amount""" + + pricing_value: Required[str] + + unit_amount: Required[str] + """Per unit amount""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfig( + TypedDict, total=False +): + """Configuration for grouped_with_metered_minimum pricing""" + + grouping_key: Required[str] + """Used to partition the usage into groups. + + The minimum amount is applied to each group. + """ + + minimum_unit_amount: Required[str] + """The minimum amount to charge per group per unit""" + + pricing_key: Required[str] + """Used to determine the unit rate""" + + scaling_factors: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactor + ] + ] + """Scale the unit rates by the scaling factor.""" + + scaling_key: Required[str] + """Used to determine the unit rate scaling factor""" + + unit_amounts: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmount + ] + ] + """Apply per unit pricing to each pricing value. + + The minimum amount is applied any unmatched usage. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceConversionRateConfig: TypeAlias = ( + Union[UnitConversionRateConfig, TieredConversionRateConfig] +) + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_with_metered_minimum_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfig + ] + """Configuration for grouped_with_metered_minimum pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_with_metered_minimum"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig( + TypedDict, total=False +): + """Configuration for grouped_with_min_max_thresholds pricing""" + + grouping_key: Required[str] + """The event property used to group before applying thresholds""" + + maximum_charge: Required[str] + """The maximum amount to charge each group""" + + minimum_charge: Required[str] + """The minimum amount to charge each group, regardless of usage""" + + per_unit_rate: Required[str] + """The base price charged per group""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_with_min_max_thresholds_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig + ] + """Configuration for grouped_with_min_max_thresholds pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceLicenseAllocation + ] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_with_min_max_thresholds"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmount( + TypedDict, total=False +): + """Configuration for a unit amount item""" + + dimension_value: Required[str] + """The dimension value""" + + display_name: Required[str] + """Display name for this dimension value""" + + unit_amount: Required[str] + """Per unit amount""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfig( + TypedDict, total=False +): + """Configuration for matrix_with_display_name pricing""" + + dimension: Required[str] + """Used to determine the unit rate""" + + unit_amounts: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmount + ] + ] + """Apply per unit pricing to each dimension value""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + matrix_with_display_name_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfig + ] + """Configuration for matrix_with_display_name pricing""" + + model_type: Required[Literal["matrix_with_display_name"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfigTier( + TypedDict, total=False +): + """Configuration for a single tier""" + + per_unit: Required[str] + """Per package""" + + tier_lower_bound: Required[str] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfig( + TypedDict, total=False +): + """Configuration for grouped_tiered_package pricing""" + + grouping_key: Required[str] + """The event property used to group before tiering""" + + package_size: Required[str] + + tiers: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfigTier + ] + ] + """Apply tiered pricing after rounding up the quantity to the package size. + + Tiers are defined using exclusive lower bounds. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_tiered_package_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfig + ] + """Configuration for grouped_tiered_package pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_tiered_package"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTier( + TypedDict, total=False +): + """Configuration for a single tier""" + + tier_lower_bound: Required[str] + + unit_amount: Required[str] + """Per unit amount""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfig( + TypedDict, total=False +): + """Configuration for max_group_tiered_package pricing""" + + grouping_key: Required[str] + """ + The event property used to group before tiering the group with the highest value + """ + + package_size: Required[str] + + tiers: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTier + ] + ] + """Apply tiered pricing to the largest group after grouping with the provided key.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + max_group_tiered_package_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfig + ] + """Configuration for max_group_tiered_package pricing""" + + model_type: Required[Literal["max_group_tiered_package"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactor( + TypedDict, total=False +): + """Configuration for a single matrix scaling factor""" + + first_dimension_value: Required[str] + + scaling_factor: Required[str] + + second_dimension_value: Optional[str] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfig( + TypedDict, total=False +): + """Configuration for scalable_matrix_with_unit_pricing pricing""" + + first_dimension: Required[str] + """Used to determine the unit rate""" + + matrix_scaling_factors: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactor + ] + ] + """Apply a scaling factor to each dimension""" + + unit_price: Required[str] + """The final unit price to rate against the output of the matrix""" + + grouping_key: Optional[str] + """The property used to group this price""" + + prorate: Optional[bool] + """If true, the unit price will be prorated to the billing period""" + + second_dimension: Optional[str] + """Used to determine the unit rate (optional)""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceLicenseAllocation + ] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["scalable_matrix_with_unit_pricing"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + scalable_matrix_with_unit_pricing_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfig + ] + """Configuration for scalable_matrix_with_unit_pricing pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. - property_value: Required[str] - """Event property value to match""" + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ -class AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigTier(TypedDict, total=False): - """Configuration for a single bulk pricing tier""" + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactor( + TypedDict, total=False +): + """Configuration for a single matrix scaling factor""" + + first_dimension_value: Required[str] + + scaling_factor: Required[str] + + second_dimension_value: Optional[str] + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTier( + TypedDict, total=False +): + """Configuration for a single tier entry with business logic""" + + tier_lower_bound: Required[str] unit_amount: Required[str] - """Amount per unit""" - tier_lower_bound: Optional[str] - """The lower bound for this tier""" +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfig( + TypedDict, total=False +): + """Configuration for scalable_matrix_with_tiered_pricing pricing""" -class AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfig(TypedDict, total=False): - """Configuration for bulk_with_filters pricing""" + first_dimension: Required[str] + """Used for the scalable matrix first dimension""" - filters: Required[Iterable[AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigFilter]] - """Property filters to apply (all must match)""" + matrix_scaling_factors: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactor + ] + ] + """Apply a scaling factor to each dimension""" - tiers: Required[Iterable[AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigTier]] - """Bulk tiers for rating based on total usage volume""" + tiers: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTier + ] + ] + second_dimension: Optional[str] + """Used for the scalable matrix second dimension (optional)""" -AddPricePriceNewPlanBulkWithFiltersPriceConversionRateConfig: TypeAlias = Union[ + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceConversionRateConfig: TypeAlias = Union[ UnitConversionRateConfig, TieredConversionRateConfig ] -class AddPricePriceNewPlanBulkWithFiltersPrice(TypedDict, total=False): - bulk_with_filters_config: Required[AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfig] - """Configuration for bulk_with_filters pricing""" - +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPrice( + TypedDict, total=False +): cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] """The cadence to bill for this price on.""" item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["bulk_with_filters"]] + license_allocations: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceLicenseAllocation + ] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["scalable_matrix_with_tiered_pricing"]] """The pricing model type""" name: Required[str] """The name of the price.""" + scalable_matrix_with_tiered_pricing_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfig + ] + """Configuration for scalable_matrix_with_tiered_pricing pricing""" + billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -211,7 +8825,9 @@ class AddPricePriceNewPlanBulkWithFiltersPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" - conversion_rate_config: Optional[AddPricePriceNewPlanBulkWithFiltersPriceConversionRateConfig] + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceConversionRateConfig + ] """The configuration for the rate of the price currency to the invoicing currency.""" currency: Optional[str] @@ -258,47 +8874,81 @@ class AddPricePriceNewPlanBulkWithFiltersPrice(TypedDict, total=False): """ -class AddPricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier(TypedDict, total=False): - """Configuration for a single tiered with proration tier""" +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValue( + TypedDict, total=False +): + """Configuration for a dimension value entry""" + + grouping_key: Required[str] + """Grouping key value""" tier_lower_bound: Required[str] - """Inclusive tier starting value""" + """Tier lower bound""" unit_amount: Required[str] - """Amount per unit""" + """Unit amount for this combination""" -class AddPricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfig(TypedDict, total=False): - """Configuration for tiered_with_proration pricing""" +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig( + TypedDict, total=False +): + """Configuration for cumulative_grouped_bulk pricing""" - tiers: Required[Iterable[AddPricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier]] - """ - Tiers for rating based on total usage quantities into the specified tier with - proration - """ + dimension_values: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValue + ] + ] + """Each tier lower bound must have the same group of values.""" + group: Required[str] -AddPricePriceNewPlanTieredWithProrationPriceConversionRateConfig: TypeAlias = Union[ + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceConversionRateConfig: TypeAlias = Union[ UnitConversionRateConfig, TieredConversionRateConfig ] -class AddPricePriceNewPlanTieredWithProrationPrice(TypedDict, total=False): +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPrice(TypedDict, total=False): cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] """The cadence to bill for this price on.""" + cumulative_grouped_bulk_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig + ] + """Configuration for cumulative_grouped_bulk pricing""" + item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["tiered_with_proration"]] + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["cumulative_grouped_bulk"]] """The pricing model type""" name: Required[str] """The name of the price.""" - tiered_with_proration_config: Required[AddPricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfig] - """Configuration for tiered_with_proration pricing""" - billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -320,7 +8970,9 @@ class AddPricePriceNewPlanTieredWithProrationPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" - conversion_rate_config: Optional[AddPricePriceNewPlanTieredWithProrationPriceConversionRateConfig] + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceConversionRateConfig + ] """The configuration for the rate of the price currency to the invoicing currency.""" currency: Optional[str] @@ -367,40 +9019,66 @@ class AddPricePriceNewPlanTieredWithProrationPrice(TypedDict, total=False): """ -class AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig(TypedDict, total=False): - """Configuration for grouped_with_min_max_thresholds pricing""" +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig( + TypedDict, total=False +): + """Configuration for cumulative_grouped_allocation pricing""" + + cumulative_allocation: Required[str] + """The overall allocation across all groups""" + + group_allocation: Required[str] + """The allocation per individual group""" grouping_key: Required[str] - """The event property used to group before applying thresholds""" + """The event property used to group usage before applying allocations""" - maximum_charge: Required[str] - """The maximum amount to charge each group""" + unit_amount: Required[str] + """The amount to charge for each unit outside of the allocation""" - minimum_charge: Required[str] - """The minimum amount to charge each group, regardless of usage""" - per_unit_rate: Required[str] - """The base price charged per group""" +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + currency: Required[str] + """The currency of the license allocation.""" -AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig: TypeAlias = Union[ + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[ UnitConversionRateConfig, TieredConversionRateConfig ] -class AddPricePriceNewPlanGroupedWithMinMaxThresholdsPrice(TypedDict, total=False): +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPrice(TypedDict, total=False): cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] """The cadence to bill for this price on.""" - grouped_with_min_max_thresholds_config: Required[ - AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig + cumulative_grouped_allocation_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig ] - """Configuration for grouped_with_min_max_thresholds pricing""" + """Configuration for cumulative_grouped_allocation pricing""" item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["grouped_with_min_max_thresholds"]] + license_allocations: Required[ + Iterable[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceLicenseAllocation + ] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["cumulative_grouped_allocation"]] """The pricing model type""" name: Required[str] @@ -427,7 +9105,9 @@ class AddPricePriceNewPlanGroupedWithMinMaxThresholdsPrice(TypedDict, total=Fals conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" - conversion_rate_config: Optional[AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig] + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceConversionRateConfig + ] """The configuration for the rate of the price currency to the invoicing currency.""" currency: Optional[str] @@ -474,40 +9154,58 @@ class AddPricePriceNewPlanGroupedWithMinMaxThresholdsPrice(TypedDict, total=Fals """ -class AddPricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig(TypedDict, total=False): - """Configuration for cumulative_grouped_allocation pricing""" +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" - cumulative_allocation: Required[str] - """The overall allocation across all groups""" + currency: Required[str] + """The currency of the license allocation.""" - group_allocation: Required[str] - """The allocation per individual group""" + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" - grouping_key: Required[str] - """The event property used to group usage before applying allocations""" - unit_amount: Required[str] - """The amount to charge for each unit outside of the allocation""" +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceMinimumCompositeConfig( + TypedDict, total=False +): + """Configuration for minimum_composite pricing""" + minimum_amount: Required[str] + """The minimum amount to apply""" -AddPricePriceNewPlanCumulativeGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[ + prorated: bool + """If true, subtotals from this price are prorated based on the service period""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceConversionRateConfig: TypeAlias = Union[ UnitConversionRateConfig, TieredConversionRateConfig ] -class AddPricePriceNewPlanCumulativeGroupedAllocationPrice(TypedDict, total=False): +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePrice(TypedDict, total=False): cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] """The cadence to bill for this price on.""" - cumulative_grouped_allocation_config: Required[ - AddPricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig - ] - """Configuration for cumulative_grouped_allocation pricing""" - item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["cumulative_grouped_allocation"]] + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + minimum_composite_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceMinimumCompositeConfig + ] + """Configuration for minimum_composite pricing""" + + model_type: Required[Literal["minimum_composite"]] """The pricing model type""" name: Required[str] @@ -534,7 +9232,9 @@ class AddPricePriceNewPlanCumulativeGroupedAllocationPrice(TypedDict, total=Fals conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" - conversion_rate_config: Optional[AddPricePriceNewPlanCumulativeGroupedAllocationPriceConversionRateConfig] + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceConversionRateConfig + ] """The configuration for the rate of the price currency to the invoicing currency.""" currency: Optional[str] @@ -581,32 +9281,54 @@ class AddPricePriceNewPlanCumulativeGroupedAllocationPrice(TypedDict, total=Fals """ -class AddPricePriceNewPlanPercentCompositePricePercentConfig(TypedDict, total=False): +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePricePercentConfig(TypedDict, total=False): """Configuration for percent pricing""" percent: Required[float] """What percent of the component subtotals to charge""" -AddPricePriceNewPlanPercentCompositePriceConversionRateConfig: TypeAlias = Union[ +ReplacePriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceConversionRateConfig: TypeAlias = Union[ UnitConversionRateConfig, TieredConversionRateConfig ] -class AddPricePriceNewPlanPercentCompositePrice(TypedDict, total=False): +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePrice(TypedDict, total=False): cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] """The cadence to bill for this price on.""" item_id: Required[str] """The id of the item the price will be associated with.""" + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + model_type: Required[Literal["percent"]] """The pricing model type""" name: Required[str] """The name of the price.""" - percent_config: Required[AddPricePriceNewPlanPercentCompositePricePercentConfig] + percent_config: Required[ReplacePriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePricePercentConfig] """Configuration for percent pricing""" billable_metric_id: Optional[str] @@ -630,7 +9352,9 @@ class AddPricePriceNewPlanPercentCompositePrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" - conversion_rate_config: Optional[AddPricePriceNewPlanPercentCompositePriceConversionRateConfig] + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceConversionRateConfig + ] """The configuration for the rate of the price currency to the invoicing currency.""" currency: Optional[str] @@ -677,7 +9401,7 @@ class AddPricePriceNewPlanPercentCompositePrice(TypedDict, total=False): """ -class AddPricePriceNewPlanEventOutputPriceEventOutputConfig(TypedDict, total=False): +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceEventOutputConfig(TypedDict, total=False): """Configuration for event_output pricing""" unit_rating_key: Required[str] @@ -697,21 +9421,43 @@ class AddPricePriceNewPlanEventOutputPriceEventOutputConfig(TypedDict, total=Fal """ -AddPricePriceNewPlanEventOutputPriceConversionRateConfig: TypeAlias = Union[ +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +ReplacePriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceConversionRateConfig: TypeAlias = Union[ UnitConversionRateConfig, TieredConversionRateConfig ] -class AddPricePriceNewPlanEventOutputPrice(TypedDict, total=False): +class ReplacePriceLicenseAllocationPriceNewLicenseAllocationEventOutputPrice(TypedDict, total=False): cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] """The cadence to bill for this price on.""" - event_output_config: Required[AddPricePriceNewPlanEventOutputPriceEventOutputConfig] + event_output_config: Required[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceEventOutputConfig + ] """Configuration for event_output pricing""" item_id: Required[str] """The id of the item the price will be associated with.""" + license_allocations: Required[ + Iterable[ReplacePriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + model_type: Required[Literal["event_output"]] """The pricing model type""" @@ -739,7 +9485,9 @@ class AddPricePriceNewPlanEventOutputPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" - conversion_rate_config: Optional[AddPricePriceNewPlanEventOutputPriceConversionRateConfig] + conversion_rate_config: Optional[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceConversionRateConfig + ] """The configuration for the rate of the price currency to the invoicing currency.""" currency: Optional[str] @@ -786,84 +9534,41 @@ class AddPricePriceNewPlanEventOutputPrice(TypedDict, total=False): """ -AddPricePrice: TypeAlias = Union[ - NewPlanUnitPrice, - NewPlanTieredPrice, - NewPlanBulkPrice, - AddPricePriceNewPlanBulkWithFiltersPrice, - NewPlanPackagePrice, - NewPlanMatrixPrice, - NewPlanThresholdTotalAmountPrice, - NewPlanTieredPackagePrice, - NewPlanTieredWithMinimumPrice, - NewPlanGroupedTieredPrice, - NewPlanTieredPackageWithMinimumPrice, - NewPlanPackageWithAllocationPrice, - NewPlanUnitWithPercentPrice, - NewPlanMatrixWithAllocationPrice, - AddPricePriceNewPlanTieredWithProrationPrice, - NewPlanUnitWithProrationPrice, - NewPlanGroupedAllocationPrice, - NewPlanBulkWithProrationPrice, - NewPlanGroupedWithProratedMinimumPrice, - NewPlanGroupedWithMeteredMinimumPrice, - AddPricePriceNewPlanGroupedWithMinMaxThresholdsPrice, - NewPlanMatrixWithDisplayNamePrice, - NewPlanGroupedTieredPackagePrice, - NewPlanMaxGroupTieredPackagePrice, - NewPlanScalableMatrixWithUnitPricingPrice, - NewPlanScalableMatrixWithTieredPricingPrice, - NewPlanCumulativeGroupedBulkPrice, - AddPricePriceNewPlanCumulativeGroupedAllocationPrice, - NewPlanMinimumCompositePrice, - AddPricePriceNewPlanPercentCompositePrice, - AddPricePriceNewPlanEventOutputPrice, -] - - -class AddPrice(TypedDict, total=False): - allocation_price: Optional[NewAllocationPrice] - """The allocation price to add to the plan.""" - - plan_phase_order: Optional[int] - """The phase to add this price to.""" - - price: Optional[AddPricePrice] - """New plan price request body params.""" - - -class RemoveAdjustment(TypedDict, total=False): - adjustment_id: Required[str] - """The id of the adjustment to remove from on the plan.""" - - plan_phase_order: Optional[int] - """The phase to remove this adjustment from.""" - - -class RemovePrice(TypedDict, total=False): - price_id: Required[str] - """The id of the price to remove from the plan.""" - - plan_phase_order: Optional[int] - """The phase to remove this price from.""" - - -ReplaceAdjustmentAdjustment: TypeAlias = Union[ - NewPercentageDiscount, NewUsageDiscount, NewAmountDiscount, NewMinimum, NewMaximum +ReplacePriceLicenseAllocationPrice: TypeAlias = Union[ + ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackagePrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePrice, + ReplacePriceLicenseAllocationPriceNewLicenseAllocationEventOutputPrice, ] -class ReplaceAdjustment(TypedDict, total=False): - adjustment: Required[ReplaceAdjustmentAdjustment] - """The definition of a new adjustment to create and add to the plan.""" - - replaces_adjustment_id: Required[str] - """The id of the adjustment on the plan to replace in the plan.""" - - plan_phase_order: Optional[int] - """The phase to replace this adjustment from.""" - - class ReplacePricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigFilter(TypedDict, total=False): """Configuration for a single property filter""" @@ -1553,6 +10258,9 @@ class ReplacePrice(TypedDict, total=False): allocation_price: Optional[NewAllocationPrice] """The allocation price to add to the plan.""" + license_allocation_price: Optional[ReplacePriceLicenseAllocationPrice] + """The license allocation price to add to the plan.""" + plan_phase_order: Optional[int] """The phase to replace this price from.""" diff --git a/src/orb/types/billable_metric.py b/src/orb/types/billable_metric.py index e618c404..b3b6a158 100644 --- a/src/orb/types/billable_metric.py +++ b/src/orb/types/billable_metric.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, Optional +from typing import Dict, List, Optional from typing_extensions import Literal from .item import Item @@ -38,3 +38,5 @@ class BillableMetric(BaseModel): name: str status: Literal["active", "draft", "archived"] + + parameter_definitions: Optional[List[Dict[str, object]]] = None diff --git a/src/orb/types/customer_update_by_external_id_params.py b/src/orb/types/customer_update_by_external_id_params.py index 3d7a832e..bc613fd4 100644 --- a/src/orb/types/customer_update_by_external_id_params.py +++ b/src/orb/types/customer_update_by_external_id_params.py @@ -57,7 +57,9 @@ class CustomerUpdateByExternalIDParams(TypedDict, total=False): currency: Optional[str] """An ISO 4217 currency string used for the customer's invoices and balance. - If not set at creation time, will be set at subscription creation time. + This can only be set if the customer does not already have a currency + configured. If not set at creation or update time, it will be set at + subscription creation time. """ email: Optional[str] diff --git a/src/orb/types/customer_update_params.py b/src/orb/types/customer_update_params.py index 13673f40..a2a85dfc 100644 --- a/src/orb/types/customer_update_params.py +++ b/src/orb/types/customer_update_params.py @@ -57,7 +57,9 @@ class CustomerUpdateParams(TypedDict, total=False): currency: Optional[str] """An ISO 4217 currency string used for the customer's invoices and balance. - If not set at creation time, will be set at subscription creation time. + This can only be set if the customer does not already have a currency + configured. If not set at creation or update time, it will be set at + subscription creation time. """ email: Optional[str] diff --git a/src/orb/types/customers/credits/ledger_create_entry_by_external_id_params.py b/src/orb/types/customers/credits/ledger_create_entry_by_external_id_params.py index 598e681b..d7a7e1a5 100644 --- a/src/orb/types/customers/credits/ledger_create_entry_by_external_id_params.py +++ b/src/orb/types/customers/credits/ledger_create_entry_by_external_id_params.py @@ -125,6 +125,9 @@ class AddIncrementCreditLedgerEntryRequestParamsInvoiceSettings(TypedDict, total If not provided, a default 'Credits' item will be used. """ + mark_as_paid: bool + """If true, the new credits purchase invoice will be marked as paid.""" + memo: Optional[str] """An optional memo to display on the invoice.""" @@ -134,8 +137,8 @@ class AddIncrementCreditLedgerEntryRequestParamsInvoiceSettings(TypedDict, total Due date is calculated based on the invoice or issuance date, depending on the account's configured due date calculation method. A value of '0' here represents that the invoice is due on issue, whereas a value of '30' represents that the - customer has 30 days to pay the invoice. Do not set this field if you want to - set a custom due date. + customer has 30 days to pay the invoice. You must set either `net_terms` or + `custom_due_date`, but not both. """ require_successful_payment: bool diff --git a/src/orb/types/customers/credits/ledger_create_entry_params.py b/src/orb/types/customers/credits/ledger_create_entry_params.py index b0b47f75..c86f839f 100644 --- a/src/orb/types/customers/credits/ledger_create_entry_params.py +++ b/src/orb/types/customers/credits/ledger_create_entry_params.py @@ -125,6 +125,9 @@ class AddIncrementCreditLedgerEntryRequestParamsInvoiceSettings(TypedDict, total If not provided, a default 'Credits' item will be used. """ + mark_as_paid: bool + """If true, the new credits purchase invoice will be marked as paid.""" + memo: Optional[str] """An optional memo to display on the invoice.""" @@ -134,8 +137,8 @@ class AddIncrementCreditLedgerEntryRequestParamsInvoiceSettings(TypedDict, total Due date is calculated based on the invoice or issuance date, depending on the account's configured due date calculation method. A value of '0' here represents that the invoice is due on issue, whereas a value of '30' represents that the - customer has 30 days to pay the invoice. Do not set this field if you want to - set a custom due date. + customer has 30 days to pay the invoice. You must set either `net_terms` or + `custom_due_date`, but not both. """ require_successful_payment: bool diff --git a/src/orb/types/invoice_create_params.py b/src/orb/types/invoice_create_params.py index 92ae0229..650d26c0 100644 --- a/src/orb/types/invoice_create_params.py +++ b/src/orb/types/invoice_create_params.py @@ -29,6 +29,13 @@ class InvoiceCreateParams(TypedDict, total=False): line_items: Required[Iterable[LineItem]] + auto_collection: Optional[bool] + """ + Determines whether this invoice will automatically attempt to charge a saved + payment method, if any. If not specified, the invoice inherits the customer's + auto_collection setting. + """ + customer_id: Optional[str] """The id of the `Customer` to create this invoice for. diff --git a/src/orb/types/invoice_update_params.py b/src/orb/types/invoice_update_params.py index b097d6f8..30367bce 100644 --- a/src/orb/types/invoice_update_params.py +++ b/src/orb/types/invoice_update_params.py @@ -12,6 +12,13 @@ class InvoiceUpdateParams(TypedDict, total=False): + auto_collection: Optional[bool] + """ + Determines whether this invoice will automatically attempt to charge a saved + payment method, if any. Can only be modified on draft invoices. If not + specified, the invoice's existing setting is unchanged. + """ + due_date: Annotated[Union[Union[str, date], Union[str, datetime], None], PropertyInfo(format="iso8601")] """An optional custom due date for the invoice. diff --git a/src/orb/types/item.py b/src/orb/types/item.py index c25cd993..6f4fcb32 100644 --- a/src/orb/types/item.py +++ b/src/orb/types/item.py @@ -15,7 +15,7 @@ class ExternalConnection(BaseModel): """ external_connection_name: Literal[ - "stripe", "quickbooks", "bill.com", "netsuite", "taxjar", "avalara", "anrok", "numeral" + "stripe", "quickbooks", "bill.com", "netsuite", "taxjar", "avalara", "anrok", "numeral", "stripe_tax" ] """The name of the external system this item is connected to.""" diff --git a/src/orb/types/item_update_params.py b/src/orb/types/item_update_params.py index d9504846..939b406c 100644 --- a/src/orb/types/item_update_params.py +++ b/src/orb/types/item_update_params.py @@ -27,7 +27,7 @@ class ExternalConnection(TypedDict, total=False): """ external_connection_name: Required[ - Literal["stripe", "quickbooks", "bill.com", "netsuite", "taxjar", "avalara", "anrok", "numeral"] + Literal["stripe", "quickbooks", "bill.com", "netsuite", "taxjar", "avalara", "anrok", "numeral", "stripe_tax"] ] """The name of the external system this item is connected to.""" diff --git a/src/orb/types/new_subscription_scalable_matrix_with_unit_pricing_price_param.py b/src/orb/types/new_subscription_scalable_matrix_with_unit_pricing_price_param.py index c0ea7c96..683bf6db 100644 --- a/src/orb/types/new_subscription_scalable_matrix_with_unit_pricing_price_param.py +++ b/src/orb/types/new_subscription_scalable_matrix_with_unit_pricing_price_param.py @@ -40,6 +40,9 @@ class ScalableMatrixWithUnitPricingConfig(TypedDict, total=False): unit_price: Required[str] """The final unit price to rate against the output of the matrix""" + grouping_key: Optional[str] + """The property used to group this price""" + prorate: Optional[bool] """If true, the unit price will be prorated to the billing period""" diff --git a/src/orb/types/plan_create_params.py b/src/orb/types/plan_create_params.py index ff20826c..e5e6723c 100644 --- a/src/orb/types/plan_create_params.py +++ b/src/orb/types/plan_create_params.py @@ -5,8 +5,13 @@ from typing import Dict, Union, Iterable, Optional from typing_extensions import Literal, Required, TypeAlias, TypedDict +from .shared_params.bulk_config import BulkConfig from .shared_params.new_maximum import NewMaximum from .shared_params.new_minimum import NewMinimum +from .shared_params.unit_config import UnitConfig +from .shared_params.matrix_config import MatrixConfig +from .shared_params.tiered_config import TieredConfig +from .shared_params.package_config import PackageConfig from .shared_params.new_usage_discount import NewUsageDiscount from .shared_params.new_amount_discount import NewAmountDiscount from .shared_params.new_plan_bulk_price import NewPlanBulkPrice @@ -17,6 +22,7 @@ from .shared_params.new_plan_package_price import NewPlanPackagePrice from .shared_params.new_percentage_discount import NewPercentageDiscount from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig +from .shared_params.matrix_with_allocation_config import MatrixWithAllocationConfig from .shared_params.new_plan_grouped_tiered_price import NewPlanGroupedTieredPrice from .shared_params.new_plan_tiered_package_price import NewPlanTieredPackagePrice from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig @@ -46,6 +52,143 @@ __all__ = [ "PlanCreateParams", "Price", + "PriceLicenseAllocationPrice", + "PriceLicenseAllocationPriceNewLicenseAllocationUnitPrice", + "PriceLicenseAllocationPriceNewLicenseAllocationUnitPriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationUnitPriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationTieredPrice", + "PriceLicenseAllocationPriceNewLicenseAllocationTieredPriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationTieredPriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationBulkPrice", + "PriceLicenseAllocationPriceNewLicenseAllocationBulkPriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationBulkPriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPrice", + "PriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigFilter", + "PriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigTier", + "PriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationPackagePrice", + "PriceLicenseAllocationPriceNewLicenseAllocationPackagePriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationPackagePriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationMatrixPrice", + "PriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPrice", + "PriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTable", + "PriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePrice", + "PriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfigTier", + "PriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPrice", + "PriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfigTier", + "PriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPrice", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfigTier", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPrice", + "PriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTier", + "PriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPrice", + "PriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPricePackageWithAllocationConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPrice", + "PriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceUnitWithPercentConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPrice", + "PriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPrice", + "PriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfigTier", + "PriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPrice", + "PriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceUnitWithProrationConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPrice", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceGroupedAllocationConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPrice", + "PriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfigTier", + "PriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPrice", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPrice", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactor", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmount", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPrice", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePrice", + "PriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmount", + "PriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePrice", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfigTier", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePrice", + "PriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTier", + "PriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPrice", + "PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactor", + "PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPrice", + "PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactor", + "PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTier", + "PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPrice", + "PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValue", + "PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPrice", + "PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePrice", + "PriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceMinimumCompositeConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePrice", + "PriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePricePercentConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceConversionRateConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationEventOutputPrice", + "PriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceEventOutputConfig", + "PriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceLicenseAllocation", + "PriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceConversionRateConfig", "PricePrice", "PricePriceNewPlanBulkWithFiltersPrice", "PricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfig", @@ -129,6 +272,4161 @@ class PlanCreateParams(TypedDict, total=False): """ +class PriceLicenseAllocationPriceNewLicenseAllocationUnitPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +PriceLicenseAllocationPriceNewLicenseAllocationUnitPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationUnitPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[Iterable[PriceLicenseAllocationPriceNewLicenseAllocationUnitPriceLicenseAllocation]] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["unit"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + unit_config: Required[UnitConfig] + """Configuration for unit pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[PriceLicenseAllocationPriceNewLicenseAllocationUnitPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationTieredPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +PriceLicenseAllocationPriceNewLicenseAllocationTieredPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationTieredPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[Iterable[PriceLicenseAllocationPriceNewLicenseAllocationTieredPriceLicenseAllocation]] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["tiered"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_config: Required[TieredConfig] + """Configuration for tiered pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[PriceLicenseAllocationPriceNewLicenseAllocationTieredPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationBulkPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +PriceLicenseAllocationPriceNewLicenseAllocationBulkPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationBulkPrice(TypedDict, total=False): + bulk_config: Required[BulkConfig] + """Configuration for bulk pricing""" + + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[Iterable[PriceLicenseAllocationPriceNewLicenseAllocationBulkPriceLicenseAllocation]] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["bulk"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[PriceLicenseAllocationPriceNewLicenseAllocationBulkPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigFilter( + TypedDict, total=False +): + """Configuration for a single property filter""" + + property_key: Required[str] + """Event property key to filter on""" + + property_value: Required[str] + """Event property value to match""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigTier( + TypedDict, total=False +): + """Configuration for a single bulk pricing tier""" + + unit_amount: Required[str] + """Amount per unit""" + + tier_lower_bound: Optional[str] + """The lower bound for this tier""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfig(TypedDict, total=False): + """Configuration for bulk_with_filters pricing""" + + filters: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigFilter] + ] + """Property filters to apply (all must match)""" + + tiers: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfigTier] + ] + """Bulk tiers for rating based on total usage volume""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +PriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPrice(TypedDict, total=False): + bulk_with_filters_config: Required[ + PriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceBulkWithFiltersConfig + ] + """Configuration for bulk_with_filters pricing""" + + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["bulk_with_filters"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationPackagePriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +PriceLicenseAllocationPriceNewLicenseAllocationPackagePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationPackagePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["package"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + package_config: Required[PackageConfig] + """Configuration for package pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[PriceLicenseAllocationPriceNewLicenseAllocationPackagePriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +PriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationMatrixPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[Iterable[PriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceLicenseAllocation]] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + matrix_config: Required[MatrixConfig] + """Configuration for matrix pricing""" + + model_type: Required[Literal["matrix"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[PriceLicenseAllocationPriceNewLicenseAllocationMatrixPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTable( + TypedDict, total=False +): + """Configuration for a single threshold""" + + threshold: Required[str] + + total_amount: Required[str] + """Total amount for this threshold""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfig( + TypedDict, total=False +): + """Configuration for threshold_total_amount pricing""" + + consumption_table: Required[ + Iterable[ + PriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTable + ] + ] + """ + When the quantity consumed passes a provided threshold, the configured total + will be charged + """ + + prorate: Optional[bool] + """If true, the unit price will be prorated to the billing period""" + + +PriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["threshold_total_amount"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + threshold_total_amount_config: Required[ + PriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceThresholdTotalAmountConfig + ] + """Configuration for threshold_total_amount pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfigTier(TypedDict, total=False): + """Configuration for a single tier with business logic""" + + per_unit: Required[str] + """Price per package""" + + tier_lower_bound: Required[str] + + +class PriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfig(TypedDict, total=False): + """Configuration for tiered_package pricing""" + + package_size: Required[str] + + tiers: Required[Iterable[PriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfigTier]] + """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. + """ + + +PriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["tiered_package"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_package_config: Required[ + PriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceTieredPackageConfig + ] + """Configuration for tiered_package pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfigTier( + TypedDict, total=False +): + """Configuration for a single tier""" + + minimum_amount: Required[str] + + tier_lower_bound: Required[str] + + unit_amount: Required[str] + """Per unit amount""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfig( + TypedDict, total=False +): + """Configuration for tiered_with_minimum pricing""" + + tiers: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfigTier] + ] + """Tiered pricing with a minimum amount dependent on the volume tier. + + Tiers are defined using exclusive lower bounds. + """ + + hide_zero_amount_tiers: bool + """If true, tiers with an accrued amount of 0 will not be included in the rating.""" + + prorate: bool + """If true, the unit price will be prorated to the billing period""" + + +PriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["tiered_with_minimum"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_with_minimum_config: Required[ + PriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceTieredWithMinimumConfig + ] + """Configuration for tiered_with_minimum pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfigTier(TypedDict, total=False): + """Configuration for a single tier""" + + tier_lower_bound: Required[str] + + unit_amount: Required[str] + """Per unit amount""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfig(TypedDict, total=False): + """Configuration for grouped_tiered pricing""" + + grouping_key: Required[str] + """The billable metric property used to group before tiering""" + + tiers: Required[Iterable[PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfigTier]] + """ + Apply tiered pricing to each segment generated after grouping with the provided + key + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_tiered_config: Required[ + PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceGroupedTieredConfig + ] + """Configuration for grouped_tiered pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_tiered"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTier( + TypedDict, total=False +): + """Configuration for a single tier""" + + minimum_amount: Required[str] + + per_unit: Required[str] + + tier_lower_bound: Required[str] + + +class PriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfig( + TypedDict, total=False +): + """Configuration for tiered_package_with_minimum pricing""" + + package_size: Required[float] + + tiers: Required[ + Iterable[ + PriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTier + ] + ] + """Apply tiered pricing after rounding up the quantity to the package size. + + Tiers are defined using exclusive lower bounds. + """ + + +PriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["tiered_package_with_minimum"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_package_with_minimum_config: Required[ + PriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceTieredPackageWithMinimumConfig + ] + """Configuration for tiered_package_with_minimum pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPricePackageWithAllocationConfig( + TypedDict, total=False +): + """Configuration for package_with_allocation pricing""" + + allocation: Required[str] + + package_amount: Required[str] + + package_size: Required[str] + + +PriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["package_with_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + package_with_allocation_config: Required[ + PriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPricePackageWithAllocationConfig + ] + """Configuration for package_with_allocation pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceUnitWithPercentConfig(TypedDict, total=False): + """Configuration for unit_with_percent pricing""" + + percent: Required[str] + """What percent, out of 100, of the calculated total to charge""" + + unit_amount: Required[str] + """Rate per unit of usage""" + + +PriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["unit_with_percent"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + unit_with_percent_config: Required[ + PriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceUnitWithPercentConfig + ] + """Configuration for unit_with_percent pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +PriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + matrix_with_allocation_config: Required[MatrixWithAllocationConfig] + """Configuration for matrix_with_allocation pricing""" + + model_type: Required[Literal["matrix_with_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfigTier( + TypedDict, total=False +): + """Configuration for a single tiered with proration tier""" + + tier_lower_bound: Required[str] + """Inclusive tier starting value""" + + unit_amount: Required[str] + """Amount per unit""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfig( + TypedDict, total=False +): + """Configuration for tiered_with_proration pricing""" + + tiers: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfigTier] + ] + """ + Tiers for rating based on total usage quantities into the specified tier with + proration + """ + + +PriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["tiered_with_proration"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + tiered_with_proration_config: Required[ + PriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceTieredWithProrationConfig + ] + """Configuration for tiered_with_proration pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceUnitWithProrationConfig( + TypedDict, total=False +): + """Configuration for unit_with_proration pricing""" + + unit_amount: Required[str] + """Rate per unit of usage""" + + +PriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["unit_with_proration"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + unit_with_proration_config: Required[ + PriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceUnitWithProrationConfig + ] + """Configuration for unit_with_proration pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceGroupedAllocationConfig( + TypedDict, total=False +): + """Configuration for grouped_allocation pricing""" + + allocation: Required[str] + """Usage allocation per group""" + + grouping_key: Required[str] + """How to determine the groups that should each be allocated some quantity""" + + overage_unit_rate: Required[str] + """Unit rate for post-allocation""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +PriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_allocation_config: Required[ + PriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceGroupedAllocationConfig + ] + """Configuration for grouped_allocation pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfigTier( + TypedDict, total=False +): + """Configuration for a single bulk pricing tier with proration""" + + unit_amount: Required[str] + """Cost per unit""" + + tier_lower_bound: Optional[str] + """The lower bound for this tier""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfig( + TypedDict, total=False +): + """Configuration for bulk_with_proration pricing""" + + tiers: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfigTier] + ] + """Bulk tiers for rating based on total usage volume""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +PriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPrice(TypedDict, total=False): + bulk_with_proration_config: Required[ + PriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceBulkWithProrationConfig + ] + """Configuration for bulk_with_proration pricing""" + + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["bulk_with_proration"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfig( + TypedDict, total=False +): + """Configuration for grouped_with_prorated_minimum pricing""" + + grouping_key: Required[str] + """How to determine the groups that should each have a minimum""" + + minimum: Required[str] + """The minimum amount to charge per group""" + + unit_rate: Required[str] + """The amount to charge per unit""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_with_prorated_minimum_config: Required[ + PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfig + ] + """Configuration for grouped_with_prorated_minimum pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_with_prorated_minimum"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactor( + TypedDict, total=False +): + """Configuration for a scaling factor""" + + scaling_factor: Required[str] + + scaling_value: Required[str] + + +class PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmount( + TypedDict, total=False +): + """Configuration for a unit amount""" + + pricing_value: Required[str] + + unit_amount: Required[str] + """Per unit amount""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfig( + TypedDict, total=False +): + """Configuration for grouped_with_metered_minimum pricing""" + + grouping_key: Required[str] + """Used to partition the usage into groups. + + The minimum amount is applied to each group. + """ + + minimum_unit_amount: Required[str] + """The minimum amount to charge per group per unit""" + + pricing_key: Required[str] + """Used to determine the unit rate""" + + scaling_factors: Required[ + Iterable[ + PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactor + ] + ] + """Scale the unit rates by the scaling factor.""" + + scaling_key: Required[str] + """Used to determine the unit rate scaling factor""" + + unit_amounts: Required[ + Iterable[ + PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmount + ] + ] + """Apply per unit pricing to each pricing value. + + The minimum amount is applied any unmatched usage. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_with_metered_minimum_config: Required[ + PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfig + ] + """Configuration for grouped_with_metered_minimum pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_with_metered_minimum"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig( + TypedDict, total=False +): + """Configuration for grouped_with_min_max_thresholds pricing""" + + grouping_key: Required[str] + """The event property used to group before applying thresholds""" + + maximum_charge: Required[str] + """The maximum amount to charge each group""" + + minimum_charge: Required[str] + """The minimum amount to charge each group, regardless of usage""" + + per_unit_rate: Required[str] + """The base price charged per group""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_with_min_max_thresholds_config: Required[ + PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig + ] + """Configuration for grouped_with_min_max_thresholds pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_with_min_max_thresholds"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmount( + TypedDict, total=False +): + """Configuration for a unit amount item""" + + dimension_value: Required[str] + """The dimension value""" + + display_name: Required[str] + """Display name for this dimension value""" + + unit_amount: Required[str] + """Per unit amount""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfig( + TypedDict, total=False +): + """Configuration for matrix_with_display_name pricing""" + + dimension: Required[str] + """Used to determine the unit rate""" + + unit_amounts: Required[ + Iterable[ + PriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmount + ] + ] + """Apply per unit pricing to each dimension value""" + + +PriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + matrix_with_display_name_config: Required[ + PriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceMatrixWithDisplayNameConfig + ] + """Configuration for matrix_with_display_name pricing""" + + model_type: Required[Literal["matrix_with_display_name"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfigTier( + TypedDict, total=False +): + """Configuration for a single tier""" + + per_unit: Required[str] + """Per package""" + + tier_lower_bound: Required[str] + + +class PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfig( + TypedDict, total=False +): + """Configuration for grouped_tiered_package pricing""" + + grouping_key: Required[str] + """The event property used to group before tiering""" + + package_size: Required[str] + + tiers: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfigTier] + ] + """Apply tiered pricing after rounding up the quantity to the package size. + + Tiers are defined using exclusive lower bounds. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + grouped_tiered_package_config: Required[ + PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceGroupedTieredPackageConfig + ] + """Configuration for grouped_tiered_package pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["grouped_tiered_package"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTier( + TypedDict, total=False +): + """Configuration for a single tier""" + + tier_lower_bound: Required[str] + + unit_amount: Required[str] + """Per unit amount""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfig( + TypedDict, total=False +): + """Configuration for max_group_tiered_package pricing""" + + grouping_key: Required[str] + """ + The event property used to group before tiering the group with the highest value + """ + + package_size: Required[str] + + tiers: Required[ + Iterable[ + PriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTier + ] + ] + """Apply tiered pricing to the largest group after grouping with the provided key.""" + + +PriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + max_group_tiered_package_config: Required[ + PriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceMaxGroupTieredPackageConfig + ] + """Configuration for max_group_tiered_package pricing""" + + model_type: Required[Literal["max_group_tiered_package"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactor( + TypedDict, total=False +): + """Configuration for a single matrix scaling factor""" + + first_dimension_value: Required[str] + + scaling_factor: Required[str] + + second_dimension_value: Optional[str] + + +class PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfig( + TypedDict, total=False +): + """Configuration for scalable_matrix_with_unit_pricing pricing""" + + first_dimension: Required[str] + """Used to determine the unit rate""" + + matrix_scaling_factors: Required[ + Iterable[ + PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactor + ] + ] + """Apply a scaling factor to each dimension""" + + unit_price: Required[str] + """The final unit price to rate against the output of the matrix""" + + grouping_key: Optional[str] + """The property used to group this price""" + + prorate: Optional[bool] + """If true, the unit price will be prorated to the billing period""" + + second_dimension: Optional[str] + """Used to determine the unit rate (optional)""" + + +PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceConversionRateConfig: TypeAlias = ( + Union[UnitConversionRateConfig, TieredConversionRateConfig] +) + + +class PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["scalable_matrix_with_unit_pricing"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + scalable_matrix_with_unit_pricing_config: Required[ + PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfig + ] + """Configuration for scalable_matrix_with_unit_pricing pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactor( + TypedDict, total=False +): + """Configuration for a single matrix scaling factor""" + + first_dimension_value: Required[str] + + scaling_factor: Required[str] + + second_dimension_value: Optional[str] + + +class PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTier( + TypedDict, total=False +): + """Configuration for a single tier entry with business logic""" + + tier_lower_bound: Required[str] + + unit_amount: Required[str] + + +class PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfig( + TypedDict, total=False +): + """Configuration for scalable_matrix_with_tiered_pricing pricing""" + + first_dimension: Required[str] + """Used for the scalable matrix first dimension""" + + matrix_scaling_factors: Required[ + Iterable[ + PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactor + ] + ] + """Apply a scaling factor to each dimension""" + + tiers: Required[ + Iterable[ + PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTier + ] + ] + + second_dimension: Optional[str] + """Used for the scalable matrix second dimension (optional)""" + + +PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceConversionRateConfig: TypeAlias = ( + Union[UnitConversionRateConfig, TieredConversionRateConfig] +) + + +class PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["scalable_matrix_with_tiered_pricing"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + scalable_matrix_with_tiered_pricing_config: Required[ + PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfig + ] + """Configuration for scalable_matrix_with_tiered_pricing pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValue( + TypedDict, total=False +): + """Configuration for a dimension value entry""" + + grouping_key: Required[str] + """Grouping key value""" + + tier_lower_bound: Required[str] + """Tier lower bound""" + + unit_amount: Required[str] + """Unit amount for this combination""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig( + TypedDict, total=False +): + """Configuration for cumulative_grouped_bulk pricing""" + + dimension_values: Required[ + Iterable[ + PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValue + ] + ] + """Each tier lower bound must have the same group of values.""" + + group: Required[str] + + +class PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + cumulative_grouped_bulk_config: Required[ + PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig + ] + """Configuration for cumulative_grouped_bulk pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["cumulative_grouped_bulk"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig( + TypedDict, total=False +): + """Configuration for cumulative_grouped_allocation pricing""" + + cumulative_allocation: Required[str] + """The overall allocation across all groups""" + + group_allocation: Required[str] + """The allocation per individual group""" + + grouping_key: Required[str] + """The event property used to group usage before applying allocations""" + + unit_amount: Required[str] + """The amount to charge for each unit outside of the allocation""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceLicenseAllocation( + TypedDict, total=False +): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + cumulative_grouped_allocation_config: Required[ + PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig + ] + """Configuration for cumulative_grouped_allocation pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["cumulative_grouped_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceMinimumCompositeConfig( + TypedDict, total=False +): + """Configuration for minimum_composite pricing""" + + minimum_amount: Required[str] + """The minimum amount to apply""" + + prorated: bool + """If true, subtotals from this price are prorated based on the service period""" + + +PriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + minimum_composite_config: Required[ + PriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceMinimumCompositeConfig + ] + """Configuration for minimum_composite pricing""" + + model_type: Required[Literal["minimum_composite"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +class PriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePricePercentConfig(TypedDict, total=False): + """Configuration for percent pricing""" + + percent: Required[float] + """What percent of the component subtotals to charge""" + + +PriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["percent"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + percent_config: Required[PriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePricePercentConfig] + """Configuration for percent pricing""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceEventOutputConfig(TypedDict, total=False): + """Configuration for event_output pricing""" + + unit_rating_key: Required[str] + """The key in the event data to extract the unit rate from.""" + + default_unit_rate: Optional[str] + """ + 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. + """ + + grouping_key: Optional[str] + """An optional key in the event data to group by (e.g., event ID). + + All events will also be grouped by their unit rate. + """ + + +class PriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceLicenseAllocation(TypedDict, total=False): + amount: Required[str] + """The amount of credits granted per active license per cadence.""" + + currency: Required[str] + """The currency of the license allocation.""" + + write_off_overage: Optional[bool] + """When True, overage beyond the allocation is written off.""" + + +PriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceLicenseAllocationPriceNewLicenseAllocationEventOutputPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + event_output_config: Required[PriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceEventOutputConfig] + """Configuration for event_output pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + license_allocations: Required[ + Iterable[PriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceLicenseAllocation] + ] + """License allocations to associate with this price. + + Each entry defines a per-license credit pool granted each cadence. Requires + license_type_id or license_type_configuration to be set. + """ + + model_type: Required[Literal["event_output"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceLicenseAllocationPriceNewLicenseAllocationEventOutputPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + license_type_id: Optional[str] + """The ID of the license type to associate with this price.""" + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + +PriceLicenseAllocationPrice: TypeAlias = Union[ + PriceLicenseAllocationPriceNewLicenseAllocationUnitPrice, + PriceLicenseAllocationPriceNewLicenseAllocationTieredPrice, + PriceLicenseAllocationPriceNewLicenseAllocationBulkPrice, + PriceLicenseAllocationPriceNewLicenseAllocationBulkWithFiltersPrice, + PriceLicenseAllocationPriceNewLicenseAllocationPackagePrice, + PriceLicenseAllocationPriceNewLicenseAllocationMatrixPrice, + PriceLicenseAllocationPriceNewLicenseAllocationThresholdTotalAmountPrice, + PriceLicenseAllocationPriceNewLicenseAllocationTieredPackagePrice, + PriceLicenseAllocationPriceNewLicenseAllocationTieredWithMinimumPrice, + PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPrice, + PriceLicenseAllocationPriceNewLicenseAllocationTieredPackageWithMinimumPrice, + PriceLicenseAllocationPriceNewLicenseAllocationPackageWithAllocationPrice, + PriceLicenseAllocationPriceNewLicenseAllocationUnitWithPercentPrice, + PriceLicenseAllocationPriceNewLicenseAllocationMatrixWithAllocationPrice, + PriceLicenseAllocationPriceNewLicenseAllocationTieredWithProrationPrice, + PriceLicenseAllocationPriceNewLicenseAllocationUnitWithProrationPrice, + PriceLicenseAllocationPriceNewLicenseAllocationGroupedAllocationPrice, + PriceLicenseAllocationPriceNewLicenseAllocationBulkWithProrationPrice, + PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithProratedMinimumPrice, + PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMeteredMinimumPrice, + PriceLicenseAllocationPriceNewLicenseAllocationGroupedWithMinMaxThresholdsPrice, + PriceLicenseAllocationPriceNewLicenseAllocationMatrixWithDisplayNamePrice, + PriceLicenseAllocationPriceNewLicenseAllocationGroupedTieredPackagePrice, + PriceLicenseAllocationPriceNewLicenseAllocationMaxGroupTieredPackagePrice, + PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithUnitPricingPrice, + PriceLicenseAllocationPriceNewLicenseAllocationScalableMatrixWithTieredPricingPrice, + PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedBulkPrice, + PriceLicenseAllocationPriceNewLicenseAllocationCumulativeGroupedAllocationPrice, + PriceLicenseAllocationPriceNewLicenseAllocationMinimumCompositePrice, + PriceLicenseAllocationPriceNewLicenseAllocationPercentCompositePrice, + PriceLicenseAllocationPriceNewLicenseAllocationEventOutputPrice, +] + + class PricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigFilter(TypedDict, total=False): """Configuration for a single property filter""" @@ -815,6 +5113,9 @@ class Price(TypedDict, total=False): allocation_price: Optional[NewAllocationPrice] """The allocation price to add to the plan.""" + license_allocation_price: Optional[PriceLicenseAllocationPrice] + """The license allocation price to add to the plan.""" + plan_phase_order: Optional[int] """The phase to add this price to.""" diff --git a/src/orb/types/price_create_params.py b/src/orb/types/price_create_params.py index e114775b..01ce39d0 100644 --- a/src/orb/types/price_create_params.py +++ b/src/orb/types/price_create_params.py @@ -2516,6 +2516,9 @@ class NewFloatingScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricing unit_price: Required[str] """The final unit price to rate against the output of the matrix""" + grouping_key: Optional[str] + """The property used to group this price""" + prorate: Optional[bool] """If true, the unit price will be prorated to the billing period""" diff --git a/src/orb/types/price_evaluate_multiple_params.py b/src/orb/types/price_evaluate_multiple_params.py index 90cd75d4..50329781 100644 --- a/src/orb/types/price_evaluate_multiple_params.py +++ b/src/orb/types/price_evaluate_multiple_params.py @@ -638,6 +638,13 @@ class PriceEvaluation(TypedDict, total=False): to group the underlying billable metric """ + metric_parameter_overrides: Optional[Dict[str, object]] + """Optional overrides for parameterized billable metric parameters. + + If the metric has parameter definitions and no overrides are provided, defaults + will be used. + """ + price: Optional[PriceEvaluationPrice] """New floating price request body params.""" diff --git a/src/orb/types/price_evaluate_params.py b/src/orb/types/price_evaluate_params.py index fa8d6b66..4e508f11 100644 --- a/src/orb/types/price_evaluate_params.py +++ b/src/orb/types/price_evaluate_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Union, Optional +from typing import Dict, Union, Optional from datetime import datetime from typing_extensions import Required, Annotated, TypedDict @@ -38,3 +38,10 @@ class PriceEvaluateParams(TypedDict, total=False): [computed properties](/extensibility/advanced-metrics#computed-properties)) used to group the underlying billable metric """ + + metric_parameter_overrides: Optional[Dict[str, object]] + """Optional overrides for parameterized billable metric parameters. + + If the metric has parameter definitions and no overrides are provided, defaults + will be used. + """ diff --git a/src/orb/types/price_evaluate_preview_events_params.py b/src/orb/types/price_evaluate_preview_events_params.py index ec487155..5e8d682b 100644 --- a/src/orb/types/price_evaluate_preview_events_params.py +++ b/src/orb/types/price_evaluate_preview_events_params.py @@ -670,6 +670,13 @@ class PriceEvaluation(TypedDict, total=False): to group the underlying billable metric """ + metric_parameter_overrides: Optional[Dict[str, object]] + """Optional overrides for parameterized billable metric parameters. + + If the metric has parameter definitions and no overrides are provided, defaults + will be used. + """ + price: Optional[PriceEvaluationPrice] """New floating price request body params.""" diff --git a/src/orb/types/shared/new_floating_scalable_matrix_with_unit_pricing_price.py b/src/orb/types/shared/new_floating_scalable_matrix_with_unit_pricing_price.py index afeb9a28..e1cc30a2 100644 --- a/src/orb/types/shared/new_floating_scalable_matrix_with_unit_pricing_price.py +++ b/src/orb/types/shared/new_floating_scalable_matrix_with_unit_pricing_price.py @@ -42,6 +42,9 @@ class ScalableMatrixWithUnitPricingConfig(BaseModel): unit_price: str """The final unit price to rate against the output of the matrix""" + grouping_key: Optional[str] = None + """The property used to group this price""" + prorate: Optional[bool] = None """If true, the unit price will be prorated to the billing period""" diff --git a/src/orb/types/shared/new_plan_scalable_matrix_with_unit_pricing_price.py b/src/orb/types/shared/new_plan_scalable_matrix_with_unit_pricing_price.py index 9927a55e..5ed45a08 100644 --- a/src/orb/types/shared/new_plan_scalable_matrix_with_unit_pricing_price.py +++ b/src/orb/types/shared/new_plan_scalable_matrix_with_unit_pricing_price.py @@ -42,6 +42,9 @@ class ScalableMatrixWithUnitPricingConfig(BaseModel): unit_price: str """The final unit price to rate against the output of the matrix""" + grouping_key: Optional[str] = None + """The property used to group this price""" + prorate: Optional[bool] = None """If true, the unit price will be prorated to the billing period""" diff --git a/src/orb/types/shared/price.py b/src/orb/types/shared/price.py index 68a9a5a8..7df3e4fb 100644 --- a/src/orb/types/shared/price.py +++ b/src/orb/types/shared/price.py @@ -3388,6 +3388,9 @@ class ScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfig(Base unit_price: str """The final unit price to rate against the output of the matrix""" + grouping_key: Optional[str] = None + """The property used to group this price""" + prorate: Optional[bool] = None """If true, the unit price will be prorated to the billing period""" diff --git a/src/orb/types/shared/price_interval.py b/src/orb/types/shared/price_interval.py index 6240931b..03fa50be 100644 --- a/src/orb/types/shared/price_interval.py +++ b/src/orb/types/shared/price_interval.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Dict, List, Optional from datetime import datetime from .price import Price @@ -83,3 +83,9 @@ class PriceInterval(BaseModel): A list of customer IDs whose usage events will be aggregated and billed under this price interval. """ + + metric_parameter_overrides: Optional[Dict[str, object]] = None + """Override values for parameterized billable metric variables. + + Keys are parameter names, values are the override values. + """ diff --git a/src/orb/types/shared_params/new_floating_scalable_matrix_with_unit_pricing_price.py b/src/orb/types/shared_params/new_floating_scalable_matrix_with_unit_pricing_price.py index 374f11e1..009b8569 100644 --- a/src/orb/types/shared_params/new_floating_scalable_matrix_with_unit_pricing_price.py +++ b/src/orb/types/shared_params/new_floating_scalable_matrix_with_unit_pricing_price.py @@ -40,6 +40,9 @@ class ScalableMatrixWithUnitPricingConfig(TypedDict, total=False): unit_price: Required[str] """The final unit price to rate against the output of the matrix""" + grouping_key: Optional[str] + """The property used to group this price""" + prorate: Optional[bool] """If true, the unit price will be prorated to the billing period""" diff --git a/src/orb/types/shared_params/new_plan_scalable_matrix_with_unit_pricing_price.py b/src/orb/types/shared_params/new_plan_scalable_matrix_with_unit_pricing_price.py index f9bee34c..d2085ec1 100644 --- a/src/orb/types/shared_params/new_plan_scalable_matrix_with_unit_pricing_price.py +++ b/src/orb/types/shared_params/new_plan_scalable_matrix_with_unit_pricing_price.py @@ -40,6 +40,9 @@ class ScalableMatrixWithUnitPricingConfig(TypedDict, total=False): unit_price: Required[str] """The final unit price to rate against the output of the matrix""" + grouping_key: Optional[str] + """The property used to group this price""" + prorate: Optional[bool] """If true, the unit price will be prorated to the billing period""" diff --git a/src/orb/types/subscription_create_params.py b/src/orb/types/subscription_create_params.py index 0f454571..f504eafa 100644 --- a/src/orb/types/subscription_create_params.py +++ b/src/orb/types/subscription_create_params.py @@ -1022,6 +1022,12 @@ class AddPrice(TypedDict, total=False): The subscription's maximum amount for this price. """ + metric_parameter_overrides: Optional[Dict[str, object]] + """Override values for parameterized billable metric variables. + + Keys are parameter names, values are the override values. + """ + minimum_amount: Optional[str] """[DEPRECATED] Use add_adjustments instead. @@ -1788,6 +1794,12 @@ class ReplacePrice(TypedDict, total=False): The subscription's maximum amount for the replacement price. """ + metric_parameter_overrides: Optional[Dict[str, object]] + """Override values for parameterized billable metric variables. + + Keys are parameter names, values are the override values. + """ + minimum_amount: Optional[str] """[DEPRECATED] Use add_adjustments instead. diff --git a/src/orb/types/subscription_price_intervals_params.py b/src/orb/types/subscription_price_intervals_params.py index eba9360a..f747f583 100644 --- a/src/orb/types/subscription_price_intervals_params.py +++ b/src/orb/types/subscription_price_intervals_params.py @@ -729,6 +729,12 @@ class Add(TypedDict, total=False): billing period. """ + metric_parameter_overrides: Optional[Dict[str, object]] + """Override values for parameterized billable metric variables. + + Keys are parameter names, values are the override values (number or string). + """ + minimum_amount: Optional[float] """ The minimum amount that will be billed for this price interval for a given @@ -836,6 +842,12 @@ class Edit(TypedDict, total=False): on the price interval. """ + metric_parameter_overrides: Optional[Dict[str, object]] + """Override values for parameterized billable metric variables. + + Keys are parameter names, values are the override values (number or string). + """ + start_date: Annotated[Union[Union[str, datetime], BillingCycleRelativeDate], PropertyInfo(format="iso8601")] """The updated start date of this price interval. diff --git a/src/orb/types/subscription_schedule_plan_change_params.py b/src/orb/types/subscription_schedule_plan_change_params.py index e2208e29..666586f6 100644 --- a/src/orb/types/subscription_schedule_plan_change_params.py +++ b/src/orb/types/subscription_schedule_plan_change_params.py @@ -1010,6 +1010,12 @@ class AddPrice(TypedDict, total=False): The subscription's maximum amount for this price. """ + metric_parameter_overrides: Optional[Dict[str, object]] + """Override values for parameterized billable metric variables. + + Keys are parameter names, values are the override values. + """ + minimum_amount: Optional[str] """[DEPRECATED] Use add_adjustments instead. @@ -1776,6 +1782,12 @@ class ReplacePrice(TypedDict, total=False): The subscription's maximum amount for the replacement price. """ + metric_parameter_overrides: Optional[Dict[str, object]] + """Override values for parameterized billable metric variables. + + Keys are parameter names, values are the override values. + """ + minimum_amount: Optional[str] """[DEPRECATED] Use add_adjustments instead. diff --git a/tests/api_resources/beta/test_external_plan_id.py b/tests/api_resources/beta/test_external_plan_id.py index 13c78e4b..7507bb1d 100644 --- a/tests/api_resources/beta/test_external_plan_id.py +++ b/tests/api_resources/beta/test_external_plan_id.py @@ -74,6 +74,50 @@ def test_method_create_plan_version_with_all_params(self, client: Orb) -> None: "license_type_id": "license_type_id", "per_unit_cost_basis": "per_unit_cost_basis", }, + "license_allocation_price": { + "cadence": "annual", + "item_id": "item_id", + "license_allocations": [ + { + "amount": "amount", + "currency": "currency", + "write_off_overage": True, + } + ], + "model_type": "unit", + "name": "Annual fee", + "unit_config": { + "unit_amount": "unit_amount", + "prorated": True, + }, + "billable_metric_id": "billable_metric_id", + "billed_in_advance": True, + "billing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "conversion_rate": 0, + "conversion_rate_config": { + "conversion_rate_type": "unit", + "unit_config": {"unit_amount": "unit_amount"}, + }, + "currency": "currency", + "dimensional_price_configuration": { + "dimension_values": ["string"], + "dimensional_price_group_id": "dimensional_price_group_id", + "external_dimensional_price_group_id": "external_dimensional_price_group_id", + }, + "external_price_id": "external_price_id", + "fixed_price_quantity": 0, + "invoice_grouping_key": "x", + "invoicing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "license_type_id": "license_type_id", + "metadata": {"foo": "string"}, + "reference_id": "reference_id", + }, "plan_phase_order": 0, "price": { "cadence": "annual", @@ -172,6 +216,50 @@ def test_method_create_plan_version_with_all_params(self, client: Orb) -> None: "license_type_id": "license_type_id", "per_unit_cost_basis": "per_unit_cost_basis", }, + "license_allocation_price": { + "cadence": "annual", + "item_id": "item_id", + "license_allocations": [ + { + "amount": "amount", + "currency": "currency", + "write_off_overage": True, + } + ], + "model_type": "unit", + "name": "Annual fee", + "unit_config": { + "unit_amount": "unit_amount", + "prorated": True, + }, + "billable_metric_id": "billable_metric_id", + "billed_in_advance": True, + "billing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "conversion_rate": 0, + "conversion_rate_config": { + "conversion_rate_type": "unit", + "unit_config": {"unit_amount": "unit_amount"}, + }, + "currency": "currency", + "dimensional_price_configuration": { + "dimension_values": ["string"], + "dimensional_price_group_id": "dimensional_price_group_id", + "external_dimensional_price_group_id": "external_dimensional_price_group_id", + }, + "external_price_id": "external_price_id", + "fixed_price_quantity": 0, + "invoice_grouping_key": "x", + "invoicing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "license_type_id": "license_type_id", + "metadata": {"foo": "string"}, + "reference_id": "reference_id", + }, "plan_phase_order": 0, "price": { "cadence": "annual", @@ -403,6 +491,50 @@ async def test_method_create_plan_version_with_all_params(self, async_client: As "license_type_id": "license_type_id", "per_unit_cost_basis": "per_unit_cost_basis", }, + "license_allocation_price": { + "cadence": "annual", + "item_id": "item_id", + "license_allocations": [ + { + "amount": "amount", + "currency": "currency", + "write_off_overage": True, + } + ], + "model_type": "unit", + "name": "Annual fee", + "unit_config": { + "unit_amount": "unit_amount", + "prorated": True, + }, + "billable_metric_id": "billable_metric_id", + "billed_in_advance": True, + "billing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "conversion_rate": 0, + "conversion_rate_config": { + "conversion_rate_type": "unit", + "unit_config": {"unit_amount": "unit_amount"}, + }, + "currency": "currency", + "dimensional_price_configuration": { + "dimension_values": ["string"], + "dimensional_price_group_id": "dimensional_price_group_id", + "external_dimensional_price_group_id": "external_dimensional_price_group_id", + }, + "external_price_id": "external_price_id", + "fixed_price_quantity": 0, + "invoice_grouping_key": "x", + "invoicing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "license_type_id": "license_type_id", + "metadata": {"foo": "string"}, + "reference_id": "reference_id", + }, "plan_phase_order": 0, "price": { "cadence": "annual", @@ -501,6 +633,50 @@ async def test_method_create_plan_version_with_all_params(self, async_client: As "license_type_id": "license_type_id", "per_unit_cost_basis": "per_unit_cost_basis", }, + "license_allocation_price": { + "cadence": "annual", + "item_id": "item_id", + "license_allocations": [ + { + "amount": "amount", + "currency": "currency", + "write_off_overage": True, + } + ], + "model_type": "unit", + "name": "Annual fee", + "unit_config": { + "unit_amount": "unit_amount", + "prorated": True, + }, + "billable_metric_id": "billable_metric_id", + "billed_in_advance": True, + "billing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "conversion_rate": 0, + "conversion_rate_config": { + "conversion_rate_type": "unit", + "unit_config": {"unit_amount": "unit_amount"}, + }, + "currency": "currency", + "dimensional_price_configuration": { + "dimension_values": ["string"], + "dimensional_price_group_id": "dimensional_price_group_id", + "external_dimensional_price_group_id": "external_dimensional_price_group_id", + }, + "external_price_id": "external_price_id", + "fixed_price_quantity": 0, + "invoice_grouping_key": "x", + "invoicing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "license_type_id": "license_type_id", + "metadata": {"foo": "string"}, + "reference_id": "reference_id", + }, "plan_phase_order": 0, "price": { "cadence": "annual", diff --git a/tests/api_resources/customers/credits/test_ledger.py b/tests/api_resources/customers/credits/test_ledger.py index f3cf3ee6..d056bec6 100644 --- a/tests/api_resources/customers/credits/test_ledger.py +++ b/tests/api_resources/customers/credits/test_ledger.py @@ -110,6 +110,7 @@ def test_method_create_entry_with_all_params_overload_1(self, client: Orb) -> No "custom_due_date": parse_date("2019-12-27"), "invoice_date": parse_date("2019-12-27"), "item_id": "item_id", + "mark_as_paid": True, "memo": "memo", "net_terms": 0, "require_successful_payment": True, @@ -433,6 +434,7 @@ def test_method_create_entry_by_external_id_with_all_params_overload_1(self, cli "custom_due_date": parse_date("2019-12-27"), "invoice_date": parse_date("2019-12-27"), "item_id": "item_id", + "mark_as_paid": True, "memo": "memo", "net_terms": 0, "require_successful_payment": True, @@ -872,6 +874,7 @@ async def test_method_create_entry_with_all_params_overload_1(self, async_client "custom_due_date": parse_date("2019-12-27"), "invoice_date": parse_date("2019-12-27"), "item_id": "item_id", + "mark_as_paid": True, "memo": "memo", "net_terms": 0, "require_successful_payment": True, @@ -1195,6 +1198,7 @@ async def test_method_create_entry_by_external_id_with_all_params_overload_1(sel "custom_due_date": parse_date("2019-12-27"), "invoice_date": parse_date("2019-12-27"), "item_id": "item_id", + "mark_as_paid": True, "memo": "memo", "net_terms": 0, "require_successful_payment": True, diff --git a/tests/api_resources/test_alerts.py b/tests/api_resources/test_alerts.py index bcae7a6b..927d14aa 100644 --- a/tests/api_resources/test_alerts.py +++ b/tests/api_resources/test_alerts.py @@ -274,7 +274,9 @@ def test_method_create_for_subscription_with_all_params(self, client: Orb) -> No subscription_id="subscription_id", thresholds=[{"value": 0}], type="usage_exceeded", + grouping_keys=["string"], metric_id="metric_id", + pricing_unit_id="pricing_unit_id", ) assert_matches_type(Alert, alert, path=["response"]) @@ -670,7 +672,9 @@ async def test_method_create_for_subscription_with_all_params(self, async_client subscription_id="subscription_id", thresholds=[{"value": 0}], type="usage_exceeded", + grouping_keys=["string"], metric_id="metric_id", + pricing_unit_id="pricing_unit_id", ) assert_matches_type(Alert, alert, path=["response"]) diff --git a/tests/api_resources/test_beta.py b/tests/api_resources/test_beta.py index e391b9b2..d5e9c572 100644 --- a/tests/api_resources/test_beta.py +++ b/tests/api_resources/test_beta.py @@ -74,6 +74,50 @@ def test_method_create_plan_version_with_all_params(self, client: Orb) -> None: "license_type_id": "license_type_id", "per_unit_cost_basis": "per_unit_cost_basis", }, + "license_allocation_price": { + "cadence": "annual", + "item_id": "item_id", + "license_allocations": [ + { + "amount": "amount", + "currency": "currency", + "write_off_overage": True, + } + ], + "model_type": "unit", + "name": "Annual fee", + "unit_config": { + "unit_amount": "unit_amount", + "prorated": True, + }, + "billable_metric_id": "billable_metric_id", + "billed_in_advance": True, + "billing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "conversion_rate": 0, + "conversion_rate_config": { + "conversion_rate_type": "unit", + "unit_config": {"unit_amount": "unit_amount"}, + }, + "currency": "currency", + "dimensional_price_configuration": { + "dimension_values": ["string"], + "dimensional_price_group_id": "dimensional_price_group_id", + "external_dimensional_price_group_id": "external_dimensional_price_group_id", + }, + "external_price_id": "external_price_id", + "fixed_price_quantity": 0, + "invoice_grouping_key": "x", + "invoicing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "license_type_id": "license_type_id", + "metadata": {"foo": "string"}, + "reference_id": "reference_id", + }, "plan_phase_order": 0, "price": { "cadence": "annual", @@ -172,6 +216,50 @@ def test_method_create_plan_version_with_all_params(self, client: Orb) -> None: "license_type_id": "license_type_id", "per_unit_cost_basis": "per_unit_cost_basis", }, + "license_allocation_price": { + "cadence": "annual", + "item_id": "item_id", + "license_allocations": [ + { + "amount": "amount", + "currency": "currency", + "write_off_overage": True, + } + ], + "model_type": "unit", + "name": "Annual fee", + "unit_config": { + "unit_amount": "unit_amount", + "prorated": True, + }, + "billable_metric_id": "billable_metric_id", + "billed_in_advance": True, + "billing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "conversion_rate": 0, + "conversion_rate_config": { + "conversion_rate_type": "unit", + "unit_config": {"unit_amount": "unit_amount"}, + }, + "currency": "currency", + "dimensional_price_configuration": { + "dimension_values": ["string"], + "dimensional_price_group_id": "dimensional_price_group_id", + "external_dimensional_price_group_id": "external_dimensional_price_group_id", + }, + "external_price_id": "external_price_id", + "fixed_price_quantity": 0, + "invoice_grouping_key": "x", + "invoicing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "license_type_id": "license_type_id", + "metadata": {"foo": "string"}, + "reference_id": "reference_id", + }, "plan_phase_order": 0, "price": { "cadence": "annual", @@ -403,6 +491,50 @@ async def test_method_create_plan_version_with_all_params(self, async_client: As "license_type_id": "license_type_id", "per_unit_cost_basis": "per_unit_cost_basis", }, + "license_allocation_price": { + "cadence": "annual", + "item_id": "item_id", + "license_allocations": [ + { + "amount": "amount", + "currency": "currency", + "write_off_overage": True, + } + ], + "model_type": "unit", + "name": "Annual fee", + "unit_config": { + "unit_amount": "unit_amount", + "prorated": True, + }, + "billable_metric_id": "billable_metric_id", + "billed_in_advance": True, + "billing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "conversion_rate": 0, + "conversion_rate_config": { + "conversion_rate_type": "unit", + "unit_config": {"unit_amount": "unit_amount"}, + }, + "currency": "currency", + "dimensional_price_configuration": { + "dimension_values": ["string"], + "dimensional_price_group_id": "dimensional_price_group_id", + "external_dimensional_price_group_id": "external_dimensional_price_group_id", + }, + "external_price_id": "external_price_id", + "fixed_price_quantity": 0, + "invoice_grouping_key": "x", + "invoicing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "license_type_id": "license_type_id", + "metadata": {"foo": "string"}, + "reference_id": "reference_id", + }, "plan_phase_order": 0, "price": { "cadence": "annual", @@ -501,6 +633,50 @@ async def test_method_create_plan_version_with_all_params(self, async_client: As "license_type_id": "license_type_id", "per_unit_cost_basis": "per_unit_cost_basis", }, + "license_allocation_price": { + "cadence": "annual", + "item_id": "item_id", + "license_allocations": [ + { + "amount": "amount", + "currency": "currency", + "write_off_overage": True, + } + ], + "model_type": "unit", + "name": "Annual fee", + "unit_config": { + "unit_amount": "unit_amount", + "prorated": True, + }, + "billable_metric_id": "billable_metric_id", + "billed_in_advance": True, + "billing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "conversion_rate": 0, + "conversion_rate_config": { + "conversion_rate_type": "unit", + "unit_config": {"unit_amount": "unit_amount"}, + }, + "currency": "currency", + "dimensional_price_configuration": { + "dimension_values": ["string"], + "dimensional_price_group_id": "dimensional_price_group_id", + "external_dimensional_price_group_id": "external_dimensional_price_group_id", + }, + "external_price_id": "external_price_id", + "fixed_price_quantity": 0, + "invoice_grouping_key": "x", + "invoicing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "license_type_id": "license_type_id", + "metadata": {"foo": "string"}, + "reference_id": "reference_id", + }, "plan_phase_order": 0, "price": { "cadence": "annual", diff --git a/tests/api_resources/test_invoices.py b/tests/api_resources/test_invoices.py index 316aefc3..14d75d8c 100644 --- a/tests/api_resources/test_invoices.py +++ b/tests/api_resources/test_invoices.py @@ -62,6 +62,7 @@ def test_method_create_with_all_params(self, client: Orb) -> None: }, } ], + auto_collection=True, customer_id="4khy3nwzktxv7", discount={ "discount_type": "percentage", @@ -144,6 +145,7 @@ def test_method_update(self, client: Orb) -> None: def test_method_update_with_all_params(self, client: Orb) -> None: invoice = client.invoices.update( invoice_id="invoice_id", + auto_collection=True, due_date=parse_date("2023-09-22"), invoice_date=parse_date("2023-09-22"), metadata={"foo": "string"}, @@ -663,6 +665,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No }, } ], + auto_collection=True, customer_id="4khy3nwzktxv7", discount={ "discount_type": "percentage", @@ -745,6 +748,7 @@ async def test_method_update(self, async_client: AsyncOrb) -> None: async def test_method_update_with_all_params(self, async_client: AsyncOrb) -> None: invoice = await async_client.invoices.update( invoice_id="invoice_id", + auto_collection=True, due_date=parse_date("2023-09-22"), invoice_date=parse_date("2023-09-22"), metadata={"foo": "string"}, diff --git a/tests/api_resources/test_plans.py b/tests/api_resources/test_plans.py index 24286962..d67a670f 100644 --- a/tests/api_resources/test_plans.py +++ b/tests/api_resources/test_plans.py @@ -55,6 +55,50 @@ def test_method_create_with_all_params(self, client: Orb) -> None: "license_type_id": "license_type_id", "per_unit_cost_basis": "per_unit_cost_basis", }, + "license_allocation_price": { + "cadence": "annual", + "item_id": "item_id", + "license_allocations": [ + { + "amount": "amount", + "currency": "currency", + "write_off_overage": True, + } + ], + "model_type": "unit", + "name": "Annual fee", + "unit_config": { + "unit_amount": "unit_amount", + "prorated": True, + }, + "billable_metric_id": "billable_metric_id", + "billed_in_advance": True, + "billing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "conversion_rate": 0, + "conversion_rate_config": { + "conversion_rate_type": "unit", + "unit_config": {"unit_amount": "unit_amount"}, + }, + "currency": "currency", + "dimensional_price_configuration": { + "dimension_values": ["string"], + "dimensional_price_group_id": "dimensional_price_group_id", + "external_dimensional_price_group_id": "external_dimensional_price_group_id", + }, + "external_price_id": "external_price_id", + "fixed_price_quantity": 0, + "invoice_grouping_key": "x", + "invoicing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "license_type_id": "license_type_id", + "metadata": {"foo": "string"}, + "reference_id": "reference_id", + }, "plan_phase_order": 0, "price": { "cadence": "annual", @@ -326,6 +370,50 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No "license_type_id": "license_type_id", "per_unit_cost_basis": "per_unit_cost_basis", }, + "license_allocation_price": { + "cadence": "annual", + "item_id": "item_id", + "license_allocations": [ + { + "amount": "amount", + "currency": "currency", + "write_off_overage": True, + } + ], + "model_type": "unit", + "name": "Annual fee", + "unit_config": { + "unit_amount": "unit_amount", + "prorated": True, + }, + "billable_metric_id": "billable_metric_id", + "billed_in_advance": True, + "billing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "conversion_rate": 0, + "conversion_rate_config": { + "conversion_rate_type": "unit", + "unit_config": {"unit_amount": "unit_amount"}, + }, + "currency": "currency", + "dimensional_price_configuration": { + "dimension_values": ["string"], + "dimensional_price_group_id": "dimensional_price_group_id", + "external_dimensional_price_group_id": "external_dimensional_price_group_id", + }, + "external_price_id": "external_price_id", + "fixed_price_quantity": 0, + "invoice_grouping_key": "x", + "invoicing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "license_type_id": "license_type_id", + "metadata": {"foo": "string"}, + "reference_id": "reference_id", + }, "plan_phase_order": 0, "price": { "cadence": "annual", diff --git a/tests/api_resources/test_prices.py b/tests/api_resources/test_prices.py index 68a1c59b..3198d4e5 100644 --- a/tests/api_resources/test_prices.py +++ b/tests/api_resources/test_prices.py @@ -2802,6 +2802,7 @@ def test_method_create_with_all_params_overload_25(self, client: Orb) -> None: } ], "unit_price": "unit_price", + "grouping_key": "x", "prorate": True, "second_dimension": "second_dimension", }, @@ -3618,6 +3619,7 @@ def test_method_evaluate_with_all_params(self, client: Orb) -> None: external_customer_id="external_customer_id", filter="my_numeric_property > 100 AND my_other_property = 'bar'", grouping_keys=["case when my_event_type = 'foo' then true else false end"], + metric_parameter_overrides={"foo": "bar"}, ) assert_matches_type(PriceEvaluateResponse, price, path=["response"]) @@ -3678,6 +3680,7 @@ def test_method_evaluate_multiple_with_all_params(self, client: Orb) -> None: "external_price_id": "external_price_id", "filter": "my_numeric_property > 100 AND my_other_property = 'bar'", "grouping_keys": ["case when my_event_type = 'foo' then true else false end"], + "metric_parameter_overrides": {"foo": "bar"}, "price": { "cadence": "annual", "currency": "currency", @@ -3775,6 +3778,7 @@ def test_method_evaluate_preview_events_with_all_params(self, client: Orb) -> No "external_price_id": "external_price_id", "filter": "my_numeric_property > 100 AND my_other_property = 'bar'", "grouping_keys": ["case when my_event_type = 'foo' then true else false end"], + "metric_parameter_overrides": {"foo": "bar"}, "price": { "cadence": "annual", "currency": "currency", @@ -6665,6 +6669,7 @@ async def test_method_create_with_all_params_overload_25(self, async_client: Asy } ], "unit_price": "unit_price", + "grouping_key": "x", "prorate": True, "second_dimension": "second_dimension", }, @@ -7481,6 +7486,7 @@ async def test_method_evaluate_with_all_params(self, async_client: AsyncOrb) -> external_customer_id="external_customer_id", filter="my_numeric_property > 100 AND my_other_property = 'bar'", grouping_keys=["case when my_event_type = 'foo' then true else false end"], + metric_parameter_overrides={"foo": "bar"}, ) assert_matches_type(PriceEvaluateResponse, price, path=["response"]) @@ -7541,6 +7547,7 @@ async def test_method_evaluate_multiple_with_all_params(self, async_client: Asyn "external_price_id": "external_price_id", "filter": "my_numeric_property > 100 AND my_other_property = 'bar'", "grouping_keys": ["case when my_event_type = 'foo' then true else false end"], + "metric_parameter_overrides": {"foo": "bar"}, "price": { "cadence": "annual", "currency": "currency", @@ -7638,6 +7645,7 @@ async def test_method_evaluate_preview_events_with_all_params(self, async_client "external_price_id": "external_price_id", "filter": "my_numeric_property > 100 AND my_other_property = 'bar'", "grouping_keys": ["case when my_event_type = 'foo' then true else false end"], + "metric_parameter_overrides": {"foo": "bar"}, "price": { "cadence": "annual", "currency": "currency", diff --git a/tests/api_resources/test_subscriptions.py b/tests/api_resources/test_subscriptions.py index 2078ccf8..dd759427 100644 --- a/tests/api_resources/test_subscriptions.py +++ b/tests/api_resources/test_subscriptions.py @@ -90,6 +90,7 @@ def test_method_create_with_all_params(self, client: Orb) -> None: "end_date": parse_datetime("2019-12-27T18:11:19.117Z"), "external_price_id": "external_price_id", "maximum_amount": "1.23", + "metric_parameter_overrides": {"foo": "bar"}, "minimum_amount": "1.23", "plan_phase_order": 0, "price": { @@ -224,6 +225,7 @@ def test_method_create_with_all_params(self, client: Orb) -> None: "external_price_id": "external_price_id", "fixed_price_quantity": 2, "maximum_amount": "1.23", + "metric_parameter_overrides": {"foo": "bar"}, "minimum_amount": "1.23", "price": { "cadence": "annual", @@ -686,6 +688,7 @@ def test_method_price_intervals_with_all_params(self, client: Orb) -> None: } ], "maximum_amount": 0, + "metric_parameter_overrides": {"foo": "bar"}, "minimum_amount": 0, "price": { "cadence": "annual", @@ -766,6 +769,7 @@ def test_method_price_intervals_with_all_params(self, client: Orb) -> None: "quantity": 5, } ], + "metric_parameter_overrides": {"foo": "bar"}, "start_date": parse_datetime("2019-12-27T18:11:19.117Z"), "usage_customer_ids": ["string"], } @@ -938,6 +942,7 @@ def test_method_schedule_plan_change_with_all_params(self, client: Orb) -> None: "end_date": parse_datetime("2019-12-27T18:11:19.117Z"), "external_price_id": "external_price_id", "maximum_amount": "1.23", + "metric_parameter_overrides": {"foo": "bar"}, "minimum_amount": "1.23", "plan_phase_order": 0, "price": { @@ -1065,6 +1070,7 @@ def test_method_schedule_plan_change_with_all_params(self, client: Orb) -> None: "external_price_id": "external_price_id", "fixed_price_quantity": 2, "maximum_amount": "1.23", + "metric_parameter_overrides": {"foo": "bar"}, "minimum_amount": "1.23", "price": { "cadence": "annual", @@ -1490,6 +1496,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No "end_date": parse_datetime("2019-12-27T18:11:19.117Z"), "external_price_id": "external_price_id", "maximum_amount": "1.23", + "metric_parameter_overrides": {"foo": "bar"}, "minimum_amount": "1.23", "plan_phase_order": 0, "price": { @@ -1624,6 +1631,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No "external_price_id": "external_price_id", "fixed_price_quantity": 2, "maximum_amount": "1.23", + "metric_parameter_overrides": {"foo": "bar"}, "minimum_amount": "1.23", "price": { "cadence": "annual", @@ -2086,6 +2094,7 @@ async def test_method_price_intervals_with_all_params(self, async_client: AsyncO } ], "maximum_amount": 0, + "metric_parameter_overrides": {"foo": "bar"}, "minimum_amount": 0, "price": { "cadence": "annual", @@ -2166,6 +2175,7 @@ async def test_method_price_intervals_with_all_params(self, async_client: AsyncO "quantity": 5, } ], + "metric_parameter_overrides": {"foo": "bar"}, "start_date": parse_datetime("2019-12-27T18:11:19.117Z"), "usage_customer_ids": ["string"], } @@ -2338,6 +2348,7 @@ async def test_method_schedule_plan_change_with_all_params(self, async_client: A "end_date": parse_datetime("2019-12-27T18:11:19.117Z"), "external_price_id": "external_price_id", "maximum_amount": "1.23", + "metric_parameter_overrides": {"foo": "bar"}, "minimum_amount": "1.23", "plan_phase_order": 0, "price": { @@ -2465,6 +2476,7 @@ async def test_method_schedule_plan_change_with_all_params(self, async_client: A "external_price_id": "external_price_id", "fixed_price_quantity": 2, "maximum_amount": "1.23", + "metric_parameter_overrides": {"foo": "bar"}, "minimum_amount": "1.23", "price": { "cadence": "annual", diff --git a/tests/test_client.py b/tests/test_client.py index 32ed4d23..99f8e5c0 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -993,6 +993,14 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None: # Test that the proxy environment variables are set correctly monkeypatch.setenv("HTTPS_PROXY", "https://example.org") + # Delete in case our environment has any proxy env vars set + monkeypatch.delenv("HTTP_PROXY", raising=False) + monkeypatch.delenv("ALL_PROXY", raising=False) + monkeypatch.delenv("NO_PROXY", raising=False) + monkeypatch.delenv("http_proxy", raising=False) + monkeypatch.delenv("https_proxy", raising=False) + monkeypatch.delenv("all_proxy", raising=False) + monkeypatch.delenv("no_proxy", raising=False) client = DefaultHttpxClient() @@ -1947,6 +1955,14 @@ async def test_get_platform(self) -> None: async def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None: # Test that the proxy environment variables are set correctly monkeypatch.setenv("HTTPS_PROXY", "https://example.org") + # Delete in case our environment has any proxy env vars set + monkeypatch.delenv("HTTP_PROXY", raising=False) + monkeypatch.delenv("ALL_PROXY", raising=False) + monkeypatch.delenv("NO_PROXY", raising=False) + monkeypatch.delenv("http_proxy", raising=False) + monkeypatch.delenv("https_proxy", raising=False) + monkeypatch.delenv("all_proxy", raising=False) + monkeypatch.delenv("no_proxy", raising=False) client = DefaultAsyncHttpxClient()