diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 88ef31c0..d11c8fc3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.19.4" + ".": "3.20.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 88277273..605226f0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 106 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-e8dad7eee5621fe2ba948dfd00dabf170d9d92ce615a9f04b0f546f4d8bf39ba.yml -openapi_spec_hash: 3f6a98e3a1b3a47acebd67a960090ebf -config_hash: 7e523cf79552b8936bd772f2e1025e5f +configured_endpoints: 114 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-6d2a5b5d2cfb485e1a548aa15e1e36844e1f14f42553033822e1c570c8aa0825.yml +openapi_spec_hash: 0266a5aaced5e768bcf6a70924d69799 +config_hash: e63f2d098e5d12f63ae4cd8270aa5c3c diff --git a/CHANGELOG.md b/CHANGELOG.md index 4dc86af4..7f1b5033 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 3.20.0 (2025-05-28) + +Full Changelog: [v3.19.4...v3.20.0](https://github.com/orbcorp/orb-python/compare/v3.19.4...v3.20.0) + +### Features + +* **api:** api update ([fdbf7cd](https://github.com/orbcorp/orb-python/commit/fdbf7cdf4722807ab09f34d7fdc99b7858b8c516)) +* **api:** api update ([3d10507](https://github.com/orbcorp/orb-python/commit/3d10507620fa336baa4832e15bcea21d90f238bb)) +* **api:** manual updates ([28fd390](https://github.com/orbcorp/orb-python/commit/28fd390a506a484ea47673df0ce56a9b391bf150)) + + +### Chores + +* **docs:** grammar improvements ([a64eaa1](https://github.com/orbcorp/orb-python/commit/a64eaa14476b601c1a2d97761dd112d3fe90161e)) + ## 3.19.4 (2025-05-15) Full Changelog: [v3.19.3...v3.19.4](https://github.com/orbcorp/orb-python/compare/v3.19.3...v3.19.4) diff --git a/SECURITY.md b/SECURITY.md index 6f64d22c..3011c342 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -16,11 +16,11 @@ before making any information public. ## Reporting Non-SDK Related Security Issues If you encounter security issues that are not directly related to SDKs but pertain to the services -or products provided by Orb please follow the respective company's security reporting guidelines. +or products provided by Orb, please follow the respective company's security reporting guidelines. ### Orb Terms and Policies -Please contact team@withorb.com for any questions or concerns regarding security of our services. +Please contact team@withorb.com for any questions or concerns regarding the security of our services. --- diff --git a/api.md b/api.md index 2a1498a9..4a380b71 100644 --- a/api.md +++ b/api.md @@ -25,6 +25,28 @@ Methods: - client.top_level.ping() -> TopLevelPingResponse +# Beta + +Types: + +```python +from orb.types import PlanVersion, PlanVersionPhase +``` + +Methods: + +- client.beta.create_plan_version(plan_id, \*\*params) -> PlanVersion +- client.beta.fetch_plan_version(version, \*, plan_id) -> PlanVersion +- client.beta.set_default_plan_version(plan_id, \*\*params) -> Plan + +## ExternalPlanID + +Methods: + +- client.beta.external_plan_id.create_plan_version(external_plan_id, \*\*params) -> PlanVersion +- client.beta.external_plan_id.fetch_plan_version(version, \*, external_plan_id) -> PlanVersion +- client.beta.external_plan_id.set_default_plan_version(external_plan_id, \*\*params) -> Plan + # Coupons Types: @@ -260,6 +282,7 @@ Methods: - client.items.create(\*\*params) -> Item - client.items.update(item_id, \*\*params) -> Item - client.items.list(\*\*params) -> SyncPage[Item] +- client.items.archive(item_id) -> Item - client.items.fetch(item_id) -> Item # Metrics @@ -304,7 +327,12 @@ Methods: Types: ```python -from orb.types import EvaluatePriceGroup, Price, PriceEvaluateResponse +from orb.types import ( + EvaluatePriceGroup, + Price, + PriceEvaluateResponse, + PriceEvaluateMultipleResponse, +) ``` Methods: @@ -313,6 +341,7 @@ Methods: - client.prices.update(price_id, \*\*params) -> Price - client.prices.list(\*\*params) -> SyncPage[Price] - client.prices.evaluate(price_id, \*\*params) -> PriceEvaluateResponse +- client.prices.evaluate_multiple(\*\*params) -> PriceEvaluateMultipleResponse - client.prices.fetch(price_id) -> Price ## ExternalPriceID diff --git a/pyproject.toml b/pyproject.toml index 995eb8a9..ec30c402 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "orb-billing" -version = "3.19.4" +version = "3.20.0" description = "The official Python library for the orb API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/orb/_client.py b/src/orb/_client.py index 7ff77c19..6549d77e 100644 --- a/src/orb/_client.py +++ b/src/orb/_client.py @@ -36,6 +36,7 @@ if TYPE_CHECKING: from .resources import ( + beta, items, plans, alerts, @@ -57,6 +58,7 @@ from .resources.alerts import Alerts, AsyncAlerts from .resources.metrics import Metrics, AsyncMetrics from .resources.invoices import Invoices, AsyncInvoices + from .resources.beta.beta import Beta, AsyncBeta from .resources.top_level import TopLevel, AsyncTopLevel from .resources.plans.plans import Plans, AsyncPlans from .resources.credit_notes import CreditNotes, AsyncCreditNotes @@ -146,6 +148,12 @@ def top_level(self) -> TopLevel: return TopLevel(self) + @cached_property + def beta(self) -> Beta: + from .resources.beta import Beta + + return Beta(self) + @cached_property def coupons(self) -> Coupons: from .resources.coupons import Coupons @@ -470,6 +478,12 @@ def top_level(self) -> AsyncTopLevel: return AsyncTopLevel(self) + @cached_property + def beta(self) -> AsyncBeta: + from .resources.beta import AsyncBeta + + return AsyncBeta(self) + @cached_property def coupons(self) -> AsyncCoupons: from .resources.coupons import AsyncCoupons @@ -735,6 +749,12 @@ def top_level(self) -> top_level.TopLevelWithRawResponse: return TopLevelWithRawResponse(self._client.top_level) + @cached_property + def beta(self) -> beta.BetaWithRawResponse: + from .resources.beta import BetaWithRawResponse + + return BetaWithRawResponse(self._client.beta) + @cached_property def coupons(self) -> coupons.CouponsWithRawResponse: from .resources.coupons import CouponsWithRawResponse @@ -832,6 +852,12 @@ def top_level(self) -> top_level.AsyncTopLevelWithRawResponse: return AsyncTopLevelWithRawResponse(self._client.top_level) + @cached_property + def beta(self) -> beta.AsyncBetaWithRawResponse: + from .resources.beta import AsyncBetaWithRawResponse + + return AsyncBetaWithRawResponse(self._client.beta) + @cached_property def coupons(self) -> coupons.AsyncCouponsWithRawResponse: from .resources.coupons import AsyncCouponsWithRawResponse @@ -929,6 +955,12 @@ def top_level(self) -> top_level.TopLevelWithStreamingResponse: return TopLevelWithStreamingResponse(self._client.top_level) + @cached_property + def beta(self) -> beta.BetaWithStreamingResponse: + from .resources.beta import BetaWithStreamingResponse + + return BetaWithStreamingResponse(self._client.beta) + @cached_property def coupons(self) -> coupons.CouponsWithStreamingResponse: from .resources.coupons import CouponsWithStreamingResponse @@ -1026,6 +1058,12 @@ def top_level(self) -> top_level.AsyncTopLevelWithStreamingResponse: return AsyncTopLevelWithStreamingResponse(self._client.top_level) + @cached_property + def beta(self) -> beta.AsyncBetaWithStreamingResponse: + from .resources.beta import AsyncBetaWithStreamingResponse + + return AsyncBetaWithStreamingResponse(self._client.beta) + @cached_property def coupons(self) -> coupons.AsyncCouponsWithStreamingResponse: from .resources.coupons import AsyncCouponsWithStreamingResponse diff --git a/src/orb/_version.py b/src/orb/_version.py index ecea48a2..b3d162a1 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__ = "3.19.4" # x-release-please-version +__version__ = "3.20.0" # x-release-please-version diff --git a/src/orb/resources/__init__.py b/src/orb/resources/__init__.py index 80634301..09ab61de 100644 --- a/src/orb/resources/__init__.py +++ b/src/orb/resources/__init__.py @@ -1,5 +1,13 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from .beta import ( + Beta, + AsyncBeta, + BetaWithRawResponse, + AsyncBetaWithRawResponse, + BetaWithStreamingResponse, + AsyncBetaWithStreamingResponse, +) from .items import ( Items, AsyncItems, @@ -132,6 +140,12 @@ "AsyncTopLevelWithRawResponse", "TopLevelWithStreamingResponse", "AsyncTopLevelWithStreamingResponse", + "Beta", + "AsyncBeta", + "BetaWithRawResponse", + "AsyncBetaWithRawResponse", + "BetaWithStreamingResponse", + "AsyncBetaWithStreamingResponse", "Coupons", "AsyncCoupons", "CouponsWithRawResponse", diff --git a/src/orb/resources/beta/__init__.py b/src/orb/resources/beta/__init__.py new file mode 100644 index 00000000..584deb5e --- /dev/null +++ b/src/orb/resources/beta/__init__.py @@ -0,0 +1,33 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from .beta import ( + Beta, + AsyncBeta, + BetaWithRawResponse, + AsyncBetaWithRawResponse, + BetaWithStreamingResponse, + AsyncBetaWithStreamingResponse, +) +from .external_plan_id import ( + ExternalPlanID, + AsyncExternalPlanID, + ExternalPlanIDWithRawResponse, + AsyncExternalPlanIDWithRawResponse, + ExternalPlanIDWithStreamingResponse, + AsyncExternalPlanIDWithStreamingResponse, +) + +__all__ = [ + "ExternalPlanID", + "AsyncExternalPlanID", + "ExternalPlanIDWithRawResponse", + "AsyncExternalPlanIDWithRawResponse", + "ExternalPlanIDWithStreamingResponse", + "AsyncExternalPlanIDWithStreamingResponse", + "Beta", + "AsyncBeta", + "BetaWithRawResponse", + "AsyncBetaWithRawResponse", + "BetaWithStreamingResponse", + "AsyncBetaWithStreamingResponse", +] diff --git a/src/orb/resources/beta/beta.py b/src/orb/resources/beta/beta.py new file mode 100644 index 00000000..79bd6505 --- /dev/null +++ b/src/orb/resources/beta/beta.py @@ -0,0 +1,500 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Iterable, Optional + +import httpx + +from ... import _legacy_response +from ...types import beta_create_plan_version_params, beta_set_default_plan_version_params +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import maybe_transform, async_maybe_transform +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ...types.plan import Plan +from ..._base_client import make_request_options +from .external_plan_id import ( + ExternalPlanID, + AsyncExternalPlanID, + ExternalPlanIDWithRawResponse, + AsyncExternalPlanIDWithRawResponse, + ExternalPlanIDWithStreamingResponse, + AsyncExternalPlanIDWithStreamingResponse, +) +from ...types.plan_version import PlanVersion + +__all__ = ["Beta", "AsyncBeta"] + + +class Beta(SyncAPIResource): + @cached_property + def external_plan_id(self) -> ExternalPlanID: + return ExternalPlanID(self._client) + + @cached_property + def with_raw_response(self) -> BetaWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/orbcorp/orb-python#accessing-raw-response-data-eg-headers + """ + return BetaWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> BetaWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/orbcorp/orb-python#with_streaming_response + """ + return BetaWithStreamingResponse(self) + + def create_plan_version( + self, + plan_id: str, + *, + version: int, + add_adjustments: Optional[Iterable[beta_create_plan_version_params.AddAdjustment]] | NotGiven = NOT_GIVEN, + add_prices: Optional[Iterable[beta_create_plan_version_params.AddPrice]] | NotGiven = NOT_GIVEN, + remove_adjustments: Optional[Iterable[beta_create_plan_version_params.RemoveAdjustment]] | NotGiven = NOT_GIVEN, + remove_prices: Optional[Iterable[beta_create_plan_version_params.RemovePrice]] | NotGiven = NOT_GIVEN, + replace_adjustments: Optional[Iterable[beta_create_plan_version_params.ReplaceAdjustment]] + | NotGiven = NOT_GIVEN, + replace_prices: Optional[Iterable[beta_create_plan_version_params.ReplacePrice]] | NotGiven = NOT_GIVEN, + set_as_default: Optional[bool] | NotGiven = NOT_GIVEN, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> PlanVersion: + """This API endpoint is in beta and its interface may change. + + It is recommended for + use only in test mode. + + This endpoint allows the creation of a new plan version for an existing plan. + + Args: + version: New version number. + + add_adjustments: Additional adjustments to be added to the plan. + + add_prices: Additional prices to be added to the plan. + + remove_adjustments: Adjustments to be removed from the plan. + + remove_prices: Prices to be removed from the plan. + + replace_adjustments: Adjustments to be replaced with additional adjustments on the plan. + + replace_prices: Prices to be replaced with additional prices on the plan. + + set_as_default: Set this new plan version as the default + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not plan_id: + raise ValueError(f"Expected a non-empty value for `plan_id` but received {plan_id!r}") + return self._post( + f"/plans/{plan_id}/versions", + body=maybe_transform( + { + "version": version, + "add_adjustments": add_adjustments, + "add_prices": add_prices, + "remove_adjustments": remove_adjustments, + "remove_prices": remove_prices, + "replace_adjustments": replace_adjustments, + "replace_prices": replace_prices, + "set_as_default": set_as_default, + }, + beta_create_plan_version_params.BetaCreatePlanVersionParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=PlanVersion, + ) + + def fetch_plan_version( + self, + version: str, + *, + plan_id: str, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> PlanVersion: + """This API endpoint is in beta and its interface may change. + + It is recommended for + use only in test mode. + + This endpoint is used to fetch a plan version. It returns the phases, prices, + and adjustments present on this version of the plan. + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not plan_id: + raise ValueError(f"Expected a non-empty value for `plan_id` but received {plan_id!r}") + if not version: + raise ValueError(f"Expected a non-empty value for `version` but received {version!r}") + return self._get( + f"/plans/{plan_id}/versions/{version}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=PlanVersion, + ) + + def set_default_plan_version( + self, + plan_id: str, + *, + version: int, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Plan: + """This API endpoint is in beta and its interface may change. + + It is recommended for + use only in test mode. + + This endpoint allows setting the default version of a plan. + + Args: + version: Plan version to set as the default. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not plan_id: + raise ValueError(f"Expected a non-empty value for `plan_id` but received {plan_id!r}") + return self._post( + f"/plans/{plan_id}/set_default_version", + body=maybe_transform( + {"version": version}, beta_set_default_plan_version_params.BetaSetDefaultPlanVersionParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Plan, + ) + + +class AsyncBeta(AsyncAPIResource): + @cached_property + def external_plan_id(self) -> AsyncExternalPlanID: + return AsyncExternalPlanID(self._client) + + @cached_property + def with_raw_response(self) -> AsyncBetaWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/orbcorp/orb-python#accessing-raw-response-data-eg-headers + """ + return AsyncBetaWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncBetaWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/orbcorp/orb-python#with_streaming_response + """ + return AsyncBetaWithStreamingResponse(self) + + async def create_plan_version( + self, + plan_id: str, + *, + version: int, + add_adjustments: Optional[Iterable[beta_create_plan_version_params.AddAdjustment]] | NotGiven = NOT_GIVEN, + add_prices: Optional[Iterable[beta_create_plan_version_params.AddPrice]] | NotGiven = NOT_GIVEN, + remove_adjustments: Optional[Iterable[beta_create_plan_version_params.RemoveAdjustment]] | NotGiven = NOT_GIVEN, + remove_prices: Optional[Iterable[beta_create_plan_version_params.RemovePrice]] | NotGiven = NOT_GIVEN, + replace_adjustments: Optional[Iterable[beta_create_plan_version_params.ReplaceAdjustment]] + | NotGiven = NOT_GIVEN, + replace_prices: Optional[Iterable[beta_create_plan_version_params.ReplacePrice]] | NotGiven = NOT_GIVEN, + set_as_default: Optional[bool] | NotGiven = NOT_GIVEN, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> PlanVersion: + """This API endpoint is in beta and its interface may change. + + It is recommended for + use only in test mode. + + This endpoint allows the creation of a new plan version for an existing plan. + + Args: + version: New version number. + + add_adjustments: Additional adjustments to be added to the plan. + + add_prices: Additional prices to be added to the plan. + + remove_adjustments: Adjustments to be removed from the plan. + + remove_prices: Prices to be removed from the plan. + + replace_adjustments: Adjustments to be replaced with additional adjustments on the plan. + + replace_prices: Prices to be replaced with additional prices on the plan. + + set_as_default: Set this new plan version as the default + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not plan_id: + raise ValueError(f"Expected a non-empty value for `plan_id` but received {plan_id!r}") + return await self._post( + f"/plans/{plan_id}/versions", + body=await async_maybe_transform( + { + "version": version, + "add_adjustments": add_adjustments, + "add_prices": add_prices, + "remove_adjustments": remove_adjustments, + "remove_prices": remove_prices, + "replace_adjustments": replace_adjustments, + "replace_prices": replace_prices, + "set_as_default": set_as_default, + }, + beta_create_plan_version_params.BetaCreatePlanVersionParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=PlanVersion, + ) + + async def fetch_plan_version( + self, + version: str, + *, + plan_id: str, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> PlanVersion: + """This API endpoint is in beta and its interface may change. + + It is recommended for + use only in test mode. + + This endpoint is used to fetch a plan version. It returns the phases, prices, + and adjustments present on this version of the plan. + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not plan_id: + raise ValueError(f"Expected a non-empty value for `plan_id` but received {plan_id!r}") + if not version: + raise ValueError(f"Expected a non-empty value for `version` but received {version!r}") + return await self._get( + f"/plans/{plan_id}/versions/{version}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=PlanVersion, + ) + + async def set_default_plan_version( + self, + plan_id: str, + *, + version: int, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Plan: + """This API endpoint is in beta and its interface may change. + + It is recommended for + use only in test mode. + + This endpoint allows setting the default version of a plan. + + Args: + version: Plan version to set as the default. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not plan_id: + raise ValueError(f"Expected a non-empty value for `plan_id` but received {plan_id!r}") + return await self._post( + f"/plans/{plan_id}/set_default_version", + body=await async_maybe_transform( + {"version": version}, beta_set_default_plan_version_params.BetaSetDefaultPlanVersionParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Plan, + ) + + +class BetaWithRawResponse: + def __init__(self, beta: Beta) -> None: + self._beta = beta + + self.create_plan_version = _legacy_response.to_raw_response_wrapper( + beta.create_plan_version, + ) + self.fetch_plan_version = _legacy_response.to_raw_response_wrapper( + beta.fetch_plan_version, + ) + self.set_default_plan_version = _legacy_response.to_raw_response_wrapper( + beta.set_default_plan_version, + ) + + @cached_property + def external_plan_id(self) -> ExternalPlanIDWithRawResponse: + return ExternalPlanIDWithRawResponse(self._beta.external_plan_id) + + +class AsyncBetaWithRawResponse: + def __init__(self, beta: AsyncBeta) -> None: + self._beta = beta + + self.create_plan_version = _legacy_response.async_to_raw_response_wrapper( + beta.create_plan_version, + ) + self.fetch_plan_version = _legacy_response.async_to_raw_response_wrapper( + beta.fetch_plan_version, + ) + self.set_default_plan_version = _legacy_response.async_to_raw_response_wrapper( + beta.set_default_plan_version, + ) + + @cached_property + def external_plan_id(self) -> AsyncExternalPlanIDWithRawResponse: + return AsyncExternalPlanIDWithRawResponse(self._beta.external_plan_id) + + +class BetaWithStreamingResponse: + def __init__(self, beta: Beta) -> None: + self._beta = beta + + self.create_plan_version = to_streamed_response_wrapper( + beta.create_plan_version, + ) + self.fetch_plan_version = to_streamed_response_wrapper( + beta.fetch_plan_version, + ) + self.set_default_plan_version = to_streamed_response_wrapper( + beta.set_default_plan_version, + ) + + @cached_property + def external_plan_id(self) -> ExternalPlanIDWithStreamingResponse: + return ExternalPlanIDWithStreamingResponse(self._beta.external_plan_id) + + +class AsyncBetaWithStreamingResponse: + def __init__(self, beta: AsyncBeta) -> None: + self._beta = beta + + self.create_plan_version = async_to_streamed_response_wrapper( + beta.create_plan_version, + ) + self.fetch_plan_version = async_to_streamed_response_wrapper( + beta.fetch_plan_version, + ) + self.set_default_plan_version = async_to_streamed_response_wrapper( + beta.set_default_plan_version, + ) + + @cached_property + def external_plan_id(self) -> AsyncExternalPlanIDWithStreamingResponse: + 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 new file mode 100644 index 00000000..3ffeabb9 --- /dev/null +++ b/src/orb/resources/beta/external_plan_id.py @@ -0,0 +1,478 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Iterable, Optional + +import httpx + +from ... import _legacy_response +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import maybe_transform, async_maybe_transform +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ...types.beta import external_plan_id_create_plan_version_params, external_plan_id_set_default_plan_version_params +from ...types.plan import Plan +from ..._base_client import make_request_options +from ...types.plan_version import PlanVersion + +__all__ = ["ExternalPlanID", "AsyncExternalPlanID"] + + +class ExternalPlanID(SyncAPIResource): + @cached_property + def with_raw_response(self) -> ExternalPlanIDWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/orbcorp/orb-python#accessing-raw-response-data-eg-headers + """ + return ExternalPlanIDWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> ExternalPlanIDWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/orbcorp/orb-python#with_streaming_response + """ + return ExternalPlanIDWithStreamingResponse(self) + + def create_plan_version( + self, + external_plan_id: str, + *, + version: int, + add_adjustments: Optional[Iterable[external_plan_id_create_plan_version_params.AddAdjustment]] + | NotGiven = NOT_GIVEN, + add_prices: Optional[Iterable[external_plan_id_create_plan_version_params.AddPrice]] | NotGiven = NOT_GIVEN, + remove_adjustments: Optional[Iterable[external_plan_id_create_plan_version_params.RemoveAdjustment]] + | NotGiven = NOT_GIVEN, + remove_prices: Optional[Iterable[external_plan_id_create_plan_version_params.RemovePrice]] + | NotGiven = NOT_GIVEN, + replace_adjustments: Optional[Iterable[external_plan_id_create_plan_version_params.ReplaceAdjustment]] + | NotGiven = NOT_GIVEN, + replace_prices: Optional[Iterable[external_plan_id_create_plan_version_params.ReplacePrice]] + | NotGiven = NOT_GIVEN, + set_as_default: Optional[bool] | NotGiven = NOT_GIVEN, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> PlanVersion: + """This API endpoint is in beta and its interface may change. + + It is recommended for + use only in test mode. + + This endpoint allows the creation of a new plan version for an existing plan. + + Args: + version: New version number. + + add_adjustments: Additional adjustments to be added to the plan. + + add_prices: Additional prices to be added to the plan. + + remove_adjustments: Adjustments to be removed from the plan. + + remove_prices: Prices to be removed from the plan. + + replace_adjustments: Adjustments to be replaced with additional adjustments on the plan. + + replace_prices: Prices to be replaced with additional prices on the plan. + + set_as_default: Set this new plan version as the default + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not external_plan_id: + raise ValueError(f"Expected a non-empty value for `external_plan_id` but received {external_plan_id!r}") + return self._post( + f"/plans/external_plan_id/{external_plan_id}/versions", + body=maybe_transform( + { + "version": version, + "add_adjustments": add_adjustments, + "add_prices": add_prices, + "remove_adjustments": remove_adjustments, + "remove_prices": remove_prices, + "replace_adjustments": replace_adjustments, + "replace_prices": replace_prices, + "set_as_default": set_as_default, + }, + external_plan_id_create_plan_version_params.ExternalPlanIDCreatePlanVersionParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=PlanVersion, + ) + + def fetch_plan_version( + self, + version: str, + *, + external_plan_id: str, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> PlanVersion: + """This API endpoint is in beta and its interface may change. + + It is recommended for + use only in test mode. + + This endpoint is used to fetch a plan version. It returns the phases, prices, + and adjustments present on this version of the plan. + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not external_plan_id: + raise ValueError(f"Expected a non-empty value for `external_plan_id` but received {external_plan_id!r}") + if not version: + raise ValueError(f"Expected a non-empty value for `version` but received {version!r}") + return self._get( + f"/plans/external_plan_id/{external_plan_id}/versions/{version}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=PlanVersion, + ) + + def set_default_plan_version( + self, + external_plan_id: str, + *, + version: int, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Plan: + """This API endpoint is in beta and its interface may change. + + It is recommended for + use only in test mode. + + This endpoint allows setting the default version of a plan. + + Args: + version: Plan version to set as the default. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not external_plan_id: + raise ValueError(f"Expected a non-empty value for `external_plan_id` but received {external_plan_id!r}") + return self._post( + f"/plans/external_plan_id/{external_plan_id}/set_default_version", + body=maybe_transform( + {"version": version}, + external_plan_id_set_default_plan_version_params.ExternalPlanIDSetDefaultPlanVersionParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Plan, + ) + + +class AsyncExternalPlanID(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncExternalPlanIDWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/orbcorp/orb-python#accessing-raw-response-data-eg-headers + """ + return AsyncExternalPlanIDWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncExternalPlanIDWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/orbcorp/orb-python#with_streaming_response + """ + return AsyncExternalPlanIDWithStreamingResponse(self) + + async def create_plan_version( + self, + external_plan_id: str, + *, + version: int, + add_adjustments: Optional[Iterable[external_plan_id_create_plan_version_params.AddAdjustment]] + | NotGiven = NOT_GIVEN, + add_prices: Optional[Iterable[external_plan_id_create_plan_version_params.AddPrice]] | NotGiven = NOT_GIVEN, + remove_adjustments: Optional[Iterable[external_plan_id_create_plan_version_params.RemoveAdjustment]] + | NotGiven = NOT_GIVEN, + remove_prices: Optional[Iterable[external_plan_id_create_plan_version_params.RemovePrice]] + | NotGiven = NOT_GIVEN, + replace_adjustments: Optional[Iterable[external_plan_id_create_plan_version_params.ReplaceAdjustment]] + | NotGiven = NOT_GIVEN, + replace_prices: Optional[Iterable[external_plan_id_create_plan_version_params.ReplacePrice]] + | NotGiven = NOT_GIVEN, + set_as_default: Optional[bool] | NotGiven = NOT_GIVEN, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> PlanVersion: + """This API endpoint is in beta and its interface may change. + + It is recommended for + use only in test mode. + + This endpoint allows the creation of a new plan version for an existing plan. + + Args: + version: New version number. + + add_adjustments: Additional adjustments to be added to the plan. + + add_prices: Additional prices to be added to the plan. + + remove_adjustments: Adjustments to be removed from the plan. + + remove_prices: Prices to be removed from the plan. + + replace_adjustments: Adjustments to be replaced with additional adjustments on the plan. + + replace_prices: Prices to be replaced with additional prices on the plan. + + set_as_default: Set this new plan version as the default + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not external_plan_id: + raise ValueError(f"Expected a non-empty value for `external_plan_id` but received {external_plan_id!r}") + return await self._post( + f"/plans/external_plan_id/{external_plan_id}/versions", + body=await async_maybe_transform( + { + "version": version, + "add_adjustments": add_adjustments, + "add_prices": add_prices, + "remove_adjustments": remove_adjustments, + "remove_prices": remove_prices, + "replace_adjustments": replace_adjustments, + "replace_prices": replace_prices, + "set_as_default": set_as_default, + }, + external_plan_id_create_plan_version_params.ExternalPlanIDCreatePlanVersionParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=PlanVersion, + ) + + async def fetch_plan_version( + self, + version: str, + *, + external_plan_id: str, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> PlanVersion: + """This API endpoint is in beta and its interface may change. + + It is recommended for + use only in test mode. + + This endpoint is used to fetch a plan version. It returns the phases, prices, + and adjustments present on this version of the plan. + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not external_plan_id: + raise ValueError(f"Expected a non-empty value for `external_plan_id` but received {external_plan_id!r}") + if not version: + raise ValueError(f"Expected a non-empty value for `version` but received {version!r}") + return await self._get( + f"/plans/external_plan_id/{external_plan_id}/versions/{version}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=PlanVersion, + ) + + async def set_default_plan_version( + self, + external_plan_id: str, + *, + version: int, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Plan: + """This API endpoint is in beta and its interface may change. + + It is recommended for + use only in test mode. + + This endpoint allows setting the default version of a plan. + + Args: + version: Plan version to set as the default. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not external_plan_id: + raise ValueError(f"Expected a non-empty value for `external_plan_id` but received {external_plan_id!r}") + return await self._post( + f"/plans/external_plan_id/{external_plan_id}/set_default_version", + body=await async_maybe_transform( + {"version": version}, + external_plan_id_set_default_plan_version_params.ExternalPlanIDSetDefaultPlanVersionParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Plan, + ) + + +class ExternalPlanIDWithRawResponse: + def __init__(self, external_plan_id: ExternalPlanID) -> None: + self._external_plan_id = external_plan_id + + self.create_plan_version = _legacy_response.to_raw_response_wrapper( + external_plan_id.create_plan_version, + ) + self.fetch_plan_version = _legacy_response.to_raw_response_wrapper( + external_plan_id.fetch_plan_version, + ) + self.set_default_plan_version = _legacy_response.to_raw_response_wrapper( + external_plan_id.set_default_plan_version, + ) + + +class AsyncExternalPlanIDWithRawResponse: + def __init__(self, external_plan_id: AsyncExternalPlanID) -> None: + self._external_plan_id = external_plan_id + + self.create_plan_version = _legacy_response.async_to_raw_response_wrapper( + external_plan_id.create_plan_version, + ) + self.fetch_plan_version = _legacy_response.async_to_raw_response_wrapper( + external_plan_id.fetch_plan_version, + ) + self.set_default_plan_version = _legacy_response.async_to_raw_response_wrapper( + external_plan_id.set_default_plan_version, + ) + + +class ExternalPlanIDWithStreamingResponse: + def __init__(self, external_plan_id: ExternalPlanID) -> None: + self._external_plan_id = external_plan_id + + self.create_plan_version = to_streamed_response_wrapper( + external_plan_id.create_plan_version, + ) + self.fetch_plan_version = to_streamed_response_wrapper( + external_plan_id.fetch_plan_version, + ) + self.set_default_plan_version = to_streamed_response_wrapper( + external_plan_id.set_default_plan_version, + ) + + +class AsyncExternalPlanIDWithStreamingResponse: + def __init__(self, external_plan_id: AsyncExternalPlanID) -> None: + self._external_plan_id = external_plan_id + + self.create_plan_version = async_to_streamed_response_wrapper( + external_plan_id.create_plan_version, + ) + self.fetch_plan_version = async_to_streamed_response_wrapper( + external_plan_id.fetch_plan_version, + ) + self.set_default_plan_version = async_to_streamed_response_wrapper( + external_plan_id.set_default_plan_version, + ) diff --git a/src/orb/resources/credit_notes.py b/src/orb/resources/credit_notes.py index 5445c287..5ff4ba21 100644 --- a/src/orb/resources/credit_notes.py +++ b/src/orb/resources/credit_notes.py @@ -46,9 +46,8 @@ def create( self, *, line_items: Iterable[credit_note_create_params.LineItem], + reason: Literal["duplicate", "fraudulent", "order_change", "product_unsatisfactory"], memo: Optional[str] | NotGiven = NOT_GIVEN, - reason: Optional[Literal["duplicate", "fraudulent", "order_change", "product_unsatisfactory"]] - | NotGiven = NOT_GIVEN, # 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, @@ -62,10 +61,10 @@ def create( [`Credit Note`](/invoicing/credit-notes). Args: - memo: An optional memo to attach to the credit note. - reason: An optional reason for the credit note. + memo: An optional memo to attach to the credit note. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -81,8 +80,8 @@ def create( body=maybe_transform( { "line_items": line_items, - "memo": memo, "reason": reason, + "memo": memo, }, credit_note_create_params.CreditNoteCreateParams, ), @@ -214,9 +213,8 @@ async def create( self, *, line_items: Iterable[credit_note_create_params.LineItem], + reason: Literal["duplicate", "fraudulent", "order_change", "product_unsatisfactory"], memo: Optional[str] | NotGiven = NOT_GIVEN, - reason: Optional[Literal["duplicate", "fraudulent", "order_change", "product_unsatisfactory"]] - | NotGiven = NOT_GIVEN, # 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, @@ -230,10 +228,10 @@ async def create( [`Credit Note`](/invoicing/credit-notes). Args: - memo: An optional memo to attach to the credit note. - reason: An optional reason for the credit note. + memo: An optional memo to attach to the credit note. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -249,8 +247,8 @@ async def create( body=await async_maybe_transform( { "line_items": line_items, - "memo": memo, "reason": reason, + "memo": memo, }, credit_note_create_params.CreditNoteCreateParams, ), diff --git a/src/orb/resources/customers/balance_transactions.py b/src/orb/resources/customers/balance_transactions.py index d9f4eb2c..0ce73630 100644 --- a/src/orb/resources/customers/balance_transactions.py +++ b/src/orb/resources/customers/balance_transactions.py @@ -137,13 +137,6 @@ def list( chronological order for a single customer, providing a complete audit trail of all adjustments and invoice applications. - ## Eligibility - - The customer balance can only be applied to invoices or adjusted manually if - invoices are not synced to a separate invoicing provider. If a payment gateway - such as Stripe is used, the balance will be applied to the invoice before - forwarding payment to the gateway. - Args: cursor: Cursor for pagination. This can be populated by the `next_cursor` value returned from the initial request. @@ -298,13 +291,6 @@ def list( chronological order for a single customer, providing a complete audit trail of all adjustments and invoice applications. - ## Eligibility - - The customer balance can only be applied to invoices or adjusted manually if - invoices are not synced to a separate invoicing provider. If a payment gateway - such as Stripe is used, the balance will be applied to the invoice before - forwarding payment to the gateway. - Args: cursor: Cursor for pagination. This can be populated by the `next_cursor` value returned from the initial request. diff --git a/src/orb/resources/customers/credits/top_ups.py b/src/orb/resources/customers/credits/top_ups.py index 269128fb..5dcb5708 100644 --- a/src/orb/resources/customers/credits/top_ups.py +++ b/src/orb/resources/customers/credits/top_ups.py @@ -93,7 +93,7 @@ def create( threshold, the top-up will be triggered. active_from: The date from which the top-up is active. If unspecified, the top-up is active - immediately. + immediately. This should not be more than 10 days in the past. expires_after: The number of days or months after which the top-up expires. If unspecified, it does not expire. @@ -277,7 +277,7 @@ def create_by_external_id( threshold, the top-up will be triggered. active_from: The date from which the top-up is active. If unspecified, the top-up is active - immediately. + immediately. This should not be more than 10 days in the past. expires_after: The number of days or months after which the top-up expires. If unspecified, it does not expire. @@ -488,7 +488,7 @@ async def create( threshold, the top-up will be triggered. active_from: The date from which the top-up is active. If unspecified, the top-up is active - immediately. + immediately. This should not be more than 10 days in the past. expires_after: The number of days or months after which the top-up expires. If unspecified, it does not expire. @@ -672,7 +672,7 @@ async def create_by_external_id( threshold, the top-up will be triggered. active_from: The date from which the top-up is active. If unspecified, the top-up is active - immediately. + immediately. This should not be more than 10 days in the past. expires_after: The number of days or months after which the top-up expires. If unspecified, it does not expire. diff --git a/src/orb/resources/customers/customers.py b/src/orb/resources/customers/customers.py index 471f2011..d784e615 100644 --- a/src/orb/resources/customers/customers.py +++ b/src/orb/resources/customers/customers.py @@ -628,10 +628,7 @@ def delete( **Note**: This operation happens asynchronously and can be expected to take a few minutes to propagate to related resources. However, querying for the customer on subsequent GET requests while deletion is in process will reflect - its deletion with a `deleted: true` property. Once the customer deletion has - been fully processed, the customer will not be returned in the API. - - On successful processing, this returns an empty dictionary (`{}`) in the API. + its deletion. Args: extra_headers: Send extra headers @@ -1634,10 +1631,7 @@ async def delete( **Note**: This operation happens asynchronously and can be expected to take a few minutes to propagate to related resources. However, querying for the customer on subsequent GET requests while deletion is in process will reflect - its deletion with a `deleted: true` property. Once the customer deletion has - been fully processed, the customer will not be returned in the API. - - On successful processing, this returns an empty dictionary (`{}`) in the API. + its deletion. Args: extra_headers: Send extra headers diff --git a/src/orb/resources/dimensional_price_groups/dimensional_price_groups.py b/src/orb/resources/dimensional_price_groups/dimensional_price_groups.py index 034c8617..5ca4d60c 100644 --- a/src/orb/resources/dimensional_price_groups/dimensional_price_groups.py +++ b/src/orb/resources/dimensional_price_groups/dimensional_price_groups.py @@ -76,7 +76,7 @@ def create( For example, suppose we have a billable metric that measures the number of widgets used and we want to charge differently depending on the color of the widget. We can create a price group with a dimension "color" and two prices: one - that charges $10 per red widget and one that charges $20 per blue widget. + that charges \\$$10 per red widget and one that charges \\$$20 per blue widget. Args: dimensions: The set of keys (in order) used to disambiguate prices in the group. @@ -250,7 +250,7 @@ async def create( For example, suppose we have a billable metric that measures the number of widgets used and we want to charge differently depending on the color of the widget. We can create a price group with a dimension "color" and two prices: one - that charges $10 per red widget and one that charges $20 per blue widget. + that charges \\$$10 per red widget and one that charges \\$$20 per blue widget. Args: dimensions: The set of keys (in order) used to disambiguate prices in the group. diff --git a/src/orb/resources/items.py b/src/orb/resources/items.py index a150ad4f..6ccf4995 100644 --- a/src/orb/resources/items.py +++ b/src/orb/resources/items.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Iterable, Optional +from typing import Dict, Iterable, Optional import httpx @@ -44,6 +44,7 @@ def create( self, *, name: str, + metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN, # 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, @@ -58,6 +59,10 @@ def create( Args: name: The name of the item. + metadata: User-specified key/value pairs for the resource. Individual keys can be removed + by setting the value to `null`, and the entire metadata mapping can be cleared + by setting `metadata` to `null`. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -70,7 +75,13 @@ def create( """ return self._post( "/items", - body=maybe_transform({"name": name}, item_create_params.ItemCreateParams), + body=maybe_transform( + { + "name": name, + "metadata": metadata, + }, + item_create_params.ItemCreateParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -86,6 +97,7 @@ def update( item_id: str, *, external_connections: Optional[Iterable[item_update_params.ExternalConnection]] | NotGiven = NOT_GIVEN, + metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, # 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. @@ -99,6 +111,10 @@ def update( This endpoint can be used to update properties on the Item. Args: + metadata: User-specified key/value pairs for the resource. Individual keys can be removed + by setting the value to `null`, and the entire metadata mapping can be cleared + by setting `metadata` to `null`. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -116,6 +132,7 @@ def update( body=maybe_transform( { "external_connections": external_connections, + "metadata": metadata, "name": name, }, item_update_params.ItemUpdateParams, @@ -179,6 +196,46 @@ def list( model=Item, ) + def archive( + self, + item_id: str, + *, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Item: + """ + Archive item + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not item_id: + raise ValueError(f"Expected a non-empty value for `item_id` but received {item_id!r}") + return self._post( + f"/items/{item_id}/archive", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Item, + ) + def fetch( self, item_id: str, @@ -237,6 +294,7 @@ async def create( self, *, name: str, + metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN, # 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, @@ -251,6 +309,10 @@ async def create( Args: name: The name of the item. + metadata: User-specified key/value pairs for the resource. Individual keys can be removed + by setting the value to `null`, and the entire metadata mapping can be cleared + by setting `metadata` to `null`. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -263,7 +325,13 @@ async def create( """ return await self._post( "/items", - body=await async_maybe_transform({"name": name}, item_create_params.ItemCreateParams), + body=await async_maybe_transform( + { + "name": name, + "metadata": metadata, + }, + item_create_params.ItemCreateParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -279,6 +347,7 @@ async def update( item_id: str, *, external_connections: Optional[Iterable[item_update_params.ExternalConnection]] | NotGiven = NOT_GIVEN, + metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, # 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. @@ -292,6 +361,10 @@ async def update( This endpoint can be used to update properties on the Item. Args: + metadata: User-specified key/value pairs for the resource. Individual keys can be removed + by setting the value to `null`, and the entire metadata mapping can be cleared + by setting `metadata` to `null`. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -309,6 +382,7 @@ async def update( body=await async_maybe_transform( { "external_connections": external_connections, + "metadata": metadata, "name": name, }, item_update_params.ItemUpdateParams, @@ -372,6 +446,46 @@ def list( model=Item, ) + async def archive( + self, + item_id: str, + *, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Item: + """ + Archive item + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not item_id: + raise ValueError(f"Expected a non-empty value for `item_id` but received {item_id!r}") + return await self._post( + f"/items/{item_id}/archive", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Item, + ) + async def fetch( self, item_id: str, @@ -419,6 +533,9 @@ def __init__(self, items: Items) -> None: self.list = _legacy_response.to_raw_response_wrapper( items.list, ) + self.archive = _legacy_response.to_raw_response_wrapper( + items.archive, + ) self.fetch = _legacy_response.to_raw_response_wrapper( items.fetch, ) @@ -437,6 +554,9 @@ def __init__(self, items: AsyncItems) -> None: self.list = _legacy_response.async_to_raw_response_wrapper( items.list, ) + self.archive = _legacy_response.async_to_raw_response_wrapper( + items.archive, + ) self.fetch = _legacy_response.async_to_raw_response_wrapper( items.fetch, ) @@ -455,6 +575,9 @@ def __init__(self, items: Items) -> None: self.list = to_streamed_response_wrapper( items.list, ) + self.archive = to_streamed_response_wrapper( + items.archive, + ) self.fetch = to_streamed_response_wrapper( items.fetch, ) @@ -473,6 +596,9 @@ def __init__(self, items: AsyncItems) -> None: self.list = async_to_streamed_response_wrapper( items.list, ) + self.archive = async_to_streamed_response_wrapper( + items.archive, + ) self.fetch = async_to_streamed_response_wrapper( items.fetch, ) diff --git a/src/orb/resources/plans/external_plan_id.py b/src/orb/resources/plans/external_plan_id.py index dce7e6a4..9c3dc83d 100644 --- a/src/orb/resources/plans/external_plan_id.py +++ b/src/orb/resources/plans/external_plan_id.py @@ -57,7 +57,7 @@ def update( This endpoint can be used to update the `external_plan_id`, and `metadata` of an existing plan. - Other fields on a customer are currently immutable. + Other fields on a plan are currently immutable. Args: external_plan_id: An optional user-defined ID for this plan resource, used throughout the system @@ -188,7 +188,7 @@ async def update( This endpoint can be used to update the `external_plan_id`, and `metadata` of an existing plan. - Other fields on a customer are currently immutable. + Other fields on a plan are currently immutable. Args: external_plan_id: An optional user-defined ID for this plan resource, used throughout the system diff --git a/src/orb/resources/plans/plans.py b/src/orb/resources/plans/plans.py index bb036773..9d99305f 100644 --- a/src/orb/resources/plans/plans.py +++ b/src/orb/resources/plans/plans.py @@ -149,7 +149,7 @@ def update( This endpoint can be used to update the `external_plan_id`, and `metadata` of an existing plan. - Other fields on a customer are currently immutable. + Other fields on a plan are currently immutable. Args: external_plan_id: An optional user-defined ID for this plan resource, used throughout the system @@ -424,7 +424,7 @@ async def update( This endpoint can be used to update the `external_plan_id`, and `metadata` of an existing plan. - Other fields on a customer are currently immutable. + Other fields on a plan are currently immutable. Args: external_plan_id: An optional user-defined ID for this plan resource, used throughout the system diff --git a/src/orb/resources/prices/prices.py b/src/orb/resources/prices/prices.py index 6e90e846..8b38da43 100644 --- a/src/orb/resources/prices/prices.py +++ b/src/orb/resources/prices/prices.py @@ -2,14 +2,20 @@ from __future__ import annotations -from typing import Any, Dict, List, Union, Optional, cast +from typing import Any, Dict, List, Union, Iterable, Optional, cast from datetime import datetime from typing_extensions import Literal, overload import httpx from ... import _legacy_response -from ...types import price_list_params, price_create_params, price_update_params, price_evaluate_params +from ...types import ( + price_list_params, + price_create_params, + price_update_params, + price_evaluate_params, + price_evaluate_multiple_params, +) from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import required_args, maybe_transform, async_maybe_transform from ..._compat import cached_property @@ -27,6 +33,7 @@ AsyncExternalPriceIDWithStreamingResponse, ) from ...types.price_evaluate_response import PriceEvaluateResponse +from ...types.price_evaluate_multiple_response import PriceEvaluateMultipleResponse __all__ = ["Prices", "AsyncPrices"] @@ -70,6 +77,8 @@ def create( billing_cycle_configuration: Optional[price_create_params.NewFloatingUnitPriceBillingCycleConfiguration] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[price_create_params.NewFloatingUnitPriceDimensionalPriceConfiguration] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -86,7 +95,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -116,6 +125,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -157,6 +168,10 @@ def create( billing_cycle_configuration: Optional[price_create_params.NewFloatingPackagePriceBillingCycleConfiguration] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingPackagePriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -173,7 +188,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -203,6 +218,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -244,6 +261,10 @@ def create( billing_cycle_configuration: Optional[price_create_params.NewFloatingMatrixPriceBillingCycleConfiguration] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingMatrixPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -260,7 +281,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -290,6 +311,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -333,6 +356,10 @@ def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingMatrixWithAllocationPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -351,7 +378,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -381,6 +408,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -422,6 +451,10 @@ def create( billing_cycle_configuration: Optional[price_create_params.NewFloatingTieredPriceBillingCycleConfiguration] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingTieredPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -438,7 +471,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -468,6 +501,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -509,6 +544,10 @@ def create( billing_cycle_configuration: Optional[price_create_params.NewFloatingTieredBpsPriceBillingCycleConfiguration] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingTieredBpsPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -527,7 +566,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -557,6 +596,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -598,6 +639,8 @@ def create( billing_cycle_configuration: Optional[price_create_params.NewFloatingBpsPriceBillingCycleConfiguration] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[price_create_params.NewFloatingBpsPriceDimensionalPriceConfiguration] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -614,7 +657,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -644,6 +687,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -685,6 +730,10 @@ def create( billing_cycle_configuration: Optional[price_create_params.NewFloatingBulkBpsPriceBillingCycleConfiguration] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingBulkBpsPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -701,7 +750,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -731,6 +780,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -772,6 +823,8 @@ def create( billing_cycle_configuration: Optional[price_create_params.NewFloatingBulkPriceBillingCycleConfiguration] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[price_create_params.NewFloatingBulkPriceDimensionalPriceConfiguration] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -788,7 +841,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -818,6 +871,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -861,6 +916,10 @@ def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingThresholdTotalAmountPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -879,7 +938,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -909,6 +968,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -952,6 +1013,10 @@ def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingTieredPackagePriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -970,7 +1035,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -1000,6 +1065,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -1043,6 +1110,10 @@ def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingGroupedTieredPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -1061,7 +1132,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -1091,6 +1162,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -1134,6 +1207,10 @@ def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingMaxGroupTieredPackagePriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -1152,7 +1229,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -1182,6 +1259,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -1225,6 +1304,10 @@ def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingTieredWithMinimumPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -1243,7 +1326,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -1273,6 +1356,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -1316,6 +1401,10 @@ def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingPackageWithAllocationPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -1334,7 +1423,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -1364,6 +1453,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -1407,6 +1498,10 @@ def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingTieredPackageWithMinimumPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -1425,7 +1520,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -1455,6 +1550,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -1498,6 +1595,10 @@ def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingUnitWithPercentPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -1516,7 +1617,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -1546,6 +1647,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -1589,6 +1692,10 @@ def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingTieredWithProrationPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -1607,7 +1714,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -1637,6 +1744,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -1680,6 +1789,10 @@ def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingUnitWithProrationPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -1698,7 +1811,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -1728,6 +1841,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -1771,6 +1886,10 @@ def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingGroupedAllocationPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -1789,7 +1908,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -1819,6 +1938,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -1862,6 +1983,10 @@ def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingGroupedWithProratedMinimumPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -1880,7 +2005,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -1910,6 +2035,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -1953,6 +2080,10 @@ def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -1971,7 +2102,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -2001,6 +2132,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -2044,6 +2177,10 @@ def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingMatrixWithDisplayNamePriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -2062,7 +2199,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -2092,6 +2229,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -2135,6 +2274,10 @@ def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingBulkWithProrationPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -2153,7 +2296,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -2183,6 +2326,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -2226,6 +2371,10 @@ def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingGroupedTieredPackagePriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -2244,7 +2393,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -2274,6 +2423,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -2317,6 +2468,10 @@ def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -2335,7 +2490,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -2365,6 +2520,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -2408,6 +2565,10 @@ def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -2426,7 +2587,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -2456,6 +2617,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -2499,6 +2662,10 @@ def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingCumulativeGroupedBulkPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -2517,7 +2684,7 @@ def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -2547,6 +2714,8 @@ def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -2644,6 +2813,8 @@ def create( billing_cycle_configuration: Optional[price_create_params.NewFloatingUnitPriceBillingCycleConfiguration] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[price_create_params.NewFloatingUnitPriceDimensionalPriceConfiguration] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -2702,6 +2873,7 @@ def create( "billed_in_advance": billed_in_advance, "billing_cycle_configuration": billing_cycle_configuration, "conversion_rate": conversion_rate, + "dimensional_price_configuration": dimensional_price_configuration, "external_price_id": external_price_id, "fixed_price_quantity": fixed_price_quantity, "invoice_grouping_key": invoice_grouping_key, @@ -2868,6 +3040,10 @@ def evaluate( idempotency_key: str | None = None, ) -> PriceEvaluateResponse: """ + [NOTE] It is recommended to use the `/v1/prices/evaluate` which offers further + functionality, such as multiple prices, inline price definitions, and querying + over preview events. + This endpoint is used to evaluate the output of a price for a given customer and time range. It enables filtering and grouping the output using [computed properties](/extensibility/advanced-metrics#computed-properties), @@ -2942,6 +3118,101 @@ def evaluate( cast_to=PriceEvaluateResponse, ) + def evaluate_multiple( + self, + *, + timeframe_end: Union[str, datetime], + timeframe_start: Union[str, datetime], + customer_id: Optional[str] | NotGiven = NOT_GIVEN, + events: Optional[Iterable[price_evaluate_multiple_params.Event]] | NotGiven = NOT_GIVEN, + external_customer_id: Optional[str] | NotGiven = NOT_GIVEN, + price_evaluations: Iterable[price_evaluate_multiple_params.PriceEvaluation] | NotGiven = NOT_GIVEN, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> PriceEvaluateMultipleResponse: + """ + This endpoint is used to evaluate the output of price(s) for a given customer + and time range over either ingested events or preview events. It enables + filtering and grouping the output using + [computed properties](/extensibility/advanced-metrics#computed-properties), + supporting the following workflows: + + 1. Showing detailed usage and costs to the end customer. + 2. Auditing subtotals on invoice line items. + + Prices may either reference existing prices in your Orb account or be defined + inline in the request body. Up to 100 prices can be evaluated in a single + request. + + Price evaluation by default uses ingested events, but you can also provide a + list of preview events to use instead. Up to 500 preview events can be provided + in a single request. When using ingested events, the start of the time range + must be no more than 100 days ago. + + For these workflows, the expressiveness of computed properties in both the + filters and grouping is critical. For example, if you'd like to show your + customer their usage grouped by hour and another property, you can do so with + the following `grouping_keys`: + `["hour_floor_timestamp_millis(timestamp_millis)", "my_property"]`. If you'd + like to examine a customer's usage for a specific property value, you can do so + with the following `filter`: + `my_property = 'foo' AND my_other_property = 'bar'`. + + The length of the results must be no greater than 1000. Note that this is a POST + endpoint rather than a GET endpoint because it employs a JSON body rather than + query parameters. + + Args: + timeframe_end: The exclusive upper bound for event timestamps + + timeframe_start: The inclusive lower bound for event timestamps + + customer_id: The ID of the customer to which this evaluation is scoped. + + events: Optional list of preview events to use instead of actual usage data (max 500) + + external_customer_id: The external customer ID of the customer to which this evaluation is scoped. + + price_evaluations: List of prices to evaluate (max 100) + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/prices/evaluate", + body=maybe_transform( + { + "timeframe_end": timeframe_end, + "timeframe_start": timeframe_start, + "customer_id": customer_id, + "events": events, + "external_customer_id": external_customer_id, + "price_evaluations": price_evaluations, + }, + price_evaluate_multiple_params.PriceEvaluateMultipleParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=PriceEvaluateMultipleResponse, + ) + def fetch( self, price_id: str, @@ -3018,6 +3289,8 @@ async def create( billing_cycle_configuration: Optional[price_create_params.NewFloatingUnitPriceBillingCycleConfiguration] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[price_create_params.NewFloatingUnitPriceDimensionalPriceConfiguration] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -3034,7 +3307,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -3064,6 +3337,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -3105,6 +3380,10 @@ async def create( billing_cycle_configuration: Optional[price_create_params.NewFloatingPackagePriceBillingCycleConfiguration] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingPackagePriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -3121,7 +3400,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -3151,6 +3430,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -3192,6 +3473,10 @@ async def create( billing_cycle_configuration: Optional[price_create_params.NewFloatingMatrixPriceBillingCycleConfiguration] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingMatrixPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -3208,7 +3493,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -3238,6 +3523,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -3281,6 +3568,10 @@ async def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingMatrixWithAllocationPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -3299,7 +3590,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -3329,6 +3620,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -3370,6 +3663,10 @@ async def create( billing_cycle_configuration: Optional[price_create_params.NewFloatingTieredPriceBillingCycleConfiguration] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingTieredPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -3386,7 +3683,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -3416,6 +3713,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -3457,6 +3756,10 @@ async def create( billing_cycle_configuration: Optional[price_create_params.NewFloatingTieredBpsPriceBillingCycleConfiguration] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingTieredBpsPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -3475,7 +3778,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -3505,6 +3808,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -3546,6 +3851,8 @@ async def create( billing_cycle_configuration: Optional[price_create_params.NewFloatingBpsPriceBillingCycleConfiguration] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[price_create_params.NewFloatingBpsPriceDimensionalPriceConfiguration] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -3562,7 +3869,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -3592,6 +3899,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -3633,6 +3942,10 @@ async def create( billing_cycle_configuration: Optional[price_create_params.NewFloatingBulkBpsPriceBillingCycleConfiguration] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingBulkBpsPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -3649,7 +3962,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -3679,6 +3992,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -3720,6 +4035,8 @@ async def create( billing_cycle_configuration: Optional[price_create_params.NewFloatingBulkPriceBillingCycleConfiguration] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[price_create_params.NewFloatingBulkPriceDimensionalPriceConfiguration] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -3736,7 +4053,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -3766,6 +4083,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -3809,6 +4128,10 @@ async def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingThresholdTotalAmountPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -3827,7 +4150,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -3857,6 +4180,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -3900,6 +4225,10 @@ async def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingTieredPackagePriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -3918,7 +4247,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -3948,6 +4277,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -3991,6 +4322,10 @@ async def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingGroupedTieredPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -4009,7 +4344,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -4039,6 +4374,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -4082,6 +4419,10 @@ async def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingMaxGroupTieredPackagePriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -4100,7 +4441,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -4130,6 +4471,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -4173,6 +4516,10 @@ async def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingTieredWithMinimumPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -4191,7 +4538,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -4221,6 +4568,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -4264,6 +4613,10 @@ async def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingPackageWithAllocationPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -4282,7 +4635,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -4312,6 +4665,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -4355,6 +4710,10 @@ async def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingTieredPackageWithMinimumPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -4373,7 +4732,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -4403,6 +4762,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -4446,6 +4807,10 @@ async def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingUnitWithPercentPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -4464,7 +4829,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -4494,6 +4859,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -4537,6 +4904,10 @@ async def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingTieredWithProrationPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -4555,7 +4926,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -4585,6 +4956,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -4628,6 +5001,10 @@ async def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingUnitWithProrationPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -4646,7 +5023,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -4676,6 +5053,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -4719,6 +5098,10 @@ async def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingGroupedAllocationPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -4737,7 +5120,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -4767,6 +5150,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -4810,6 +5195,10 @@ async def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingGroupedWithProratedMinimumPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -4828,7 +5217,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -4858,6 +5247,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -4901,6 +5292,10 @@ async def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -4919,7 +5314,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -4949,6 +5344,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -4992,6 +5389,10 @@ async def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingMatrixWithDisplayNamePriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -5010,7 +5411,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -5040,6 +5441,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -5083,6 +5486,10 @@ async def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingBulkWithProrationPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -5101,7 +5508,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -5131,6 +5538,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -5174,6 +5583,10 @@ async def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingGroupedTieredPackagePriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -5192,7 +5605,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -5222,6 +5635,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -5265,6 +5680,10 @@ async def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -5283,7 +5702,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -5313,6 +5732,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -5356,6 +5777,10 @@ async def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -5374,7 +5799,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -5404,6 +5829,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -5447,6 +5874,10 @@ async def create( ] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[ + price_create_params.NewFloatingCumulativeGroupedBulkPriceDimensionalPriceConfiguration + ] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -5465,7 +5896,7 @@ async def create( ) -> Price: """ This endpoint is used to create a [price](/product-catalog/price-configuration). - A price created using this endpoint is always an add-on, meaning that it’s not + A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans. @@ -5495,6 +5926,8 @@ async def create( conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + dimensional_price_configuration: For dimensional price: specifies a price group and dimension values + external_price_id: An alias for the price. fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units @@ -5592,6 +6025,8 @@ async def create( billing_cycle_configuration: Optional[price_create_params.NewFloatingUnitPriceBillingCycleConfiguration] | NotGiven = NOT_GIVEN, conversion_rate: Optional[float] | NotGiven = NOT_GIVEN, + dimensional_price_configuration: Optional[price_create_params.NewFloatingUnitPriceDimensionalPriceConfiguration] + | NotGiven = NOT_GIVEN, external_price_id: Optional[str] | NotGiven = NOT_GIVEN, fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN, invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN, @@ -5650,6 +6085,7 @@ async def create( "billed_in_advance": billed_in_advance, "billing_cycle_configuration": billing_cycle_configuration, "conversion_rate": conversion_rate, + "dimensional_price_configuration": dimensional_price_configuration, "external_price_id": external_price_id, "fixed_price_quantity": fixed_price_quantity, "invoice_grouping_key": invoice_grouping_key, @@ -5816,6 +6252,10 @@ async def evaluate( idempotency_key: str | None = None, ) -> PriceEvaluateResponse: """ + [NOTE] It is recommended to use the `/v1/prices/evaluate` which offers further + functionality, such as multiple prices, inline price definitions, and querying + over preview events. + This endpoint is used to evaluate the output of a price for a given customer and time range. It enables filtering and grouping the output using [computed properties](/extensibility/advanced-metrics#computed-properties), @@ -5890,6 +6330,101 @@ async def evaluate( cast_to=PriceEvaluateResponse, ) + async def evaluate_multiple( + self, + *, + timeframe_end: Union[str, datetime], + timeframe_start: Union[str, datetime], + customer_id: Optional[str] | NotGiven = NOT_GIVEN, + events: Optional[Iterable[price_evaluate_multiple_params.Event]] | NotGiven = NOT_GIVEN, + external_customer_id: Optional[str] | NotGiven = NOT_GIVEN, + price_evaluations: Iterable[price_evaluate_multiple_params.PriceEvaluation] | NotGiven = NOT_GIVEN, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> PriceEvaluateMultipleResponse: + """ + This endpoint is used to evaluate the output of price(s) for a given customer + and time range over either ingested events or preview events. It enables + filtering and grouping the output using + [computed properties](/extensibility/advanced-metrics#computed-properties), + supporting the following workflows: + + 1. Showing detailed usage and costs to the end customer. + 2. Auditing subtotals on invoice line items. + + Prices may either reference existing prices in your Orb account or be defined + inline in the request body. Up to 100 prices can be evaluated in a single + request. + + Price evaluation by default uses ingested events, but you can also provide a + list of preview events to use instead. Up to 500 preview events can be provided + in a single request. When using ingested events, the start of the time range + must be no more than 100 days ago. + + For these workflows, the expressiveness of computed properties in both the + filters and grouping is critical. For example, if you'd like to show your + customer their usage grouped by hour and another property, you can do so with + the following `grouping_keys`: + `["hour_floor_timestamp_millis(timestamp_millis)", "my_property"]`. If you'd + like to examine a customer's usage for a specific property value, you can do so + with the following `filter`: + `my_property = 'foo' AND my_other_property = 'bar'`. + + The length of the results must be no greater than 1000. Note that this is a POST + endpoint rather than a GET endpoint because it employs a JSON body rather than + query parameters. + + Args: + timeframe_end: The exclusive upper bound for event timestamps + + timeframe_start: The inclusive lower bound for event timestamps + + customer_id: The ID of the customer to which this evaluation is scoped. + + events: Optional list of preview events to use instead of actual usage data (max 500) + + external_customer_id: The external customer ID of the customer to which this evaluation is scoped. + + price_evaluations: List of prices to evaluate (max 100) + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/prices/evaluate", + body=await async_maybe_transform( + { + "timeframe_end": timeframe_end, + "timeframe_start": timeframe_start, + "customer_id": customer_id, + "events": events, + "external_customer_id": external_customer_id, + "price_evaluations": price_evaluations, + }, + price_evaluate_multiple_params.PriceEvaluateMultipleParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=PriceEvaluateMultipleResponse, + ) + async def fetch( self, price_id: str, @@ -5943,6 +6478,9 @@ def __init__(self, prices: Prices) -> None: self.evaluate = _legacy_response.to_raw_response_wrapper( prices.evaluate, ) + self.evaluate_multiple = _legacy_response.to_raw_response_wrapper( + prices.evaluate_multiple, + ) self.fetch = _legacy_response.to_raw_response_wrapper( prices.fetch, ) @@ -5968,6 +6506,9 @@ def __init__(self, prices: AsyncPrices) -> None: self.evaluate = _legacy_response.async_to_raw_response_wrapper( prices.evaluate, ) + self.evaluate_multiple = _legacy_response.async_to_raw_response_wrapper( + prices.evaluate_multiple, + ) self.fetch = _legacy_response.async_to_raw_response_wrapper( prices.fetch, ) @@ -5993,6 +6534,9 @@ def __init__(self, prices: Prices) -> None: self.evaluate = to_streamed_response_wrapper( prices.evaluate, ) + self.evaluate_multiple = to_streamed_response_wrapper( + prices.evaluate_multiple, + ) self.fetch = to_streamed_response_wrapper( prices.fetch, ) @@ -6018,6 +6562,9 @@ def __init__(self, prices: AsyncPrices) -> None: self.evaluate = async_to_streamed_response_wrapper( prices.evaluate, ) + self.evaluate_multiple = async_to_streamed_response_wrapper( + prices.evaluate_multiple, + ) self.fetch = async_to_streamed_response_wrapper( prices.fetch, ) diff --git a/src/orb/resources/subscriptions.py b/src/orb/resources/subscriptions.py index e4d97710..8a6bde4e 100644 --- a/src/orb/resources/subscriptions.py +++ b/src/orb/resources/subscriptions.py @@ -85,6 +85,7 @@ def create( | NotGiven = NOT_GIVEN, coupon_redemption_code: Optional[str] | NotGiven = NOT_GIVEN, credits_overage_rate: Optional[float] | NotGiven = NOT_GIVEN, + currency: Optional[str] | NotGiven = NOT_GIVEN, customer_id: Optional[str] | NotGiven = NOT_GIVEN, default_invoice_memo: Optional[str] | NotGiven = NOT_GIVEN, end_date: Union[str, datetime, None] | NotGiven = NOT_GIVEN, @@ -96,6 +97,7 @@ def create( initial_phase_order: Optional[int] | NotGiven = NOT_GIVEN, invoicing_threshold: Optional[str] | NotGiven = NOT_GIVEN, metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN, + name: Optional[str] | NotGiven = NOT_GIVEN, net_terms: Optional[int] | NotGiven = NOT_GIVEN, per_credit_overage_amount: Optional[float] | NotGiven = NOT_GIVEN, plan_id: Optional[str] | NotGiven = NOT_GIVEN, @@ -390,6 +392,9 @@ def create( by its redemption code, or cannot be redeemed, an error response will be returned and the subscription creation or plan change will not be scheduled. + currency: The currency to use for the subscription. If not specified, the invoicing + currency for the plan will be used. + default_invoice_memo: Determines the default memo on this subscription's invoices. Note that if this is not provided, it is determined by the plan configuration. @@ -411,6 +416,9 @@ def create( by setting the value to `null`, and the entire metadata mapping can be cleared by setting `metadata` to `null`. + name: The name to use for the subscription. If not specified, the plan name will be + used. + net_terms: The net terms determines the difference between the invoice date and the issue date for the invoice. If you intend the invoice to be due on issue, set this to 0. If not provided, this defaults to the value specified in the plan. @@ -469,6 +477,7 @@ def create( "billing_cycle_anchor_configuration": billing_cycle_anchor_configuration, "coupon_redemption_code": coupon_redemption_code, "credits_overage_rate": credits_overage_rate, + "currency": currency, "customer_id": customer_id, "default_invoice_memo": default_invoice_memo, "end_date": end_date, @@ -480,6 +489,7 @@ def create( "initial_phase_order": initial_phase_order, "invoicing_threshold": invoicing_threshold, "metadata": metadata, + "name": name, "net_terms": net_terms, "per_credit_overage_amount": per_credit_overage_amount, "plan_id": plan_id, @@ -1956,7 +1966,7 @@ def update_fixed_fee_quantity( `immediate` unless it's explicitly set to `upcoming_invoice`. effective_date: The date that the quantity change should take effect, localized to the - customer's timezone. Ifthis parameter is not passed in, the quantity change is + customer's timezone. If this parameter is not passed in, the quantity change is effective according to `change_option`. extra_headers: Send extra headers @@ -2099,6 +2109,7 @@ async def create( | NotGiven = NOT_GIVEN, coupon_redemption_code: Optional[str] | NotGiven = NOT_GIVEN, credits_overage_rate: Optional[float] | NotGiven = NOT_GIVEN, + currency: Optional[str] | NotGiven = NOT_GIVEN, customer_id: Optional[str] | NotGiven = NOT_GIVEN, default_invoice_memo: Optional[str] | NotGiven = NOT_GIVEN, end_date: Union[str, datetime, None] | NotGiven = NOT_GIVEN, @@ -2110,6 +2121,7 @@ async def create( initial_phase_order: Optional[int] | NotGiven = NOT_GIVEN, invoicing_threshold: Optional[str] | NotGiven = NOT_GIVEN, metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN, + name: Optional[str] | NotGiven = NOT_GIVEN, net_terms: Optional[int] | NotGiven = NOT_GIVEN, per_credit_overage_amount: Optional[float] | NotGiven = NOT_GIVEN, plan_id: Optional[str] | NotGiven = NOT_GIVEN, @@ -2404,6 +2416,9 @@ async def create( by its redemption code, or cannot be redeemed, an error response will be returned and the subscription creation or plan change will not be scheduled. + currency: The currency to use for the subscription. If not specified, the invoicing + currency for the plan will be used. + default_invoice_memo: Determines the default memo on this subscription's invoices. Note that if this is not provided, it is determined by the plan configuration. @@ -2425,6 +2440,9 @@ async def create( by setting the value to `null`, and the entire metadata mapping can be cleared by setting `metadata` to `null`. + name: The name to use for the subscription. If not specified, the plan name will be + used. + net_terms: The net terms determines the difference between the invoice date and the issue date for the invoice. If you intend the invoice to be due on issue, set this to 0. If not provided, this defaults to the value specified in the plan. @@ -2483,6 +2501,7 @@ async def create( "billing_cycle_anchor_configuration": billing_cycle_anchor_configuration, "coupon_redemption_code": coupon_redemption_code, "credits_overage_rate": credits_overage_rate, + "currency": currency, "customer_id": customer_id, "default_invoice_memo": default_invoice_memo, "end_date": end_date, @@ -2494,6 +2513,7 @@ async def create( "initial_phase_order": initial_phase_order, "invoicing_threshold": invoicing_threshold, "metadata": metadata, + "name": name, "net_terms": net_terms, "per_credit_overage_amount": per_credit_overage_amount, "plan_id": plan_id, @@ -3970,7 +3990,7 @@ async def update_fixed_fee_quantity( `immediate` unless it's explicitly set to `upcoming_invoice`. effective_date: The date that the quantity change should take effect, localized to the - customer's timezone. Ifthis parameter is not passed in, the quantity change is + customer's timezone. If this parameter is not passed in, the quantity change is effective according to `change_option`. extra_headers: Send extra headers diff --git a/src/orb/types/__init__.py b/src/orb/types/__init__.py index 42bb839f..76860045 100644 --- a/src/orb/types/__init__.py +++ b/src/orb/types/__init__.py @@ -20,6 +20,7 @@ from .invoice import Invoice as Invoice from .customer import Customer as Customer from .credit_note import CreditNote as CreditNote +from .plan_version import PlanVersion as PlanVersion from .subscription import Subscription as Subscription from .subscriptions import Subscriptions as Subscriptions from .billable_metric import BillableMetric as BillableMetric @@ -33,6 +34,7 @@ from .metric_list_params import MetricListParams as MetricListParams from .plan_create_params import PlanCreateParams as PlanCreateParams from .plan_update_params import PlanUpdateParams as PlanUpdateParams +from .plan_version_phase import PlanVersionPhase as PlanVersionPhase from .subscription_usage import SubscriptionUsage as SubscriptionUsage from .alert_enable_params import AlertEnableParams as AlertEnableParams from .alert_update_params import AlertUpdateParams as AlertUpdateParams @@ -72,11 +74,14 @@ from .subscription_cancel_response import SubscriptionCancelResponse as SubscriptionCancelResponse from .subscription_create_response import SubscriptionCreateResponse as SubscriptionCreateResponse from .invoice_fetch_upcoming_params import InvoiceFetchUpcomingParams as InvoiceFetchUpcomingParams +from .price_evaluate_multiple_params import PriceEvaluateMultipleParams as PriceEvaluateMultipleParams +from .beta_create_plan_version_params import BetaCreatePlanVersionParams as BetaCreatePlanVersionParams from .invoice_fetch_upcoming_response import InvoiceFetchUpcomingResponse as InvoiceFetchUpcomingResponse from .invoice_line_item_create_params import InvoiceLineItemCreateParams as InvoiceLineItemCreateParams from .subscription_fetch_costs_params import SubscriptionFetchCostsParams as SubscriptionFetchCostsParams from .subscription_fetch_usage_params import SubscriptionFetchUsageParams as SubscriptionFetchUsageParams from .alert_create_for_customer_params import AlertCreateForCustomerParams as AlertCreateForCustomerParams +from .price_evaluate_multiple_response import PriceEvaluateMultipleResponse as PriceEvaluateMultipleResponse from .subscription_change_apply_params import SubscriptionChangeApplyParams as SubscriptionChangeApplyParams from .subscription_update_trial_params import SubscriptionUpdateTrialParams as SubscriptionUpdateTrialParams from .invoice_line_item_create_response import InvoiceLineItemCreateResponse as InvoiceLineItemCreateResponse @@ -90,6 +95,7 @@ from .subscription_price_intervals_params import SubscriptionPriceIntervalsParams as SubscriptionPriceIntervalsParams from .subscription_trigger_phase_response import SubscriptionTriggerPhaseResponse as SubscriptionTriggerPhaseResponse from .alert_create_for_subscription_params import AlertCreateForSubscriptionParams as AlertCreateForSubscriptionParams +from .beta_set_default_plan_version_params import BetaSetDefaultPlanVersionParams as BetaSetDefaultPlanVersionParams from .subscription_fetch_schedule_response import SubscriptionFetchScheduleResponse as SubscriptionFetchScheduleResponse from .customer_update_by_external_id_params import CustomerUpdateByExternalIDParams as CustomerUpdateByExternalIDParams from .dimensional_price_group_create_params import ( diff --git a/src/orb/types/alert.py b/src/orb/types/alert.py index b5e25436..47d5ad9f 100644 --- a/src/orb/types/alert.py +++ b/src/orb/types/alert.py @@ -6,7 +6,7 @@ from .._models import BaseModel -__all__ = ["Alert", "Customer", "Metric", "Plan", "Subscription", "Threshold"] +__all__ = ["Alert", "Customer", "Metric", "Plan", "Subscription", "Threshold", "BalanceAlertStatus"] class Customer(BaseModel): @@ -47,6 +47,14 @@ class Threshold(BaseModel): """ +class BalanceAlertStatus(BaseModel): + in_alert: bool + """Whether the alert is currently in-alert or not.""" + + threshold_value: float + """The value of the threshold that defines the alert status.""" + + class Alert(BaseModel): id: str """Also referred to as alert_id in this documentation.""" @@ -86,3 +94,9 @@ class Alert(BaseModel): "cost_exceeded", ] """The type of alert. This must be a valid alert type.""" + + balance_alert_status: Optional[List[BalanceAlertStatus]] = None + """The current status of the alert. + + This field is only present for credit balance alerts. + """ diff --git a/src/orb/types/beta/__init__.py b/src/orb/types/beta/__init__.py new file mode 100644 index 00000000..fc94e24f --- /dev/null +++ b/src/orb/types/beta/__init__.py @@ -0,0 +1,10 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from .external_plan_id_create_plan_version_params import ( + ExternalPlanIDCreatePlanVersionParams as ExternalPlanIDCreatePlanVersionParams, +) +from .external_plan_id_set_default_plan_version_params import ( + ExternalPlanIDSetDefaultPlanVersionParams as ExternalPlanIDSetDefaultPlanVersionParams, +) 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 new file mode 100644 index 00000000..4c45a519 --- /dev/null +++ b/src/orb/types/beta/external_plan_id_create_plan_version_params.py @@ -0,0 +1,6668 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Dict, List, Union, Iterable, Optional +from typing_extensions import Literal, Required, TypeAlias, TypedDict + +__all__ = [ + "ExternalPlanIDCreatePlanVersionParams", + "AddAdjustment", + "AddAdjustmentAdjustment", + "AddAdjustmentAdjustmentNewPercentageDiscount", + "AddAdjustmentAdjustmentNewUsageDiscount", + "AddAdjustmentAdjustmentNewAmountDiscount", + "AddAdjustmentAdjustmentNewMinimum", + "AddAdjustmentAdjustmentNewMaximum", + "AddPrice", + "AddPriceAllocationPrice", + "AddPriceAllocationPriceCustomExpiration", + "AddPricePrice", + "AddPricePriceNewPlanUnitPrice", + "AddPricePriceNewPlanUnitPriceUnitConfig", + "AddPricePriceNewPlanUnitPriceBillingCycleConfiguration", + "AddPricePriceNewPlanUnitPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanUnitPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanPackagePrice", + "AddPricePriceNewPlanPackagePricePackageConfig", + "AddPricePriceNewPlanPackagePriceBillingCycleConfiguration", + "AddPricePriceNewPlanPackagePriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanPackagePriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanMatrixPrice", + "AddPricePriceNewPlanMatrixPriceMatrixConfig", + "AddPricePriceNewPlanMatrixPriceMatrixConfigMatrixValue", + "AddPricePriceNewPlanMatrixPriceBillingCycleConfiguration", + "AddPricePriceNewPlanMatrixPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanMatrixPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanTieredPrice", + "AddPricePriceNewPlanTieredPriceTieredConfig", + "AddPricePriceNewPlanTieredPriceTieredConfigTier", + "AddPricePriceNewPlanTieredPriceBillingCycleConfiguration", + "AddPricePriceNewPlanTieredPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanTieredPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanTieredBpsPrice", + "AddPricePriceNewPlanTieredBpsPriceTieredBpsConfig", + "AddPricePriceNewPlanTieredBpsPriceTieredBpsConfigTier", + "AddPricePriceNewPlanTieredBpsPriceBillingCycleConfiguration", + "AddPricePriceNewPlanTieredBpsPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanTieredBpsPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanBpsPrice", + "AddPricePriceNewPlanBpsPriceBpsConfig", + "AddPricePriceNewPlanBpsPriceBillingCycleConfiguration", + "AddPricePriceNewPlanBpsPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanBpsPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanBulkBpsPrice", + "AddPricePriceNewPlanBulkBpsPriceBulkBpsConfig", + "AddPricePriceNewPlanBulkBpsPriceBulkBpsConfigTier", + "AddPricePriceNewPlanBulkBpsPriceBillingCycleConfiguration", + "AddPricePriceNewPlanBulkBpsPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanBulkBpsPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanBulkPrice", + "AddPricePriceNewPlanBulkPriceBulkConfig", + "AddPricePriceNewPlanBulkPriceBulkConfigTier", + "AddPricePriceNewPlanBulkPriceBillingCycleConfiguration", + "AddPricePriceNewPlanBulkPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanBulkPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanThresholdTotalAmountPrice", + "AddPricePriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration", + "AddPricePriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanTieredPackagePrice", + "AddPricePriceNewPlanTieredPackagePriceBillingCycleConfiguration", + "AddPricePriceNewPlanTieredPackagePriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanTieredPackagePriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanTieredWithMinimumPrice", + "AddPricePriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration", + "AddPricePriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanUnitWithPercentPrice", + "AddPricePriceNewPlanUnitWithPercentPriceBillingCycleConfiguration", + "AddPricePriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanPackageWithAllocationPrice", + "AddPricePriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration", + "AddPricePriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanTierWithProrationPrice", + "AddPricePriceNewPlanTierWithProrationPriceBillingCycleConfiguration", + "AddPricePriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanUnitWithProrationPrice", + "AddPricePriceNewPlanUnitWithProrationPriceBillingCycleConfiguration", + "AddPricePriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanGroupedAllocationPrice", + "AddPricePriceNewPlanGroupedAllocationPriceBillingCycleConfiguration", + "AddPricePriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanGroupedWithProratedMinimumPrice", + "AddPricePriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration", + "AddPricePriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanGroupedWithMeteredMinimumPrice", + "AddPricePriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration", + "AddPricePriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanMatrixWithDisplayNamePrice", + "AddPricePriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration", + "AddPricePriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanBulkWithProrationPrice", + "AddPricePriceNewPlanBulkWithProrationPriceBillingCycleConfiguration", + "AddPricePriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanGroupedTieredPackagePrice", + "AddPricePriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration", + "AddPricePriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanMaxGroupTieredPackagePrice", + "AddPricePriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration", + "AddPricePriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanScalableMatrixWithUnitPricingPrice", + "AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration", + "AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanScalableMatrixWithTieredPricingPrice", + "AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration", + "AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanCumulativeGroupedBulkPrice", + "AddPricePriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration", + "AddPricePriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanTieredPackageWithMinimumPrice", + "AddPricePriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration", + "AddPricePriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanMatrixWithAllocationPrice", + "AddPricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig", + "AddPricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue", + "AddPricePriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration", + "AddPricePriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanGroupedTieredPrice", + "AddPricePriceNewPlanGroupedTieredPriceBillingCycleConfiguration", + "AddPricePriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration", + "RemoveAdjustment", + "RemovePrice", + "ReplaceAdjustment", + "ReplaceAdjustmentAdjustment", + "ReplaceAdjustmentAdjustmentNewPercentageDiscount", + "ReplaceAdjustmentAdjustmentNewUsageDiscount", + "ReplaceAdjustmentAdjustmentNewAmountDiscount", + "ReplaceAdjustmentAdjustmentNewMinimum", + "ReplaceAdjustmentAdjustmentNewMaximum", + "ReplacePrice", + "ReplacePriceAllocationPrice", + "ReplacePriceAllocationPriceCustomExpiration", + "ReplacePricePrice", + "ReplacePricePriceNewPlanUnitPrice", + "ReplacePricePriceNewPlanUnitPriceUnitConfig", + "ReplacePricePriceNewPlanUnitPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanUnitPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanUnitPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanPackagePrice", + "ReplacePricePriceNewPlanPackagePricePackageConfig", + "ReplacePricePriceNewPlanPackagePriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanPackagePriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanPackagePriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanMatrixPrice", + "ReplacePricePriceNewPlanMatrixPriceMatrixConfig", + "ReplacePricePriceNewPlanMatrixPriceMatrixConfigMatrixValue", + "ReplacePricePriceNewPlanMatrixPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanMatrixPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanMatrixPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanTieredPrice", + "ReplacePricePriceNewPlanTieredPriceTieredConfig", + "ReplacePricePriceNewPlanTieredPriceTieredConfigTier", + "ReplacePricePriceNewPlanTieredPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanTieredPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanTieredPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanTieredBpsPrice", + "ReplacePricePriceNewPlanTieredBpsPriceTieredBpsConfig", + "ReplacePricePriceNewPlanTieredBpsPriceTieredBpsConfigTier", + "ReplacePricePriceNewPlanTieredBpsPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanTieredBpsPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanTieredBpsPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanBpsPrice", + "ReplacePricePriceNewPlanBpsPriceBpsConfig", + "ReplacePricePriceNewPlanBpsPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanBpsPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanBpsPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanBulkBpsPrice", + "ReplacePricePriceNewPlanBulkBpsPriceBulkBpsConfig", + "ReplacePricePriceNewPlanBulkBpsPriceBulkBpsConfigTier", + "ReplacePricePriceNewPlanBulkBpsPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanBulkBpsPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanBulkBpsPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanBulkPrice", + "ReplacePricePriceNewPlanBulkPriceBulkConfig", + "ReplacePricePriceNewPlanBulkPriceBulkConfigTier", + "ReplacePricePriceNewPlanBulkPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanBulkPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanBulkPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanThresholdTotalAmountPrice", + "ReplacePricePriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanTieredPackagePrice", + "ReplacePricePriceNewPlanTieredPackagePriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanTieredPackagePriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanTieredPackagePriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanTieredWithMinimumPrice", + "ReplacePricePriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanUnitWithPercentPrice", + "ReplacePricePriceNewPlanUnitWithPercentPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanPackageWithAllocationPrice", + "ReplacePricePriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanTierWithProrationPrice", + "ReplacePricePriceNewPlanTierWithProrationPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanUnitWithProrationPrice", + "ReplacePricePriceNewPlanUnitWithProrationPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanGroupedAllocationPrice", + "ReplacePricePriceNewPlanGroupedAllocationPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanGroupedWithProratedMinimumPrice", + "ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanGroupedWithMeteredMinimumPrice", + "ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanMatrixWithDisplayNamePrice", + "ReplacePricePriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanBulkWithProrationPrice", + "ReplacePricePriceNewPlanBulkWithProrationPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanGroupedTieredPackagePrice", + "ReplacePricePriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanMaxGroupTieredPackagePrice", + "ReplacePricePriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPrice", + "ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPrice", + "ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanCumulativeGroupedBulkPrice", + "ReplacePricePriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanTieredPackageWithMinimumPrice", + "ReplacePricePriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanMatrixWithAllocationPrice", + "ReplacePricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig", + "ReplacePricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue", + "ReplacePricePriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanGroupedTieredPrice", + "ReplacePricePriceNewPlanGroupedTieredPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration", +] + + +class ExternalPlanIDCreatePlanVersionParams(TypedDict, total=False): + version: Required[int] + """New version number.""" + + add_adjustments: Optional[Iterable[AddAdjustment]] + """Additional adjustments to be added to the plan.""" + + add_prices: Optional[Iterable[AddPrice]] + """Additional prices to be added to the plan.""" + + remove_adjustments: Optional[Iterable[RemoveAdjustment]] + """Adjustments to be removed from the plan.""" + + remove_prices: Optional[Iterable[RemovePrice]] + """Prices to be removed from the plan.""" + + replace_adjustments: Optional[Iterable[ReplaceAdjustment]] + """Adjustments to be replaced with additional adjustments on the plan.""" + + replace_prices: Optional[Iterable[ReplacePrice]] + """Prices to be replaced with additional prices on the plan.""" + + set_as_default: Optional[bool] + """Set this new plan version as the default""" + + +class AddAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False): + adjustment_type: Required[Literal["percentage_discount"]] + + percentage_discount: Required[float] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +class AddAdjustmentAdjustmentNewUsageDiscount(TypedDict, total=False): + adjustment_type: Required[Literal["usage_discount"]] + + usage_discount: Required[float] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +class AddAdjustmentAdjustmentNewAmountDiscount(TypedDict, total=False): + adjustment_type: Required[Literal["amount_discount"]] + + amount_discount: Required[str] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +class AddAdjustmentAdjustmentNewMinimum(TypedDict, total=False): + adjustment_type: Required[Literal["minimum"]] + + item_id: Required[str] + """The item ID that revenue from this minimum will be attributed to.""" + + minimum_amount: Required[str] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +class AddAdjustmentAdjustmentNewMaximum(TypedDict, total=False): + adjustment_type: Required[Literal["maximum"]] + + maximum_amount: Required[str] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +AddAdjustmentAdjustment: TypeAlias = Union[ + AddAdjustmentAdjustmentNewPercentageDiscount, + AddAdjustmentAdjustmentNewUsageDiscount, + AddAdjustmentAdjustmentNewAmountDiscount, + AddAdjustmentAdjustmentNewMinimum, + AddAdjustmentAdjustmentNewMaximum, +] + + +class AddAdjustment(TypedDict, total=False): + adjustment: Required[AddAdjustmentAdjustment] + """The definition of a new adjustment to create and add to the plan.""" + + plan_phase_order: Optional[int] + """The phase to add this adjustment to.""" + + +class AddPriceAllocationPriceCustomExpiration(TypedDict, total=False): + duration: Required[int] + + duration_unit: Required[Literal["day", "month"]] + + +class AddPriceAllocationPrice(TypedDict, total=False): + amount: Required[str] + """An amount of the currency to allocate to the customer at the specified cadence.""" + + cadence: Required[Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]] + """The cadence at which to allocate the amount to the customer.""" + + currency: Required[str] + """ + An ISO 4217 currency string or a custom pricing unit identifier in which to bill + this price. + """ + + custom_expiration: Optional[AddPriceAllocationPriceCustomExpiration] + """The custom expiration for the allocation.""" + + expires_at_end_of_cadence: Optional[bool] + """ + Whether the allocated amount should expire at the end of the cadence or roll + over to the next period. Set to null if using custom_expiration. + """ + + +class AddPricePriceNewPlanUnitPriceUnitConfig(TypedDict, total=False): + unit_amount: Required[str] + """Rate per unit of usage""" + + +class AddPricePriceNewPlanUnitPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanUnitPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanUnitPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanUnitPrice(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["unit"]] + + name: Required[str] + """The name of the price.""" + + unit_config: Required[AddPricePriceNewPlanUnitPriceUnitConfig] + + 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[AddPricePriceNewPlanUnitPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanUnitPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanUnitPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanPackagePricePackageConfig(TypedDict, total=False): + package_amount: Required[str] + """A currency amount to rate usage by""" + + package_size: Required[int] + """An integer amount to represent package size. + + For example, 1000 here would divide usage by 1000 before multiplying by + package_amount in rating + """ + + +class AddPricePriceNewPlanPackagePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanPackagePrice(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["package"]] + + name: Required[str] + """The name of the price.""" + + package_config: Required[AddPricePriceNewPlanPackagePricePackageConfig] + + 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[AddPricePriceNewPlanPackagePriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanPackagePriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanPackagePriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanMatrixPriceMatrixConfigMatrixValue(TypedDict, total=False): + dimension_values: Required[List[Optional[str]]] + """One or two matrix keys to filter usage to this Matrix value by. + + For example, ["region", "tier"] could be used to filter cloud usage by a cloud + region and an instance tier. + """ + + unit_amount: Required[str] + """Unit price for the specified dimension_values""" + + +class AddPricePriceNewPlanMatrixPriceMatrixConfig(TypedDict, total=False): + default_unit_amount: Required[str] + """Default per unit rate for any usage not bucketed into a specified matrix_value""" + + dimensions: Required[List[Optional[str]]] + """One or two event property values to evaluate matrix groups by""" + + matrix_values: Required[Iterable[AddPricePriceNewPlanMatrixPriceMatrixConfigMatrixValue]] + """Matrix values for specified matrix grouping keys""" + + +class AddPricePriceNewPlanMatrixPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanMatrixPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanMatrixPrice(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.""" + + matrix_config: Required[AddPricePriceNewPlanMatrixPriceMatrixConfig] + + model_type: Required[Literal["matrix"]] + + 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[AddPricePriceNewPlanMatrixPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanMatrixPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanMatrixPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanTieredPriceTieredConfigTier(TypedDict, total=False): + first_unit: Required[float] + """Exclusive tier starting value""" + + unit_amount: Required[str] + """Amount per unit""" + + last_unit: Optional[float] + """Inclusive tier ending value. If null, this is treated as the last tier""" + + +class AddPricePriceNewPlanTieredPriceTieredConfig(TypedDict, total=False): + tiers: Required[Iterable[AddPricePriceNewPlanTieredPriceTieredConfigTier]] + """Tiers for rating based on total usage quantities into the specified tier""" + + +class AddPricePriceNewPlanTieredPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanTieredPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanTieredPrice(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"]] + + name: Required[str] + """The name of the price.""" + + tiered_config: Required[AddPricePriceNewPlanTieredPriceTieredConfig] + + 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[AddPricePriceNewPlanTieredPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanTieredPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanTieredPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanTieredBpsPriceTieredBpsConfigTier(TypedDict, total=False): + bps: Required[float] + """Per-event basis point rate""" + + minimum_amount: Required[str] + """Exclusive tier starting value""" + + maximum_amount: Optional[str] + """Inclusive tier ending value""" + + per_unit_maximum: Optional[str] + """Per unit maximum to charge""" + + +class AddPricePriceNewPlanTieredBpsPriceTieredBpsConfig(TypedDict, total=False): + tiers: Required[Iterable[AddPricePriceNewPlanTieredBpsPriceTieredBpsConfigTier]] + """ + Tiers for a Graduated BPS pricing model, where usage is bucketed into specified + tiers + """ + + +class AddPricePriceNewPlanTieredBpsPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanTieredBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanTieredBpsPrice(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_bps"]] + + name: Required[str] + """The name of the price.""" + + tiered_bps_config: Required[AddPricePriceNewPlanTieredBpsPriceTieredBpsConfig] + + 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[AddPricePriceNewPlanTieredBpsPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanTieredBpsPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanTieredBpsPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanBpsPriceBpsConfig(TypedDict, total=False): + bps: Required[float] + """Basis point take rate per event""" + + per_unit_maximum: Optional[str] + """Optional currency amount maximum to cap spend per event""" + + +class AddPricePriceNewPlanBpsPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanBpsPrice(TypedDict, total=False): + bps_config: Required[AddPricePriceNewPlanBpsPriceBpsConfig] + + 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["bps"]] + + 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[AddPricePriceNewPlanBpsPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanBpsPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanBpsPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanBulkBpsPriceBulkBpsConfigTier(TypedDict, total=False): + bps: Required[float] + """Basis points to rate on""" + + maximum_amount: Optional[str] + """Upper bound for tier""" + + per_unit_maximum: Optional[str] + """The maximum amount to charge for any one event""" + + +class AddPricePriceNewPlanBulkBpsPriceBulkBpsConfig(TypedDict, total=False): + tiers: Required[Iterable[AddPricePriceNewPlanBulkBpsPriceBulkBpsConfigTier]] + """ + Tiers for a bulk BPS pricing model where all usage is aggregated to a single + tier based on total volume + """ + + +class AddPricePriceNewPlanBulkBpsPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanBulkBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanBulkBpsPrice(TypedDict, total=False): + bulk_bps_config: Required[AddPricePriceNewPlanBulkBpsPriceBulkBpsConfig] + + 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_bps"]] + + 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[AddPricePriceNewPlanBulkBpsPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanBulkBpsPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanBulkBpsPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanBulkPriceBulkConfigTier(TypedDict, total=False): + unit_amount: Required[str] + """Amount per unit""" + + maximum_units: Optional[float] + """Upper bound for this tier""" + + +class AddPricePriceNewPlanBulkPriceBulkConfig(TypedDict, total=False): + tiers: Required[Iterable[AddPricePriceNewPlanBulkPriceBulkConfigTier]] + """Bulk tiers for rating based on total usage volume""" + + +class AddPricePriceNewPlanBulkPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanBulkPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanBulkPrice(TypedDict, total=False): + bulk_config: Required[AddPricePriceNewPlanBulkPriceBulkConfig] + + 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"]] + + 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[AddPricePriceNewPlanBulkPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanBulkPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanBulkPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanThresholdTotalAmountPrice(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["threshold_total_amount"]] + + name: Required[str] + """The name of the price.""" + + threshold_total_amount_config: Required[Dict[str, object]] + + 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[AddPricePriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration + ] + """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[AddPricePriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanTieredPackagePrice(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_package"]] + + name: Required[str] + """The name of the price.""" + + tiered_package_config: Required[Dict[str, object]] + + 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[AddPricePriceNewPlanTieredPackagePriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanTieredPackagePriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanTieredPackagePriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanTieredWithMinimumPrice(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_minimum"]] + + name: Required[str] + """The name of the price.""" + + tiered_with_minimum_config: Required[Dict[str, object]] + + 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[AddPricePriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanUnitWithPercentPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanUnitWithPercentPrice(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["unit_with_percent"]] + + name: Required[str] + """The name of the price.""" + + unit_with_percent_config: Required[Dict[str, object]] + + 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[AddPricePriceNewPlanUnitWithPercentPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanPackageWithAllocationPrice(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["package_with_allocation"]] + + name: Required[str] + """The name of the price.""" + + package_with_allocation_config: Required[Dict[str, object]] + + 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[AddPricePriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration + ] + """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[AddPricePriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanTierWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanTierWithProrationPrice(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"]] + + name: Required[str] + """The name of the price.""" + + tiered_with_proration_config: Required[Dict[str, object]] + + 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[AddPricePriceNewPlanTierWithProrationPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanUnitWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanUnitWithProrationPrice(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["unit_with_proration"]] + + name: Required[str] + """The name of the price.""" + + unit_with_proration_config: Required[Dict[str, object]] + + 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[AddPricePriceNewPlanUnitWithProrationPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanGroupedAllocationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanGroupedAllocationPrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_allocation"]] + + 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[AddPricePriceNewPlanGroupedAllocationPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanGroupedWithProratedMinimumPrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_with_prorated_minimum"]] + + 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[AddPricePriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration + ] + """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[ + AddPricePriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanGroupedWithMeteredMinimumPrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_with_metered_minimum"]] + + 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[AddPricePriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration + ] + """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[ + AddPricePriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanMatrixWithDisplayNamePrice(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.""" + + matrix_with_display_name_config: Required[Dict[str, object]] + + model_type: Required[Literal["matrix_with_display_name"]] + + 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[AddPricePriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration + ] + """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[AddPricePriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanBulkWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanBulkWithProrationPrice(TypedDict, total=False): + bulk_with_proration_config: Required[Dict[str, object]] + + 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_proration"]] + + 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[AddPricePriceNewPlanBulkWithProrationPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanGroupedTieredPackagePrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_tiered_package"]] + + 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[AddPricePriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration + ] + """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[AddPricePriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanMaxGroupTieredPackagePrice(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.""" + + max_group_tiered_package_config: Required[Dict[str, object]] + + model_type: Required[Literal["max_group_tiered_package"]] + + 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[AddPricePriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration + ] + """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[AddPricePriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanScalableMatrixWithUnitPricingPrice(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["scalable_matrix_with_unit_pricing"]] + + name: Required[str] + """The name of the price.""" + + scalable_matrix_with_unit_pricing_config: Required[Dict[str, object]] + + 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[ + AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration + ] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration + ] + """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[ + AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanScalableMatrixWithTieredPricingPrice(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["scalable_matrix_with_tiered_pricing"]] + + name: Required[str] + """The name of the price.""" + + scalable_matrix_with_tiered_pricing_config: Required[Dict[str, object]] + + 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[ + AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration + ] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration + ] + """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[ + AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanCumulativeGroupedBulkPrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["cumulative_grouped_bulk"]] + + 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[AddPricePriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration + ] + """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[AddPricePriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanTieredPackageWithMinimumPrice(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_package_with_minimum"]] + + name: Required[str] + """The name of the price.""" + + tiered_package_with_minimum_config: Required[Dict[str, object]] + + 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[AddPricePriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration + ] + """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[ + AddPricePriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue(TypedDict, total=False): + dimension_values: Required[List[Optional[str]]] + """One or two matrix keys to filter usage to this Matrix value by. + + For example, ["region", "tier"] could be used to filter cloud usage by a cloud + region and an instance tier. + """ + + unit_amount: Required[str] + """Unit price for the specified dimension_values""" + + +class AddPricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig(TypedDict, total=False): + allocation: Required[float] + """Allocation to be used to calculate the price""" + + default_unit_amount: Required[str] + """Default per unit rate for any usage not bucketed into a specified matrix_value""" + + dimensions: Required[List[Optional[str]]] + """One or two event property values to evaluate matrix groups by""" + + matrix_values: Required[ + Iterable[AddPricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue] + ] + """Matrix values for specified matrix grouping keys""" + + +class AddPricePriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanMatrixWithAllocationPrice(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.""" + + matrix_with_allocation_config: Required[AddPricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig] + + model_type: Required[Literal["matrix_with_allocation"]] + + 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[AddPricePriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration + ] + """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[AddPricePriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanGroupedTieredPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanGroupedTieredPrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_tiered"]] + + 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[AddPricePriceNewPlanGroupedTieredPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +AddPricePrice: TypeAlias = Union[ + AddPricePriceNewPlanUnitPrice, + AddPricePriceNewPlanPackagePrice, + AddPricePriceNewPlanMatrixPrice, + AddPricePriceNewPlanTieredPrice, + AddPricePriceNewPlanTieredBpsPrice, + AddPricePriceNewPlanBpsPrice, + AddPricePriceNewPlanBulkBpsPrice, + AddPricePriceNewPlanBulkPrice, + AddPricePriceNewPlanThresholdTotalAmountPrice, + AddPricePriceNewPlanTieredPackagePrice, + AddPricePriceNewPlanTieredWithMinimumPrice, + AddPricePriceNewPlanUnitWithPercentPrice, + AddPricePriceNewPlanPackageWithAllocationPrice, + AddPricePriceNewPlanTierWithProrationPrice, + AddPricePriceNewPlanUnitWithProrationPrice, + AddPricePriceNewPlanGroupedAllocationPrice, + AddPricePriceNewPlanGroupedWithProratedMinimumPrice, + AddPricePriceNewPlanGroupedWithMeteredMinimumPrice, + AddPricePriceNewPlanMatrixWithDisplayNamePrice, + AddPricePriceNewPlanBulkWithProrationPrice, + AddPricePriceNewPlanGroupedTieredPackagePrice, + AddPricePriceNewPlanMaxGroupTieredPackagePrice, + AddPricePriceNewPlanScalableMatrixWithUnitPricingPrice, + AddPricePriceNewPlanScalableMatrixWithTieredPricingPrice, + AddPricePriceNewPlanCumulativeGroupedBulkPrice, + AddPricePriceNewPlanTieredPackageWithMinimumPrice, + AddPricePriceNewPlanMatrixWithAllocationPrice, + AddPricePriceNewPlanGroupedTieredPrice, +] + + +class AddPrice(TypedDict, total=False): + allocation_price: Optional[AddPriceAllocationPrice] + """The allocation price to add to the plan.""" + + plan_phase_order: Optional[int] + """The phase to add this price to.""" + + price: Optional[AddPricePrice] + """The price to add to the plan""" + + +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.""" + + +class ReplaceAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False): + adjustment_type: Required[Literal["percentage_discount"]] + + percentage_discount: Required[float] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +class ReplaceAdjustmentAdjustmentNewUsageDiscount(TypedDict, total=False): + adjustment_type: Required[Literal["usage_discount"]] + + usage_discount: Required[float] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +class ReplaceAdjustmentAdjustmentNewAmountDiscount(TypedDict, total=False): + adjustment_type: Required[Literal["amount_discount"]] + + amount_discount: Required[str] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +class ReplaceAdjustmentAdjustmentNewMinimum(TypedDict, total=False): + adjustment_type: Required[Literal["minimum"]] + + item_id: Required[str] + """The item ID that revenue from this minimum will be attributed to.""" + + minimum_amount: Required[str] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +class ReplaceAdjustmentAdjustmentNewMaximum(TypedDict, total=False): + adjustment_type: Required[Literal["maximum"]] + + maximum_amount: Required[str] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +ReplaceAdjustmentAdjustment: TypeAlias = Union[ + ReplaceAdjustmentAdjustmentNewPercentageDiscount, + ReplaceAdjustmentAdjustmentNewUsageDiscount, + ReplaceAdjustmentAdjustmentNewAmountDiscount, + ReplaceAdjustmentAdjustmentNewMinimum, + ReplaceAdjustmentAdjustmentNewMaximum, +] + + +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 ReplacePriceAllocationPriceCustomExpiration(TypedDict, total=False): + duration: Required[int] + + duration_unit: Required[Literal["day", "month"]] + + +class ReplacePriceAllocationPrice(TypedDict, total=False): + amount: Required[str] + """An amount of the currency to allocate to the customer at the specified cadence.""" + + cadence: Required[Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]] + """The cadence at which to allocate the amount to the customer.""" + + currency: Required[str] + """ + An ISO 4217 currency string or a custom pricing unit identifier in which to bill + this price. + """ + + custom_expiration: Optional[ReplacePriceAllocationPriceCustomExpiration] + """The custom expiration for the allocation.""" + + expires_at_end_of_cadence: Optional[bool] + """ + Whether the allocated amount should expire at the end of the cadence or roll + over to the next period. Set to null if using custom_expiration. + """ + + +class ReplacePricePriceNewPlanUnitPriceUnitConfig(TypedDict, total=False): + unit_amount: Required[str] + """Rate per unit of usage""" + + +class ReplacePricePriceNewPlanUnitPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanUnitPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanUnitPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanUnitPrice(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["unit"]] + + name: Required[str] + """The name of the price.""" + + unit_config: Required[ReplacePricePriceNewPlanUnitPriceUnitConfig] + + 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[ReplacePricePriceNewPlanUnitPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ReplacePricePriceNewPlanUnitPriceDimensionalPriceConfiguration] + """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[ReplacePricePriceNewPlanUnitPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanPackagePricePackageConfig(TypedDict, total=False): + package_amount: Required[str] + """A currency amount to rate usage by""" + + package_size: Required[int] + """An integer amount to represent package size. + + For example, 1000 here would divide usage by 1000 before multiplying by + package_amount in rating + """ + + +class ReplacePricePriceNewPlanPackagePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanPackagePrice(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["package"]] + + name: Required[str] + """The name of the price.""" + + package_config: Required[ReplacePricePriceNewPlanPackagePricePackageConfig] + + 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[ReplacePricePriceNewPlanPackagePriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ReplacePricePriceNewPlanPackagePriceDimensionalPriceConfiguration] + """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[ReplacePricePriceNewPlanPackagePriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanMatrixPriceMatrixConfigMatrixValue(TypedDict, total=False): + dimension_values: Required[List[Optional[str]]] + """One or two matrix keys to filter usage to this Matrix value by. + + For example, ["region", "tier"] could be used to filter cloud usage by a cloud + region and an instance tier. + """ + + unit_amount: Required[str] + """Unit price for the specified dimension_values""" + + +class ReplacePricePriceNewPlanMatrixPriceMatrixConfig(TypedDict, total=False): + default_unit_amount: Required[str] + """Default per unit rate for any usage not bucketed into a specified matrix_value""" + + dimensions: Required[List[Optional[str]]] + """One or two event property values to evaluate matrix groups by""" + + matrix_values: Required[Iterable[ReplacePricePriceNewPlanMatrixPriceMatrixConfigMatrixValue]] + """Matrix values for specified matrix grouping keys""" + + +class ReplacePricePriceNewPlanMatrixPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanMatrixPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanMatrixPrice(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.""" + + matrix_config: Required[ReplacePricePriceNewPlanMatrixPriceMatrixConfig] + + model_type: Required[Literal["matrix"]] + + 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[ReplacePricePriceNewPlanMatrixPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ReplacePricePriceNewPlanMatrixPriceDimensionalPriceConfiguration] + """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[ReplacePricePriceNewPlanMatrixPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanTieredPriceTieredConfigTier(TypedDict, total=False): + first_unit: Required[float] + """Exclusive tier starting value""" + + unit_amount: Required[str] + """Amount per unit""" + + last_unit: Optional[float] + """Inclusive tier ending value. If null, this is treated as the last tier""" + + +class ReplacePricePriceNewPlanTieredPriceTieredConfig(TypedDict, total=False): + tiers: Required[Iterable[ReplacePricePriceNewPlanTieredPriceTieredConfigTier]] + """Tiers for rating based on total usage quantities into the specified tier""" + + +class ReplacePricePriceNewPlanTieredPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanTieredPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanTieredPrice(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"]] + + name: Required[str] + """The name of the price.""" + + tiered_config: Required[ReplacePricePriceNewPlanTieredPriceTieredConfig] + + 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[ReplacePricePriceNewPlanTieredPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ReplacePricePriceNewPlanTieredPriceDimensionalPriceConfiguration] + """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[ReplacePricePriceNewPlanTieredPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanTieredBpsPriceTieredBpsConfigTier(TypedDict, total=False): + bps: Required[float] + """Per-event basis point rate""" + + minimum_amount: Required[str] + """Exclusive tier starting value""" + + maximum_amount: Optional[str] + """Inclusive tier ending value""" + + per_unit_maximum: Optional[str] + """Per unit maximum to charge""" + + +class ReplacePricePriceNewPlanTieredBpsPriceTieredBpsConfig(TypedDict, total=False): + tiers: Required[Iterable[ReplacePricePriceNewPlanTieredBpsPriceTieredBpsConfigTier]] + """ + Tiers for a Graduated BPS pricing model, where usage is bucketed into specified + tiers + """ + + +class ReplacePricePriceNewPlanTieredBpsPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanTieredBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanTieredBpsPrice(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_bps"]] + + name: Required[str] + """The name of the price.""" + + tiered_bps_config: Required[ReplacePricePriceNewPlanTieredBpsPriceTieredBpsConfig] + + 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[ReplacePricePriceNewPlanTieredBpsPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ReplacePricePriceNewPlanTieredBpsPriceDimensionalPriceConfiguration] + """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[ReplacePricePriceNewPlanTieredBpsPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanBpsPriceBpsConfig(TypedDict, total=False): + bps: Required[float] + """Basis point take rate per event""" + + per_unit_maximum: Optional[str] + """Optional currency amount maximum to cap spend per event""" + + +class ReplacePricePriceNewPlanBpsPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanBpsPrice(TypedDict, total=False): + bps_config: Required[ReplacePricePriceNewPlanBpsPriceBpsConfig] + + 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["bps"]] + + 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[ReplacePricePriceNewPlanBpsPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ReplacePricePriceNewPlanBpsPriceDimensionalPriceConfiguration] + """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[ReplacePricePriceNewPlanBpsPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanBulkBpsPriceBulkBpsConfigTier(TypedDict, total=False): + bps: Required[float] + """Basis points to rate on""" + + maximum_amount: Optional[str] + """Upper bound for tier""" + + per_unit_maximum: Optional[str] + """The maximum amount to charge for any one event""" + + +class ReplacePricePriceNewPlanBulkBpsPriceBulkBpsConfig(TypedDict, total=False): + tiers: Required[Iterable[ReplacePricePriceNewPlanBulkBpsPriceBulkBpsConfigTier]] + """ + Tiers for a bulk BPS pricing model where all usage is aggregated to a single + tier based on total volume + """ + + +class ReplacePricePriceNewPlanBulkBpsPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanBulkBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanBulkBpsPrice(TypedDict, total=False): + bulk_bps_config: Required[ReplacePricePriceNewPlanBulkBpsPriceBulkBpsConfig] + + 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_bps"]] + + 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[ReplacePricePriceNewPlanBulkBpsPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ReplacePricePriceNewPlanBulkBpsPriceDimensionalPriceConfiguration] + """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[ReplacePricePriceNewPlanBulkBpsPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanBulkPriceBulkConfigTier(TypedDict, total=False): + unit_amount: Required[str] + """Amount per unit""" + + maximum_units: Optional[float] + """Upper bound for this tier""" + + +class ReplacePricePriceNewPlanBulkPriceBulkConfig(TypedDict, total=False): + tiers: Required[Iterable[ReplacePricePriceNewPlanBulkPriceBulkConfigTier]] + """Bulk tiers for rating based on total usage volume""" + + +class ReplacePricePriceNewPlanBulkPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanBulkPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanBulkPrice(TypedDict, total=False): + bulk_config: Required[ReplacePricePriceNewPlanBulkPriceBulkConfig] + + 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"]] + + 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[ReplacePricePriceNewPlanBulkPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ReplacePricePriceNewPlanBulkPriceDimensionalPriceConfiguration] + """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[ReplacePricePriceNewPlanBulkPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanThresholdTotalAmountPrice(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["threshold_total_amount"]] + + name: Required[str] + """The name of the price.""" + + threshold_total_amount_config: Required[Dict[str, object]] + + 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[ReplacePricePriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration + ] + """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[ + ReplacePricePriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanTieredPackagePrice(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_package"]] + + name: Required[str] + """The name of the price.""" + + tiered_package_config: Required[Dict[str, object]] + + 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[ReplacePricePriceNewPlanTieredPackagePriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ReplacePricePriceNewPlanTieredPackagePriceDimensionalPriceConfiguration] + """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[ReplacePricePriceNewPlanTieredPackagePriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanTieredWithMinimumPrice(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_minimum"]] + + name: Required[str] + """The name of the price.""" + + tiered_with_minimum_config: Required[Dict[str, object]] + + 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[ReplacePricePriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration + ] + """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[ReplacePricePriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanUnitWithPercentPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanUnitWithPercentPrice(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["unit_with_percent"]] + + name: Required[str] + """The name of the price.""" + + unit_with_percent_config: Required[Dict[str, object]] + + 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[ReplacePricePriceNewPlanUnitWithPercentPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ReplacePricePriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration] + """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[ReplacePricePriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanPackageWithAllocationPrice(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["package_with_allocation"]] + + name: Required[str] + """The name of the price.""" + + package_with_allocation_config: Required[Dict[str, object]] + + 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[ReplacePricePriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration + ] + """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[ + ReplacePricePriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanTierWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanTierWithProrationPrice(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"]] + + name: Required[str] + """The name of the price.""" + + tiered_with_proration_config: Required[Dict[str, object]] + + 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[ReplacePricePriceNewPlanTierWithProrationPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration + ] + """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[ReplacePricePriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanUnitWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanUnitWithProrationPrice(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["unit_with_proration"]] + + name: Required[str] + """The name of the price.""" + + unit_with_proration_config: Required[Dict[str, object]] + + 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[ReplacePricePriceNewPlanUnitWithProrationPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration + ] + """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[ReplacePricePriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanGroupedAllocationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanGroupedAllocationPrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_allocation"]] + + 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[ReplacePricePriceNewPlanGroupedAllocationPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration + ] + """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[ReplacePricePriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanGroupedWithProratedMinimumPrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_with_prorated_minimum"]] + + 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[ + ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration + ] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration + ] + """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[ + ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanGroupedWithMeteredMinimumPrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_with_metered_minimum"]] + + 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[ + ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration + ] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration + ] + """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[ + ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanMatrixWithDisplayNamePrice(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.""" + + matrix_with_display_name_config: Required[Dict[str, object]] + + model_type: Required[Literal["matrix_with_display_name"]] + + 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[ReplacePricePriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration + ] + """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[ + ReplacePricePriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanBulkWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanBulkWithProrationPrice(TypedDict, total=False): + bulk_with_proration_config: Required[Dict[str, object]] + + 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_proration"]] + + 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[ReplacePricePriceNewPlanBulkWithProrationPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration + ] + """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[ReplacePricePriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanGroupedTieredPackagePrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_tiered_package"]] + + 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[ReplacePricePriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration + ] + """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[ + ReplacePricePriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanMaxGroupTieredPackagePrice(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.""" + + max_group_tiered_package_config: Required[Dict[str, object]] + + model_type: Required[Literal["max_group_tiered_package"]] + + 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[ReplacePricePriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration + ] + """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[ + ReplacePricePriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPrice(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["scalable_matrix_with_unit_pricing"]] + + name: Required[str] + """The name of the price.""" + + scalable_matrix_with_unit_pricing_config: Required[Dict[str, object]] + + 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[ + ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration + ] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration + ] + """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[ + ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPrice(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["scalable_matrix_with_tiered_pricing"]] + + name: Required[str] + """The name of the price.""" + + scalable_matrix_with_tiered_pricing_config: Required[Dict[str, object]] + + 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[ + ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration + ] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration + ] + """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[ + ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanCumulativeGroupedBulkPrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["cumulative_grouped_bulk"]] + + 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[ReplacePricePriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration + ] + """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[ + ReplacePricePriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanTieredPackageWithMinimumPrice(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_package_with_minimum"]] + + name: Required[str] + """The name of the price.""" + + tiered_package_with_minimum_config: Required[Dict[str, object]] + + 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[ + ReplacePricePriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration + ] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration + ] + """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[ + ReplacePricePriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue(TypedDict, total=False): + dimension_values: Required[List[Optional[str]]] + """One or two matrix keys to filter usage to this Matrix value by. + + For example, ["region", "tier"] could be used to filter cloud usage by a cloud + region and an instance tier. + """ + + unit_amount: Required[str] + """Unit price for the specified dimension_values""" + + +class ReplacePricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig(TypedDict, total=False): + allocation: Required[float] + """Allocation to be used to calculate the price""" + + default_unit_amount: Required[str] + """Default per unit rate for any usage not bucketed into a specified matrix_value""" + + dimensions: Required[List[Optional[str]]] + """One or two event property values to evaluate matrix groups by""" + + matrix_values: Required[ + Iterable[ReplacePricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue] + ] + """Matrix values for specified matrix grouping keys""" + + +class ReplacePricePriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanMatrixWithAllocationPrice(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.""" + + matrix_with_allocation_config: Required[ReplacePricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig] + + model_type: Required[Literal["matrix_with_allocation"]] + + 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[ReplacePricePriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration + ] + """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[ + ReplacePricePriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanGroupedTieredPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanGroupedTieredPrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_tiered"]] + + 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[ReplacePricePriceNewPlanGroupedTieredPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ReplacePricePriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration] + """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[ReplacePricePriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +ReplacePricePrice: TypeAlias = Union[ + ReplacePricePriceNewPlanUnitPrice, + ReplacePricePriceNewPlanPackagePrice, + ReplacePricePriceNewPlanMatrixPrice, + ReplacePricePriceNewPlanTieredPrice, + ReplacePricePriceNewPlanTieredBpsPrice, + ReplacePricePriceNewPlanBpsPrice, + ReplacePricePriceNewPlanBulkBpsPrice, + ReplacePricePriceNewPlanBulkPrice, + ReplacePricePriceNewPlanThresholdTotalAmountPrice, + ReplacePricePriceNewPlanTieredPackagePrice, + ReplacePricePriceNewPlanTieredWithMinimumPrice, + ReplacePricePriceNewPlanUnitWithPercentPrice, + ReplacePricePriceNewPlanPackageWithAllocationPrice, + ReplacePricePriceNewPlanTierWithProrationPrice, + ReplacePricePriceNewPlanUnitWithProrationPrice, + ReplacePricePriceNewPlanGroupedAllocationPrice, + ReplacePricePriceNewPlanGroupedWithProratedMinimumPrice, + ReplacePricePriceNewPlanGroupedWithMeteredMinimumPrice, + ReplacePricePriceNewPlanMatrixWithDisplayNamePrice, + ReplacePricePriceNewPlanBulkWithProrationPrice, + ReplacePricePriceNewPlanGroupedTieredPackagePrice, + ReplacePricePriceNewPlanMaxGroupTieredPackagePrice, + ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPrice, + ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPrice, + ReplacePricePriceNewPlanCumulativeGroupedBulkPrice, + ReplacePricePriceNewPlanTieredPackageWithMinimumPrice, + ReplacePricePriceNewPlanMatrixWithAllocationPrice, + ReplacePricePriceNewPlanGroupedTieredPrice, +] + + +class ReplacePrice(TypedDict, total=False): + replaces_price_id: Required[str] + """The id of the price on the plan to replace in the plan.""" + + allocation_price: Optional[ReplacePriceAllocationPrice] + """The allocation price to add to the plan.""" + + plan_phase_order: Optional[int] + """The phase to replace this price from.""" + + price: Optional[ReplacePricePrice] + """The price to add to the plan""" diff --git a/src/orb/types/beta/external_plan_id_set_default_plan_version_params.py b/src/orb/types/beta/external_plan_id_set_default_plan_version_params.py new file mode 100644 index 00000000..cc9e85f5 --- /dev/null +++ b/src/orb/types/beta/external_plan_id_set_default_plan_version_params.py @@ -0,0 +1,12 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["ExternalPlanIDSetDefaultPlanVersionParams"] + + +class ExternalPlanIDSetDefaultPlanVersionParams(TypedDict, total=False): + version: Required[int] + """Plan version to set as the default.""" diff --git a/src/orb/types/beta_create_plan_version_params.py b/src/orb/types/beta_create_plan_version_params.py new file mode 100644 index 00000000..543e3097 --- /dev/null +++ b/src/orb/types/beta_create_plan_version_params.py @@ -0,0 +1,6668 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Dict, List, Union, Iterable, Optional +from typing_extensions import Literal, Required, TypeAlias, TypedDict + +__all__ = [ + "BetaCreatePlanVersionParams", + "AddAdjustment", + "AddAdjustmentAdjustment", + "AddAdjustmentAdjustmentNewPercentageDiscount", + "AddAdjustmentAdjustmentNewUsageDiscount", + "AddAdjustmentAdjustmentNewAmountDiscount", + "AddAdjustmentAdjustmentNewMinimum", + "AddAdjustmentAdjustmentNewMaximum", + "AddPrice", + "AddPriceAllocationPrice", + "AddPriceAllocationPriceCustomExpiration", + "AddPricePrice", + "AddPricePriceNewPlanUnitPrice", + "AddPricePriceNewPlanUnitPriceUnitConfig", + "AddPricePriceNewPlanUnitPriceBillingCycleConfiguration", + "AddPricePriceNewPlanUnitPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanUnitPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanPackagePrice", + "AddPricePriceNewPlanPackagePricePackageConfig", + "AddPricePriceNewPlanPackagePriceBillingCycleConfiguration", + "AddPricePriceNewPlanPackagePriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanPackagePriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanMatrixPrice", + "AddPricePriceNewPlanMatrixPriceMatrixConfig", + "AddPricePriceNewPlanMatrixPriceMatrixConfigMatrixValue", + "AddPricePriceNewPlanMatrixPriceBillingCycleConfiguration", + "AddPricePriceNewPlanMatrixPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanMatrixPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanTieredPrice", + "AddPricePriceNewPlanTieredPriceTieredConfig", + "AddPricePriceNewPlanTieredPriceTieredConfigTier", + "AddPricePriceNewPlanTieredPriceBillingCycleConfiguration", + "AddPricePriceNewPlanTieredPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanTieredPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanTieredBpsPrice", + "AddPricePriceNewPlanTieredBpsPriceTieredBpsConfig", + "AddPricePriceNewPlanTieredBpsPriceTieredBpsConfigTier", + "AddPricePriceNewPlanTieredBpsPriceBillingCycleConfiguration", + "AddPricePriceNewPlanTieredBpsPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanTieredBpsPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanBpsPrice", + "AddPricePriceNewPlanBpsPriceBpsConfig", + "AddPricePriceNewPlanBpsPriceBillingCycleConfiguration", + "AddPricePriceNewPlanBpsPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanBpsPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanBulkBpsPrice", + "AddPricePriceNewPlanBulkBpsPriceBulkBpsConfig", + "AddPricePriceNewPlanBulkBpsPriceBulkBpsConfigTier", + "AddPricePriceNewPlanBulkBpsPriceBillingCycleConfiguration", + "AddPricePriceNewPlanBulkBpsPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanBulkBpsPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanBulkPrice", + "AddPricePriceNewPlanBulkPriceBulkConfig", + "AddPricePriceNewPlanBulkPriceBulkConfigTier", + "AddPricePriceNewPlanBulkPriceBillingCycleConfiguration", + "AddPricePriceNewPlanBulkPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanBulkPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanThresholdTotalAmountPrice", + "AddPricePriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration", + "AddPricePriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanTieredPackagePrice", + "AddPricePriceNewPlanTieredPackagePriceBillingCycleConfiguration", + "AddPricePriceNewPlanTieredPackagePriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanTieredPackagePriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanTieredWithMinimumPrice", + "AddPricePriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration", + "AddPricePriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanUnitWithPercentPrice", + "AddPricePriceNewPlanUnitWithPercentPriceBillingCycleConfiguration", + "AddPricePriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanPackageWithAllocationPrice", + "AddPricePriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration", + "AddPricePriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanTierWithProrationPrice", + "AddPricePriceNewPlanTierWithProrationPriceBillingCycleConfiguration", + "AddPricePriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanUnitWithProrationPrice", + "AddPricePriceNewPlanUnitWithProrationPriceBillingCycleConfiguration", + "AddPricePriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanGroupedAllocationPrice", + "AddPricePriceNewPlanGroupedAllocationPriceBillingCycleConfiguration", + "AddPricePriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanGroupedWithProratedMinimumPrice", + "AddPricePriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration", + "AddPricePriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanGroupedWithMeteredMinimumPrice", + "AddPricePriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration", + "AddPricePriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanMatrixWithDisplayNamePrice", + "AddPricePriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration", + "AddPricePriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanBulkWithProrationPrice", + "AddPricePriceNewPlanBulkWithProrationPriceBillingCycleConfiguration", + "AddPricePriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanGroupedTieredPackagePrice", + "AddPricePriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration", + "AddPricePriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanMaxGroupTieredPackagePrice", + "AddPricePriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration", + "AddPricePriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanScalableMatrixWithUnitPricingPrice", + "AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration", + "AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanScalableMatrixWithTieredPricingPrice", + "AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration", + "AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanCumulativeGroupedBulkPrice", + "AddPricePriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration", + "AddPricePriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanTieredPackageWithMinimumPrice", + "AddPricePriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration", + "AddPricePriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanMatrixWithAllocationPrice", + "AddPricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig", + "AddPricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue", + "AddPricePriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration", + "AddPricePriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration", + "AddPricePriceNewPlanGroupedTieredPrice", + "AddPricePriceNewPlanGroupedTieredPriceBillingCycleConfiguration", + "AddPricePriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration", + "AddPricePriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration", + "RemoveAdjustment", + "RemovePrice", + "ReplaceAdjustment", + "ReplaceAdjustmentAdjustment", + "ReplaceAdjustmentAdjustmentNewPercentageDiscount", + "ReplaceAdjustmentAdjustmentNewUsageDiscount", + "ReplaceAdjustmentAdjustmentNewAmountDiscount", + "ReplaceAdjustmentAdjustmentNewMinimum", + "ReplaceAdjustmentAdjustmentNewMaximum", + "ReplacePrice", + "ReplacePriceAllocationPrice", + "ReplacePriceAllocationPriceCustomExpiration", + "ReplacePricePrice", + "ReplacePricePriceNewPlanUnitPrice", + "ReplacePricePriceNewPlanUnitPriceUnitConfig", + "ReplacePricePriceNewPlanUnitPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanUnitPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanUnitPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanPackagePrice", + "ReplacePricePriceNewPlanPackagePricePackageConfig", + "ReplacePricePriceNewPlanPackagePriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanPackagePriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanPackagePriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanMatrixPrice", + "ReplacePricePriceNewPlanMatrixPriceMatrixConfig", + "ReplacePricePriceNewPlanMatrixPriceMatrixConfigMatrixValue", + "ReplacePricePriceNewPlanMatrixPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanMatrixPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanMatrixPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanTieredPrice", + "ReplacePricePriceNewPlanTieredPriceTieredConfig", + "ReplacePricePriceNewPlanTieredPriceTieredConfigTier", + "ReplacePricePriceNewPlanTieredPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanTieredPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanTieredPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanTieredBpsPrice", + "ReplacePricePriceNewPlanTieredBpsPriceTieredBpsConfig", + "ReplacePricePriceNewPlanTieredBpsPriceTieredBpsConfigTier", + "ReplacePricePriceNewPlanTieredBpsPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanTieredBpsPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanTieredBpsPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanBpsPrice", + "ReplacePricePriceNewPlanBpsPriceBpsConfig", + "ReplacePricePriceNewPlanBpsPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanBpsPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanBpsPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanBulkBpsPrice", + "ReplacePricePriceNewPlanBulkBpsPriceBulkBpsConfig", + "ReplacePricePriceNewPlanBulkBpsPriceBulkBpsConfigTier", + "ReplacePricePriceNewPlanBulkBpsPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanBulkBpsPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanBulkBpsPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanBulkPrice", + "ReplacePricePriceNewPlanBulkPriceBulkConfig", + "ReplacePricePriceNewPlanBulkPriceBulkConfigTier", + "ReplacePricePriceNewPlanBulkPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanBulkPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanBulkPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanThresholdTotalAmountPrice", + "ReplacePricePriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanTieredPackagePrice", + "ReplacePricePriceNewPlanTieredPackagePriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanTieredPackagePriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanTieredPackagePriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanTieredWithMinimumPrice", + "ReplacePricePriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanUnitWithPercentPrice", + "ReplacePricePriceNewPlanUnitWithPercentPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanPackageWithAllocationPrice", + "ReplacePricePriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanTierWithProrationPrice", + "ReplacePricePriceNewPlanTierWithProrationPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanUnitWithProrationPrice", + "ReplacePricePriceNewPlanUnitWithProrationPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanGroupedAllocationPrice", + "ReplacePricePriceNewPlanGroupedAllocationPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanGroupedWithProratedMinimumPrice", + "ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanGroupedWithMeteredMinimumPrice", + "ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanMatrixWithDisplayNamePrice", + "ReplacePricePriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanBulkWithProrationPrice", + "ReplacePricePriceNewPlanBulkWithProrationPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanGroupedTieredPackagePrice", + "ReplacePricePriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanMaxGroupTieredPackagePrice", + "ReplacePricePriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPrice", + "ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPrice", + "ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanCumulativeGroupedBulkPrice", + "ReplacePricePriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanTieredPackageWithMinimumPrice", + "ReplacePricePriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanMatrixWithAllocationPrice", + "ReplacePricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig", + "ReplacePricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue", + "ReplacePricePriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewPlanGroupedTieredPrice", + "ReplacePricePriceNewPlanGroupedTieredPriceBillingCycleConfiguration", + "ReplacePricePriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration", +] + + +class BetaCreatePlanVersionParams(TypedDict, total=False): + version: Required[int] + """New version number.""" + + add_adjustments: Optional[Iterable[AddAdjustment]] + """Additional adjustments to be added to the plan.""" + + add_prices: Optional[Iterable[AddPrice]] + """Additional prices to be added to the plan.""" + + remove_adjustments: Optional[Iterable[RemoveAdjustment]] + """Adjustments to be removed from the plan.""" + + remove_prices: Optional[Iterable[RemovePrice]] + """Prices to be removed from the plan.""" + + replace_adjustments: Optional[Iterable[ReplaceAdjustment]] + """Adjustments to be replaced with additional adjustments on the plan.""" + + replace_prices: Optional[Iterable[ReplacePrice]] + """Prices to be replaced with additional prices on the plan.""" + + set_as_default: Optional[bool] + """Set this new plan version as the default""" + + +class AddAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False): + adjustment_type: Required[Literal["percentage_discount"]] + + percentage_discount: Required[float] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +class AddAdjustmentAdjustmentNewUsageDiscount(TypedDict, total=False): + adjustment_type: Required[Literal["usage_discount"]] + + usage_discount: Required[float] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +class AddAdjustmentAdjustmentNewAmountDiscount(TypedDict, total=False): + adjustment_type: Required[Literal["amount_discount"]] + + amount_discount: Required[str] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +class AddAdjustmentAdjustmentNewMinimum(TypedDict, total=False): + adjustment_type: Required[Literal["minimum"]] + + item_id: Required[str] + """The item ID that revenue from this minimum will be attributed to.""" + + minimum_amount: Required[str] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +class AddAdjustmentAdjustmentNewMaximum(TypedDict, total=False): + adjustment_type: Required[Literal["maximum"]] + + maximum_amount: Required[str] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +AddAdjustmentAdjustment: TypeAlias = Union[ + AddAdjustmentAdjustmentNewPercentageDiscount, + AddAdjustmentAdjustmentNewUsageDiscount, + AddAdjustmentAdjustmentNewAmountDiscount, + AddAdjustmentAdjustmentNewMinimum, + AddAdjustmentAdjustmentNewMaximum, +] + + +class AddAdjustment(TypedDict, total=False): + adjustment: Required[AddAdjustmentAdjustment] + """The definition of a new adjustment to create and add to the plan.""" + + plan_phase_order: Optional[int] + """The phase to add this adjustment to.""" + + +class AddPriceAllocationPriceCustomExpiration(TypedDict, total=False): + duration: Required[int] + + duration_unit: Required[Literal["day", "month"]] + + +class AddPriceAllocationPrice(TypedDict, total=False): + amount: Required[str] + """An amount of the currency to allocate to the customer at the specified cadence.""" + + cadence: Required[Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]] + """The cadence at which to allocate the amount to the customer.""" + + currency: Required[str] + """ + An ISO 4217 currency string or a custom pricing unit identifier in which to bill + this price. + """ + + custom_expiration: Optional[AddPriceAllocationPriceCustomExpiration] + """The custom expiration for the allocation.""" + + expires_at_end_of_cadence: Optional[bool] + """ + Whether the allocated amount should expire at the end of the cadence or roll + over to the next period. Set to null if using custom_expiration. + """ + + +class AddPricePriceNewPlanUnitPriceUnitConfig(TypedDict, total=False): + unit_amount: Required[str] + """Rate per unit of usage""" + + +class AddPricePriceNewPlanUnitPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanUnitPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanUnitPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanUnitPrice(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["unit"]] + + name: Required[str] + """The name of the price.""" + + unit_config: Required[AddPricePriceNewPlanUnitPriceUnitConfig] + + 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[AddPricePriceNewPlanUnitPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanUnitPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanUnitPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanPackagePricePackageConfig(TypedDict, total=False): + package_amount: Required[str] + """A currency amount to rate usage by""" + + package_size: Required[int] + """An integer amount to represent package size. + + For example, 1000 here would divide usage by 1000 before multiplying by + package_amount in rating + """ + + +class AddPricePriceNewPlanPackagePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanPackagePrice(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["package"]] + + name: Required[str] + """The name of the price.""" + + package_config: Required[AddPricePriceNewPlanPackagePricePackageConfig] + + 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[AddPricePriceNewPlanPackagePriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanPackagePriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanPackagePriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanMatrixPriceMatrixConfigMatrixValue(TypedDict, total=False): + dimension_values: Required[List[Optional[str]]] + """One or two matrix keys to filter usage to this Matrix value by. + + For example, ["region", "tier"] could be used to filter cloud usage by a cloud + region and an instance tier. + """ + + unit_amount: Required[str] + """Unit price for the specified dimension_values""" + + +class AddPricePriceNewPlanMatrixPriceMatrixConfig(TypedDict, total=False): + default_unit_amount: Required[str] + """Default per unit rate for any usage not bucketed into a specified matrix_value""" + + dimensions: Required[List[Optional[str]]] + """One or two event property values to evaluate matrix groups by""" + + matrix_values: Required[Iterable[AddPricePriceNewPlanMatrixPriceMatrixConfigMatrixValue]] + """Matrix values for specified matrix grouping keys""" + + +class AddPricePriceNewPlanMatrixPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanMatrixPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanMatrixPrice(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.""" + + matrix_config: Required[AddPricePriceNewPlanMatrixPriceMatrixConfig] + + model_type: Required[Literal["matrix"]] + + 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[AddPricePriceNewPlanMatrixPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanMatrixPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanMatrixPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanTieredPriceTieredConfigTier(TypedDict, total=False): + first_unit: Required[float] + """Exclusive tier starting value""" + + unit_amount: Required[str] + """Amount per unit""" + + last_unit: Optional[float] + """Inclusive tier ending value. If null, this is treated as the last tier""" + + +class AddPricePriceNewPlanTieredPriceTieredConfig(TypedDict, total=False): + tiers: Required[Iterable[AddPricePriceNewPlanTieredPriceTieredConfigTier]] + """Tiers for rating based on total usage quantities into the specified tier""" + + +class AddPricePriceNewPlanTieredPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanTieredPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanTieredPrice(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"]] + + name: Required[str] + """The name of the price.""" + + tiered_config: Required[AddPricePriceNewPlanTieredPriceTieredConfig] + + 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[AddPricePriceNewPlanTieredPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanTieredPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanTieredPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanTieredBpsPriceTieredBpsConfigTier(TypedDict, total=False): + bps: Required[float] + """Per-event basis point rate""" + + minimum_amount: Required[str] + """Exclusive tier starting value""" + + maximum_amount: Optional[str] + """Inclusive tier ending value""" + + per_unit_maximum: Optional[str] + """Per unit maximum to charge""" + + +class AddPricePriceNewPlanTieredBpsPriceTieredBpsConfig(TypedDict, total=False): + tiers: Required[Iterable[AddPricePriceNewPlanTieredBpsPriceTieredBpsConfigTier]] + """ + Tiers for a Graduated BPS pricing model, where usage is bucketed into specified + tiers + """ + + +class AddPricePriceNewPlanTieredBpsPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanTieredBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanTieredBpsPrice(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_bps"]] + + name: Required[str] + """The name of the price.""" + + tiered_bps_config: Required[AddPricePriceNewPlanTieredBpsPriceTieredBpsConfig] + + 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[AddPricePriceNewPlanTieredBpsPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanTieredBpsPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanTieredBpsPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanBpsPriceBpsConfig(TypedDict, total=False): + bps: Required[float] + """Basis point take rate per event""" + + per_unit_maximum: Optional[str] + """Optional currency amount maximum to cap spend per event""" + + +class AddPricePriceNewPlanBpsPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanBpsPrice(TypedDict, total=False): + bps_config: Required[AddPricePriceNewPlanBpsPriceBpsConfig] + + 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["bps"]] + + 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[AddPricePriceNewPlanBpsPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanBpsPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanBpsPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanBulkBpsPriceBulkBpsConfigTier(TypedDict, total=False): + bps: Required[float] + """Basis points to rate on""" + + maximum_amount: Optional[str] + """Upper bound for tier""" + + per_unit_maximum: Optional[str] + """The maximum amount to charge for any one event""" + + +class AddPricePriceNewPlanBulkBpsPriceBulkBpsConfig(TypedDict, total=False): + tiers: Required[Iterable[AddPricePriceNewPlanBulkBpsPriceBulkBpsConfigTier]] + """ + Tiers for a bulk BPS pricing model where all usage is aggregated to a single + tier based on total volume + """ + + +class AddPricePriceNewPlanBulkBpsPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanBulkBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanBulkBpsPrice(TypedDict, total=False): + bulk_bps_config: Required[AddPricePriceNewPlanBulkBpsPriceBulkBpsConfig] + + 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_bps"]] + + 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[AddPricePriceNewPlanBulkBpsPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanBulkBpsPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanBulkBpsPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanBulkPriceBulkConfigTier(TypedDict, total=False): + unit_amount: Required[str] + """Amount per unit""" + + maximum_units: Optional[float] + """Upper bound for this tier""" + + +class AddPricePriceNewPlanBulkPriceBulkConfig(TypedDict, total=False): + tiers: Required[Iterable[AddPricePriceNewPlanBulkPriceBulkConfigTier]] + """Bulk tiers for rating based on total usage volume""" + + +class AddPricePriceNewPlanBulkPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanBulkPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanBulkPrice(TypedDict, total=False): + bulk_config: Required[AddPricePriceNewPlanBulkPriceBulkConfig] + + 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"]] + + 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[AddPricePriceNewPlanBulkPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanBulkPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanBulkPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanThresholdTotalAmountPrice(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["threshold_total_amount"]] + + name: Required[str] + """The name of the price.""" + + threshold_total_amount_config: Required[Dict[str, object]] + + 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[AddPricePriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration + ] + """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[AddPricePriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanTieredPackagePrice(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_package"]] + + name: Required[str] + """The name of the price.""" + + tiered_package_config: Required[Dict[str, object]] + + 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[AddPricePriceNewPlanTieredPackagePriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanTieredPackagePriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanTieredPackagePriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanTieredWithMinimumPrice(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_minimum"]] + + name: Required[str] + """The name of the price.""" + + tiered_with_minimum_config: Required[Dict[str, object]] + + 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[AddPricePriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanUnitWithPercentPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanUnitWithPercentPrice(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["unit_with_percent"]] + + name: Required[str] + """The name of the price.""" + + unit_with_percent_config: Required[Dict[str, object]] + + 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[AddPricePriceNewPlanUnitWithPercentPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanPackageWithAllocationPrice(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["package_with_allocation"]] + + name: Required[str] + """The name of the price.""" + + package_with_allocation_config: Required[Dict[str, object]] + + 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[AddPricePriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration + ] + """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[AddPricePriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanTierWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanTierWithProrationPrice(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"]] + + name: Required[str] + """The name of the price.""" + + tiered_with_proration_config: Required[Dict[str, object]] + + 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[AddPricePriceNewPlanTierWithProrationPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanUnitWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanUnitWithProrationPrice(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["unit_with_proration"]] + + name: Required[str] + """The name of the price.""" + + unit_with_proration_config: Required[Dict[str, object]] + + 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[AddPricePriceNewPlanUnitWithProrationPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanGroupedAllocationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanGroupedAllocationPrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_allocation"]] + + 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[AddPricePriceNewPlanGroupedAllocationPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanGroupedWithProratedMinimumPrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_with_prorated_minimum"]] + + 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[AddPricePriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration + ] + """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[ + AddPricePriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanGroupedWithMeteredMinimumPrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_with_metered_minimum"]] + + 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[AddPricePriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration + ] + """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[ + AddPricePriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanMatrixWithDisplayNamePrice(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.""" + + matrix_with_display_name_config: Required[Dict[str, object]] + + model_type: Required[Literal["matrix_with_display_name"]] + + 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[AddPricePriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration + ] + """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[AddPricePriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanBulkWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanBulkWithProrationPrice(TypedDict, total=False): + bulk_with_proration_config: Required[Dict[str, object]] + + 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_proration"]] + + 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[AddPricePriceNewPlanBulkWithProrationPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanGroupedTieredPackagePrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_tiered_package"]] + + 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[AddPricePriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration + ] + """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[AddPricePriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanMaxGroupTieredPackagePrice(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.""" + + max_group_tiered_package_config: Required[Dict[str, object]] + + model_type: Required[Literal["max_group_tiered_package"]] + + 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[AddPricePriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration + ] + """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[AddPricePriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanScalableMatrixWithUnitPricingPrice(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["scalable_matrix_with_unit_pricing"]] + + name: Required[str] + """The name of the price.""" + + scalable_matrix_with_unit_pricing_config: Required[Dict[str, object]] + + 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[ + AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration + ] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration + ] + """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[ + AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanScalableMatrixWithTieredPricingPrice(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["scalable_matrix_with_tiered_pricing"]] + + name: Required[str] + """The name of the price.""" + + scalable_matrix_with_tiered_pricing_config: Required[Dict[str, object]] + + 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[ + AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration + ] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration + ] + """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[ + AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanCumulativeGroupedBulkPrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["cumulative_grouped_bulk"]] + + 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[AddPricePriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration + ] + """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[AddPricePriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanTieredPackageWithMinimumPrice(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_package_with_minimum"]] + + name: Required[str] + """The name of the price.""" + + tiered_package_with_minimum_config: Required[Dict[str, object]] + + 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[AddPricePriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration + ] + """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[ + AddPricePriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue(TypedDict, total=False): + dimension_values: Required[List[Optional[str]]] + """One or two matrix keys to filter usage to this Matrix value by. + + For example, ["region", "tier"] could be used to filter cloud usage by a cloud + region and an instance tier. + """ + + unit_amount: Required[str] + """Unit price for the specified dimension_values""" + + +class AddPricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig(TypedDict, total=False): + allocation: Required[float] + """Allocation to be used to calculate the price""" + + default_unit_amount: Required[str] + """Default per unit rate for any usage not bucketed into a specified matrix_value""" + + dimensions: Required[List[Optional[str]]] + """One or two event property values to evaluate matrix groups by""" + + matrix_values: Required[ + Iterable[AddPricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue] + ] + """Matrix values for specified matrix grouping keys""" + + +class AddPricePriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanMatrixWithAllocationPrice(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.""" + + matrix_with_allocation_config: Required[AddPricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig] + + model_type: Required[Literal["matrix_with_allocation"]] + + 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[AddPricePriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration + ] + """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[AddPricePriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class AddPricePriceNewPlanGroupedTieredPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewPlanGroupedTieredPrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_tiered"]] + + 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[AddPricePriceNewPlanGroupedTieredPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[AddPricePriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration] + """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[AddPricePriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +AddPricePrice: TypeAlias = Union[ + AddPricePriceNewPlanUnitPrice, + AddPricePriceNewPlanPackagePrice, + AddPricePriceNewPlanMatrixPrice, + AddPricePriceNewPlanTieredPrice, + AddPricePriceNewPlanTieredBpsPrice, + AddPricePriceNewPlanBpsPrice, + AddPricePriceNewPlanBulkBpsPrice, + AddPricePriceNewPlanBulkPrice, + AddPricePriceNewPlanThresholdTotalAmountPrice, + AddPricePriceNewPlanTieredPackagePrice, + AddPricePriceNewPlanTieredWithMinimumPrice, + AddPricePriceNewPlanUnitWithPercentPrice, + AddPricePriceNewPlanPackageWithAllocationPrice, + AddPricePriceNewPlanTierWithProrationPrice, + AddPricePriceNewPlanUnitWithProrationPrice, + AddPricePriceNewPlanGroupedAllocationPrice, + AddPricePriceNewPlanGroupedWithProratedMinimumPrice, + AddPricePriceNewPlanGroupedWithMeteredMinimumPrice, + AddPricePriceNewPlanMatrixWithDisplayNamePrice, + AddPricePriceNewPlanBulkWithProrationPrice, + AddPricePriceNewPlanGroupedTieredPackagePrice, + AddPricePriceNewPlanMaxGroupTieredPackagePrice, + AddPricePriceNewPlanScalableMatrixWithUnitPricingPrice, + AddPricePriceNewPlanScalableMatrixWithTieredPricingPrice, + AddPricePriceNewPlanCumulativeGroupedBulkPrice, + AddPricePriceNewPlanTieredPackageWithMinimumPrice, + AddPricePriceNewPlanMatrixWithAllocationPrice, + AddPricePriceNewPlanGroupedTieredPrice, +] + + +class AddPrice(TypedDict, total=False): + allocation_price: Optional[AddPriceAllocationPrice] + """The allocation price to add to the plan.""" + + plan_phase_order: Optional[int] + """The phase to add this price to.""" + + price: Optional[AddPricePrice] + """The price to add to the plan""" + + +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.""" + + +class ReplaceAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False): + adjustment_type: Required[Literal["percentage_discount"]] + + percentage_discount: Required[float] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +class ReplaceAdjustmentAdjustmentNewUsageDiscount(TypedDict, total=False): + adjustment_type: Required[Literal["usage_discount"]] + + usage_discount: Required[float] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +class ReplaceAdjustmentAdjustmentNewAmountDiscount(TypedDict, total=False): + adjustment_type: Required[Literal["amount_discount"]] + + amount_discount: Required[str] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +class ReplaceAdjustmentAdjustmentNewMinimum(TypedDict, total=False): + adjustment_type: Required[Literal["minimum"]] + + item_id: Required[str] + """The item ID that revenue from this minimum will be attributed to.""" + + minimum_amount: Required[str] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +class ReplaceAdjustmentAdjustmentNewMaximum(TypedDict, total=False): + adjustment_type: Required[Literal["maximum"]] + + maximum_amount: Required[str] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +ReplaceAdjustmentAdjustment: TypeAlias = Union[ + ReplaceAdjustmentAdjustmentNewPercentageDiscount, + ReplaceAdjustmentAdjustmentNewUsageDiscount, + ReplaceAdjustmentAdjustmentNewAmountDiscount, + ReplaceAdjustmentAdjustmentNewMinimum, + ReplaceAdjustmentAdjustmentNewMaximum, +] + + +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 ReplacePriceAllocationPriceCustomExpiration(TypedDict, total=False): + duration: Required[int] + + duration_unit: Required[Literal["day", "month"]] + + +class ReplacePriceAllocationPrice(TypedDict, total=False): + amount: Required[str] + """An amount of the currency to allocate to the customer at the specified cadence.""" + + cadence: Required[Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]] + """The cadence at which to allocate the amount to the customer.""" + + currency: Required[str] + """ + An ISO 4217 currency string or a custom pricing unit identifier in which to bill + this price. + """ + + custom_expiration: Optional[ReplacePriceAllocationPriceCustomExpiration] + """The custom expiration for the allocation.""" + + expires_at_end_of_cadence: Optional[bool] + """ + Whether the allocated amount should expire at the end of the cadence or roll + over to the next period. Set to null if using custom_expiration. + """ + + +class ReplacePricePriceNewPlanUnitPriceUnitConfig(TypedDict, total=False): + unit_amount: Required[str] + """Rate per unit of usage""" + + +class ReplacePricePriceNewPlanUnitPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanUnitPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanUnitPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanUnitPrice(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["unit"]] + + name: Required[str] + """The name of the price.""" + + unit_config: Required[ReplacePricePriceNewPlanUnitPriceUnitConfig] + + 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[ReplacePricePriceNewPlanUnitPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ReplacePricePriceNewPlanUnitPriceDimensionalPriceConfiguration] + """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[ReplacePricePriceNewPlanUnitPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanPackagePricePackageConfig(TypedDict, total=False): + package_amount: Required[str] + """A currency amount to rate usage by""" + + package_size: Required[int] + """An integer amount to represent package size. + + For example, 1000 here would divide usage by 1000 before multiplying by + package_amount in rating + """ + + +class ReplacePricePriceNewPlanPackagePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanPackagePrice(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["package"]] + + name: Required[str] + """The name of the price.""" + + package_config: Required[ReplacePricePriceNewPlanPackagePricePackageConfig] + + 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[ReplacePricePriceNewPlanPackagePriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ReplacePricePriceNewPlanPackagePriceDimensionalPriceConfiguration] + """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[ReplacePricePriceNewPlanPackagePriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanMatrixPriceMatrixConfigMatrixValue(TypedDict, total=False): + dimension_values: Required[List[Optional[str]]] + """One or two matrix keys to filter usage to this Matrix value by. + + For example, ["region", "tier"] could be used to filter cloud usage by a cloud + region and an instance tier. + """ + + unit_amount: Required[str] + """Unit price for the specified dimension_values""" + + +class ReplacePricePriceNewPlanMatrixPriceMatrixConfig(TypedDict, total=False): + default_unit_amount: Required[str] + """Default per unit rate for any usage not bucketed into a specified matrix_value""" + + dimensions: Required[List[Optional[str]]] + """One or two event property values to evaluate matrix groups by""" + + matrix_values: Required[Iterable[ReplacePricePriceNewPlanMatrixPriceMatrixConfigMatrixValue]] + """Matrix values for specified matrix grouping keys""" + + +class ReplacePricePriceNewPlanMatrixPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanMatrixPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanMatrixPrice(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.""" + + matrix_config: Required[ReplacePricePriceNewPlanMatrixPriceMatrixConfig] + + model_type: Required[Literal["matrix"]] + + 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[ReplacePricePriceNewPlanMatrixPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ReplacePricePriceNewPlanMatrixPriceDimensionalPriceConfiguration] + """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[ReplacePricePriceNewPlanMatrixPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanTieredPriceTieredConfigTier(TypedDict, total=False): + first_unit: Required[float] + """Exclusive tier starting value""" + + unit_amount: Required[str] + """Amount per unit""" + + last_unit: Optional[float] + """Inclusive tier ending value. If null, this is treated as the last tier""" + + +class ReplacePricePriceNewPlanTieredPriceTieredConfig(TypedDict, total=False): + tiers: Required[Iterable[ReplacePricePriceNewPlanTieredPriceTieredConfigTier]] + """Tiers for rating based on total usage quantities into the specified tier""" + + +class ReplacePricePriceNewPlanTieredPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanTieredPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanTieredPrice(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"]] + + name: Required[str] + """The name of the price.""" + + tiered_config: Required[ReplacePricePriceNewPlanTieredPriceTieredConfig] + + 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[ReplacePricePriceNewPlanTieredPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ReplacePricePriceNewPlanTieredPriceDimensionalPriceConfiguration] + """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[ReplacePricePriceNewPlanTieredPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanTieredBpsPriceTieredBpsConfigTier(TypedDict, total=False): + bps: Required[float] + """Per-event basis point rate""" + + minimum_amount: Required[str] + """Exclusive tier starting value""" + + maximum_amount: Optional[str] + """Inclusive tier ending value""" + + per_unit_maximum: Optional[str] + """Per unit maximum to charge""" + + +class ReplacePricePriceNewPlanTieredBpsPriceTieredBpsConfig(TypedDict, total=False): + tiers: Required[Iterable[ReplacePricePriceNewPlanTieredBpsPriceTieredBpsConfigTier]] + """ + Tiers for a Graduated BPS pricing model, where usage is bucketed into specified + tiers + """ + + +class ReplacePricePriceNewPlanTieredBpsPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanTieredBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanTieredBpsPrice(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_bps"]] + + name: Required[str] + """The name of the price.""" + + tiered_bps_config: Required[ReplacePricePriceNewPlanTieredBpsPriceTieredBpsConfig] + + 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[ReplacePricePriceNewPlanTieredBpsPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ReplacePricePriceNewPlanTieredBpsPriceDimensionalPriceConfiguration] + """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[ReplacePricePriceNewPlanTieredBpsPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanBpsPriceBpsConfig(TypedDict, total=False): + bps: Required[float] + """Basis point take rate per event""" + + per_unit_maximum: Optional[str] + """Optional currency amount maximum to cap spend per event""" + + +class ReplacePricePriceNewPlanBpsPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanBpsPrice(TypedDict, total=False): + bps_config: Required[ReplacePricePriceNewPlanBpsPriceBpsConfig] + + 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["bps"]] + + 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[ReplacePricePriceNewPlanBpsPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ReplacePricePriceNewPlanBpsPriceDimensionalPriceConfiguration] + """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[ReplacePricePriceNewPlanBpsPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanBulkBpsPriceBulkBpsConfigTier(TypedDict, total=False): + bps: Required[float] + """Basis points to rate on""" + + maximum_amount: Optional[str] + """Upper bound for tier""" + + per_unit_maximum: Optional[str] + """The maximum amount to charge for any one event""" + + +class ReplacePricePriceNewPlanBulkBpsPriceBulkBpsConfig(TypedDict, total=False): + tiers: Required[Iterable[ReplacePricePriceNewPlanBulkBpsPriceBulkBpsConfigTier]] + """ + Tiers for a bulk BPS pricing model where all usage is aggregated to a single + tier based on total volume + """ + + +class ReplacePricePriceNewPlanBulkBpsPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanBulkBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanBulkBpsPrice(TypedDict, total=False): + bulk_bps_config: Required[ReplacePricePriceNewPlanBulkBpsPriceBulkBpsConfig] + + 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_bps"]] + + 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[ReplacePricePriceNewPlanBulkBpsPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ReplacePricePriceNewPlanBulkBpsPriceDimensionalPriceConfiguration] + """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[ReplacePricePriceNewPlanBulkBpsPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanBulkPriceBulkConfigTier(TypedDict, total=False): + unit_amount: Required[str] + """Amount per unit""" + + maximum_units: Optional[float] + """Upper bound for this tier""" + + +class ReplacePricePriceNewPlanBulkPriceBulkConfig(TypedDict, total=False): + tiers: Required[Iterable[ReplacePricePriceNewPlanBulkPriceBulkConfigTier]] + """Bulk tiers for rating based on total usage volume""" + + +class ReplacePricePriceNewPlanBulkPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanBulkPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanBulkPrice(TypedDict, total=False): + bulk_config: Required[ReplacePricePriceNewPlanBulkPriceBulkConfig] + + 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"]] + + 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[ReplacePricePriceNewPlanBulkPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ReplacePricePriceNewPlanBulkPriceDimensionalPriceConfiguration] + """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[ReplacePricePriceNewPlanBulkPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanThresholdTotalAmountPrice(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["threshold_total_amount"]] + + name: Required[str] + """The name of the price.""" + + threshold_total_amount_config: Required[Dict[str, object]] + + 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[ReplacePricePriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration + ] + """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[ + ReplacePricePriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanTieredPackagePrice(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_package"]] + + name: Required[str] + """The name of the price.""" + + tiered_package_config: Required[Dict[str, object]] + + 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[ReplacePricePriceNewPlanTieredPackagePriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ReplacePricePriceNewPlanTieredPackagePriceDimensionalPriceConfiguration] + """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[ReplacePricePriceNewPlanTieredPackagePriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanTieredWithMinimumPrice(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_minimum"]] + + name: Required[str] + """The name of the price.""" + + tiered_with_minimum_config: Required[Dict[str, object]] + + 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[ReplacePricePriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration + ] + """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[ReplacePricePriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanUnitWithPercentPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanUnitWithPercentPrice(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["unit_with_percent"]] + + name: Required[str] + """The name of the price.""" + + unit_with_percent_config: Required[Dict[str, object]] + + 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[ReplacePricePriceNewPlanUnitWithPercentPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ReplacePricePriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration] + """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[ReplacePricePriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanPackageWithAllocationPrice(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["package_with_allocation"]] + + name: Required[str] + """The name of the price.""" + + package_with_allocation_config: Required[Dict[str, object]] + + 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[ReplacePricePriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration + ] + """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[ + ReplacePricePriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanTierWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanTierWithProrationPrice(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"]] + + name: Required[str] + """The name of the price.""" + + tiered_with_proration_config: Required[Dict[str, object]] + + 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[ReplacePricePriceNewPlanTierWithProrationPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration + ] + """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[ReplacePricePriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanUnitWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanUnitWithProrationPrice(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["unit_with_proration"]] + + name: Required[str] + """The name of the price.""" + + unit_with_proration_config: Required[Dict[str, object]] + + 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[ReplacePricePriceNewPlanUnitWithProrationPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration + ] + """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[ReplacePricePriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanGroupedAllocationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanGroupedAllocationPrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_allocation"]] + + 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[ReplacePricePriceNewPlanGroupedAllocationPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration + ] + """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[ReplacePricePriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanGroupedWithProratedMinimumPrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_with_prorated_minimum"]] + + 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[ + ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration + ] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration + ] + """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[ + ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanGroupedWithMeteredMinimumPrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_with_metered_minimum"]] + + 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[ + ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration + ] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration + ] + """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[ + ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanMatrixWithDisplayNamePrice(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.""" + + matrix_with_display_name_config: Required[Dict[str, object]] + + model_type: Required[Literal["matrix_with_display_name"]] + + 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[ReplacePricePriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration + ] + """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[ + ReplacePricePriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanBulkWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanBulkWithProrationPrice(TypedDict, total=False): + bulk_with_proration_config: Required[Dict[str, object]] + + 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_proration"]] + + 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[ReplacePricePriceNewPlanBulkWithProrationPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration + ] + """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[ReplacePricePriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanGroupedTieredPackagePrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_tiered_package"]] + + 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[ReplacePricePriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration + ] + """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[ + ReplacePricePriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanMaxGroupTieredPackagePrice(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.""" + + max_group_tiered_package_config: Required[Dict[str, object]] + + model_type: Required[Literal["max_group_tiered_package"]] + + 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[ReplacePricePriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration + ] + """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[ + ReplacePricePriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPrice(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["scalable_matrix_with_unit_pricing"]] + + name: Required[str] + """The name of the price.""" + + scalable_matrix_with_unit_pricing_config: Required[Dict[str, object]] + + 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[ + ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration + ] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration + ] + """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[ + ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPrice(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["scalable_matrix_with_tiered_pricing"]] + + name: Required[str] + """The name of the price.""" + + scalable_matrix_with_tiered_pricing_config: Required[Dict[str, object]] + + 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[ + ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration + ] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration + ] + """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[ + ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanCumulativeGroupedBulkPrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["cumulative_grouped_bulk"]] + + 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[ReplacePricePriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration + ] + """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[ + ReplacePricePriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanTieredPackageWithMinimumPrice(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_package_with_minimum"]] + + name: Required[str] + """The name of the price.""" + + tiered_package_with_minimum_config: Required[Dict[str, object]] + + 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[ + ReplacePricePriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration + ] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration + ] + """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[ + ReplacePricePriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue(TypedDict, total=False): + dimension_values: Required[List[Optional[str]]] + """One or two matrix keys to filter usage to this Matrix value by. + + For example, ["region", "tier"] could be used to filter cloud usage by a cloud + region and an instance tier. + """ + + unit_amount: Required[str] + """Unit price for the specified dimension_values""" + + +class ReplacePricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig(TypedDict, total=False): + allocation: Required[float] + """Allocation to be used to calculate the price""" + + default_unit_amount: Required[str] + """Default per unit rate for any usage not bucketed into a specified matrix_value""" + + dimensions: Required[List[Optional[str]]] + """One or two event property values to evaluate matrix groups by""" + + matrix_values: Required[ + Iterable[ReplacePricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue] + ] + """Matrix values for specified matrix grouping keys""" + + +class ReplacePricePriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanMatrixWithAllocationPrice(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.""" + + matrix_with_allocation_config: Required[ReplacePricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig] + + model_type: Required[Literal["matrix_with_allocation"]] + + 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[ReplacePricePriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + ReplacePricePriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration + ] + """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[ + ReplacePricePriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class ReplacePricePriceNewPlanGroupedTieredPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewPlanGroupedTieredPrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_tiered"]] + + 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[ReplacePricePriceNewPlanGroupedTieredPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ReplacePricePriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration] + """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[ReplacePricePriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +ReplacePricePrice: TypeAlias = Union[ + ReplacePricePriceNewPlanUnitPrice, + ReplacePricePriceNewPlanPackagePrice, + ReplacePricePriceNewPlanMatrixPrice, + ReplacePricePriceNewPlanTieredPrice, + ReplacePricePriceNewPlanTieredBpsPrice, + ReplacePricePriceNewPlanBpsPrice, + ReplacePricePriceNewPlanBulkBpsPrice, + ReplacePricePriceNewPlanBulkPrice, + ReplacePricePriceNewPlanThresholdTotalAmountPrice, + ReplacePricePriceNewPlanTieredPackagePrice, + ReplacePricePriceNewPlanTieredWithMinimumPrice, + ReplacePricePriceNewPlanUnitWithPercentPrice, + ReplacePricePriceNewPlanPackageWithAllocationPrice, + ReplacePricePriceNewPlanTierWithProrationPrice, + ReplacePricePriceNewPlanUnitWithProrationPrice, + ReplacePricePriceNewPlanGroupedAllocationPrice, + ReplacePricePriceNewPlanGroupedWithProratedMinimumPrice, + ReplacePricePriceNewPlanGroupedWithMeteredMinimumPrice, + ReplacePricePriceNewPlanMatrixWithDisplayNamePrice, + ReplacePricePriceNewPlanBulkWithProrationPrice, + ReplacePricePriceNewPlanGroupedTieredPackagePrice, + ReplacePricePriceNewPlanMaxGroupTieredPackagePrice, + ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPrice, + ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPrice, + ReplacePricePriceNewPlanCumulativeGroupedBulkPrice, + ReplacePricePriceNewPlanTieredPackageWithMinimumPrice, + ReplacePricePriceNewPlanMatrixWithAllocationPrice, + ReplacePricePriceNewPlanGroupedTieredPrice, +] + + +class ReplacePrice(TypedDict, total=False): + replaces_price_id: Required[str] + """The id of the price on the plan to replace in the plan.""" + + allocation_price: Optional[ReplacePriceAllocationPrice] + """The allocation price to add to the plan.""" + + plan_phase_order: Optional[int] + """The phase to replace this price from.""" + + price: Optional[ReplacePricePrice] + """The price to add to the plan""" diff --git a/src/orb/types/beta_set_default_plan_version_params.py b/src/orb/types/beta_set_default_plan_version_params.py new file mode 100644 index 00000000..d9c61c7e --- /dev/null +++ b/src/orb/types/beta_set_default_plan_version_params.py @@ -0,0 +1,12 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["BetaSetDefaultPlanVersionParams"] + + +class BetaSetDefaultPlanVersionParams(TypedDict, total=False): + version: Required[int] + """Plan version to set as the default.""" diff --git a/src/orb/types/credit_note_create_params.py b/src/orb/types/credit_note_create_params.py index ded73543..0b6c04dd 100644 --- a/src/orb/types/credit_note_create_params.py +++ b/src/orb/types/credit_note_create_params.py @@ -11,12 +11,12 @@ class CreditNoteCreateParams(TypedDict, total=False): line_items: Required[Iterable[LineItem]] + reason: Required[Literal["duplicate", "fraudulent", "order_change", "product_unsatisfactory"]] + """An optional reason for the credit note.""" + memo: Optional[str] """An optional memo to attach to the credit note.""" - reason: Optional[Literal["duplicate", "fraudulent", "order_change", "product_unsatisfactory"]] - """An optional reason for the credit note.""" - class LineItem(TypedDict, total=False): amount: Required[str] diff --git a/src/orb/types/customer_create_params.py b/src/orb/types/customer_create_params.py index 7e1c1732..a7adb132 100644 --- a/src/orb/types/customer_create_params.py +++ b/src/orb/types/customer_create_params.py @@ -16,6 +16,7 @@ "TaxConfiguration", "TaxConfigurationNewAvalaraTaxConfiguration", "TaxConfigurationNewTaxJarConfiguration", + "TaxConfigurationNewSphereConfiguration", "TaxID", ] @@ -281,7 +282,17 @@ class TaxConfigurationNewTaxJarConfiguration(TypedDict, total=False): tax_provider: Required[Literal["taxjar"]] -TaxConfiguration: TypeAlias = Union[TaxConfigurationNewAvalaraTaxConfiguration, TaxConfigurationNewTaxJarConfiguration] +class TaxConfigurationNewSphereConfiguration(TypedDict, total=False): + tax_exempt: Required[bool] + + tax_provider: Required[Literal["sphere"]] + + +TaxConfiguration: TypeAlias = Union[ + TaxConfigurationNewAvalaraTaxConfiguration, + TaxConfigurationNewTaxJarConfiguration, + TaxConfigurationNewSphereConfiguration, +] class TaxID(TypedDict, total=False): 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 cb1dfd2d..b4f795ae 100644 --- a/src/orb/types/customer_update_by_external_id_params.py +++ b/src/orb/types/customer_update_by_external_id_params.py @@ -16,6 +16,7 @@ "TaxConfiguration", "TaxConfigurationNewAvalaraTaxConfiguration", "TaxConfigurationNewTaxJarConfiguration", + "TaxConfigurationNewSphereConfiguration", "TaxID", ] @@ -274,7 +275,17 @@ class TaxConfigurationNewTaxJarConfiguration(TypedDict, total=False): tax_provider: Required[Literal["taxjar"]] -TaxConfiguration: TypeAlias = Union[TaxConfigurationNewAvalaraTaxConfiguration, TaxConfigurationNewTaxJarConfiguration] +class TaxConfigurationNewSphereConfiguration(TypedDict, total=False): + tax_exempt: Required[bool] + + tax_provider: Required[Literal["sphere"]] + + +TaxConfiguration: TypeAlias = Union[ + TaxConfigurationNewAvalaraTaxConfiguration, + TaxConfigurationNewTaxJarConfiguration, + TaxConfigurationNewSphereConfiguration, +] class TaxID(TypedDict, total=False): diff --git a/src/orb/types/customer_update_params.py b/src/orb/types/customer_update_params.py index 886737d6..18d0fc8f 100644 --- a/src/orb/types/customer_update_params.py +++ b/src/orb/types/customer_update_params.py @@ -16,6 +16,7 @@ "TaxConfiguration", "TaxConfigurationNewAvalaraTaxConfiguration", "TaxConfigurationNewTaxJarConfiguration", + "TaxConfigurationNewSphereConfiguration", "TaxID", ] @@ -274,7 +275,17 @@ class TaxConfigurationNewTaxJarConfiguration(TypedDict, total=False): tax_provider: Required[Literal["taxjar"]] -TaxConfiguration: TypeAlias = Union[TaxConfigurationNewAvalaraTaxConfiguration, TaxConfigurationNewTaxJarConfiguration] +class TaxConfigurationNewSphereConfiguration(TypedDict, total=False): + tax_exempt: Required[bool] + + tax_provider: Required[Literal["sphere"]] + + +TaxConfiguration: TypeAlias = Union[ + TaxConfigurationNewAvalaraTaxConfiguration, + TaxConfigurationNewTaxJarConfiguration, + TaxConfigurationNewSphereConfiguration, +] class TaxID(TypedDict, total=False): diff --git a/src/orb/types/customers/credits/ledger_create_entry_by_external_id_response.py b/src/orb/types/customers/credits/ledger_create_entry_by_external_id_response.py index 903d95f3..0449dc73 100644 --- a/src/orb/types/customers/credits/ledger_create_entry_by_external_id_response.py +++ b/src/orb/types/customers/credits/ledger_create_entry_by_external_id_response.py @@ -1,10 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, Union, Optional +from typing import Dict, List, Union, Optional from datetime import datetime from typing_extensions import Literal, Annotated, TypeAlias from ...._utils import PropertyInfo +from ...invoice import Invoice from ...._models import BaseModel __all__ = [ @@ -80,6 +81,9 @@ class IncrementLedgerEntry(BaseModel): starting_balance: float + created_invoices: Optional[List[Invoice]] = None + """If the increment resulted in invoice creation, the list of created invoices""" + class DecrementLedgerEntryCreditBlock(BaseModel): id: str diff --git a/src/orb/types/customers/credits/ledger_create_entry_response.py b/src/orb/types/customers/credits/ledger_create_entry_response.py index f21c2562..3401e8d6 100644 --- a/src/orb/types/customers/credits/ledger_create_entry_response.py +++ b/src/orb/types/customers/credits/ledger_create_entry_response.py @@ -1,10 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, Union, Optional +from typing import Dict, List, Union, Optional from datetime import datetime from typing_extensions import Literal, Annotated, TypeAlias from ...._utils import PropertyInfo +from ...invoice import Invoice from ...._models import BaseModel __all__ = [ @@ -80,6 +81,9 @@ class IncrementLedgerEntry(BaseModel): starting_balance: float + created_invoices: Optional[List[Invoice]] = None + """If the increment resulted in invoice creation, the list of created invoices""" + class DecrementLedgerEntryCreditBlock(BaseModel): id: str diff --git a/src/orb/types/customers/credits/ledger_list_by_external_id_response.py b/src/orb/types/customers/credits/ledger_list_by_external_id_response.py index e7b515fd..74106ef1 100644 --- a/src/orb/types/customers/credits/ledger_list_by_external_id_response.py +++ b/src/orb/types/customers/credits/ledger_list_by_external_id_response.py @@ -1,10 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, Union, Optional +from typing import Dict, List, Union, Optional from datetime import datetime from typing_extensions import Literal, Annotated, TypeAlias from ...._utils import PropertyInfo +from ...invoice import Invoice from ...._models import BaseModel __all__ = [ @@ -80,6 +81,9 @@ class IncrementLedgerEntry(BaseModel): starting_balance: float + created_invoices: Optional[List[Invoice]] = None + """If the increment resulted in invoice creation, the list of created invoices""" + class DecrementLedgerEntryCreditBlock(BaseModel): id: str diff --git a/src/orb/types/customers/credits/ledger_list_response.py b/src/orb/types/customers/credits/ledger_list_response.py index 26008bcc..6330e620 100644 --- a/src/orb/types/customers/credits/ledger_list_response.py +++ b/src/orb/types/customers/credits/ledger_list_response.py @@ -1,10 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, Union, Optional +from typing import Dict, List, Union, Optional from datetime import datetime from typing_extensions import Literal, Annotated, TypeAlias from ...._utils import PropertyInfo +from ...invoice import Invoice from ...._models import BaseModel __all__ = [ @@ -80,6 +81,9 @@ class IncrementLedgerEntry(BaseModel): starting_balance: float + created_invoices: Optional[List[Invoice]] = None + """If the increment resulted in invoice creation, the list of created invoices""" + class DecrementLedgerEntryCreditBlock(BaseModel): id: str diff --git a/src/orb/types/customers/credits/top_up_create_by_external_id_params.py b/src/orb/types/customers/credits/top_up_create_by_external_id_params.py index 65022b53..1dc01eb5 100644 --- a/src/orb/types/customers/credits/top_up_create_by_external_id_params.py +++ b/src/orb/types/customers/credits/top_up_create_by_external_id_params.py @@ -37,7 +37,8 @@ class TopUpCreateByExternalIDParams(TypedDict, total=False): active_from: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")] """The date from which the top-up is active. - If unspecified, the top-up is active immediately. + If unspecified, the top-up is active immediately. This should not be more than + 10 days in the past. """ expires_after: Optional[int] diff --git a/src/orb/types/customers/credits/top_up_create_params.py b/src/orb/types/customers/credits/top_up_create_params.py index 3d33860f..2208640c 100644 --- a/src/orb/types/customers/credits/top_up_create_params.py +++ b/src/orb/types/customers/credits/top_up_create_params.py @@ -37,7 +37,8 @@ class TopUpCreateParams(TypedDict, total=False): active_from: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")] """The date from which the top-up is active. - If unspecified, the top-up is active immediately. + If unspecified, the top-up is active immediately. This should not be more than + 10 days in the past. """ expires_after: Optional[int] diff --git a/src/orb/types/invoice.py b/src/orb/types/invoice.py index f979503d..7d8e108b 100644 --- a/src/orb/types/invoice.py +++ b/src/orb/types/invoice.py @@ -23,12 +23,19 @@ "LineItem", "LineItemAdjustment", "LineItemAdjustmentMonetaryUsageDiscountAdjustment", + "LineItemAdjustmentMonetaryUsageDiscountAdjustmentFilter", "LineItemAdjustmentMonetaryAmountDiscountAdjustment", + "LineItemAdjustmentMonetaryAmountDiscountAdjustmentFilter", "LineItemAdjustmentMonetaryPercentageDiscountAdjustment", + "LineItemAdjustmentMonetaryPercentageDiscountAdjustmentFilter", "LineItemAdjustmentMonetaryMinimumAdjustment", + "LineItemAdjustmentMonetaryMinimumAdjustmentFilter", "LineItemAdjustmentMonetaryMaximumAdjustment", + "LineItemAdjustmentMonetaryMaximumAdjustmentFilter", "LineItemMaximum", + "LineItemMaximumFilter", "LineItemMinimum", + "LineItemMinimumFilter", "LineItemSubLineItem", "LineItemSubLineItemMatrixSubLineItem", "LineItemSubLineItemMatrixSubLineItemGrouping", @@ -40,7 +47,9 @@ "LineItemSubLineItemOtherSubLineItemGrouping", "LineItemTaxAmount", "Maximum", + "MaximumFilter", "Minimum", + "MinimumFilter", "PaymentAttempt", "ShippingAddress", "Subscription", @@ -326,6 +335,17 @@ class CustomerTaxID(BaseModel): value: str +class LineItemAdjustmentMonetaryUsageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class LineItemAdjustmentMonetaryUsageDiscountAdjustment(BaseModel): id: str @@ -337,6 +357,9 @@ class LineItemAdjustmentMonetaryUsageDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[LineItemAdjustmentMonetaryUsageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -353,6 +376,17 @@ class LineItemAdjustmentMonetaryUsageDiscountAdjustment(BaseModel): """ +class LineItemAdjustmentMonetaryAmountDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class LineItemAdjustmentMonetaryAmountDiscountAdjustment(BaseModel): id: str @@ -370,6 +404,9 @@ class LineItemAdjustmentMonetaryAmountDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[LineItemAdjustmentMonetaryAmountDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -380,6 +417,17 @@ class LineItemAdjustmentMonetaryAmountDiscountAdjustment(BaseModel): """The reason for the adjustment.""" +class LineItemAdjustmentMonetaryPercentageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class LineItemAdjustmentMonetaryPercentageDiscountAdjustment(BaseModel): id: str @@ -391,6 +439,9 @@ class LineItemAdjustmentMonetaryPercentageDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[LineItemAdjustmentMonetaryPercentageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -407,6 +458,17 @@ class LineItemAdjustmentMonetaryPercentageDiscountAdjustment(BaseModel): """The reason for the adjustment.""" +class LineItemAdjustmentMonetaryMinimumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class LineItemAdjustmentMonetaryMinimumAdjustment(BaseModel): id: str @@ -418,6 +480,9 @@ class LineItemAdjustmentMonetaryMinimumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[LineItemAdjustmentMonetaryMinimumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -437,6 +502,17 @@ class LineItemAdjustmentMonetaryMinimumAdjustment(BaseModel): """The reason for the adjustment.""" +class LineItemAdjustmentMonetaryMaximumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class LineItemAdjustmentMonetaryMaximumAdjustment(BaseModel): id: str @@ -448,6 +524,9 @@ class LineItemAdjustmentMonetaryMaximumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[LineItemAdjustmentMonetaryMaximumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -476,6 +555,17 @@ class LineItemAdjustmentMonetaryMaximumAdjustment(BaseModel): ] +class LineItemMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class LineItemMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -483,10 +573,24 @@ class LineItemMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[LineItemMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class LineItemMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class LineItemMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -494,6 +598,9 @@ class LineItemMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[LineItemMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -694,6 +801,17 @@ class LineItem(BaseModel): """ +class MaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class Maximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -701,10 +819,24 @@ class Maximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[MaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class MinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class Minimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -712,6 +844,9 @@ class Minimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[MinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" diff --git a/src/orb/types/invoice_fetch_upcoming_response.py b/src/orb/types/invoice_fetch_upcoming_response.py index fa2cc709..5d9d2d6d 100644 --- a/src/orb/types/invoice_fetch_upcoming_response.py +++ b/src/orb/types/invoice_fetch_upcoming_response.py @@ -23,12 +23,19 @@ "LineItem", "LineItemAdjustment", "LineItemAdjustmentMonetaryUsageDiscountAdjustment", + "LineItemAdjustmentMonetaryUsageDiscountAdjustmentFilter", "LineItemAdjustmentMonetaryAmountDiscountAdjustment", + "LineItemAdjustmentMonetaryAmountDiscountAdjustmentFilter", "LineItemAdjustmentMonetaryPercentageDiscountAdjustment", + "LineItemAdjustmentMonetaryPercentageDiscountAdjustmentFilter", "LineItemAdjustmentMonetaryMinimumAdjustment", + "LineItemAdjustmentMonetaryMinimumAdjustmentFilter", "LineItemAdjustmentMonetaryMaximumAdjustment", + "LineItemAdjustmentMonetaryMaximumAdjustmentFilter", "LineItemMaximum", + "LineItemMaximumFilter", "LineItemMinimum", + "LineItemMinimumFilter", "LineItemSubLineItem", "LineItemSubLineItemMatrixSubLineItem", "LineItemSubLineItemMatrixSubLineItemGrouping", @@ -40,7 +47,9 @@ "LineItemSubLineItemOtherSubLineItemGrouping", "LineItemTaxAmount", "Maximum", + "MaximumFilter", "Minimum", + "MinimumFilter", "PaymentAttempt", "ShippingAddress", "Subscription", @@ -326,6 +335,17 @@ class CustomerTaxID(BaseModel): value: str +class LineItemAdjustmentMonetaryUsageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class LineItemAdjustmentMonetaryUsageDiscountAdjustment(BaseModel): id: str @@ -337,6 +357,9 @@ class LineItemAdjustmentMonetaryUsageDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[LineItemAdjustmentMonetaryUsageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -353,6 +376,17 @@ class LineItemAdjustmentMonetaryUsageDiscountAdjustment(BaseModel): """ +class LineItemAdjustmentMonetaryAmountDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class LineItemAdjustmentMonetaryAmountDiscountAdjustment(BaseModel): id: str @@ -370,6 +404,9 @@ class LineItemAdjustmentMonetaryAmountDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[LineItemAdjustmentMonetaryAmountDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -380,6 +417,17 @@ class LineItemAdjustmentMonetaryAmountDiscountAdjustment(BaseModel): """The reason for the adjustment.""" +class LineItemAdjustmentMonetaryPercentageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class LineItemAdjustmentMonetaryPercentageDiscountAdjustment(BaseModel): id: str @@ -391,6 +439,9 @@ class LineItemAdjustmentMonetaryPercentageDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[LineItemAdjustmentMonetaryPercentageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -407,6 +458,17 @@ class LineItemAdjustmentMonetaryPercentageDiscountAdjustment(BaseModel): """The reason for the adjustment.""" +class LineItemAdjustmentMonetaryMinimumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class LineItemAdjustmentMonetaryMinimumAdjustment(BaseModel): id: str @@ -418,6 +480,9 @@ class LineItemAdjustmentMonetaryMinimumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[LineItemAdjustmentMonetaryMinimumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -437,6 +502,17 @@ class LineItemAdjustmentMonetaryMinimumAdjustment(BaseModel): """The reason for the adjustment.""" +class LineItemAdjustmentMonetaryMaximumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class LineItemAdjustmentMonetaryMaximumAdjustment(BaseModel): id: str @@ -448,6 +524,9 @@ class LineItemAdjustmentMonetaryMaximumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[LineItemAdjustmentMonetaryMaximumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -476,6 +555,17 @@ class LineItemAdjustmentMonetaryMaximumAdjustment(BaseModel): ] +class LineItemMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class LineItemMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -483,10 +573,24 @@ class LineItemMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[LineItemMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class LineItemMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class LineItemMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -494,6 +598,9 @@ class LineItemMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[LineItemMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -694,6 +801,17 @@ class LineItem(BaseModel): """ +class MaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class Maximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -701,10 +819,24 @@ class Maximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[MaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class MinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class Minimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -712,6 +844,9 @@ class Minimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[MinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" diff --git a/src/orb/types/invoice_line_item_create_response.py b/src/orb/types/invoice_line_item_create_response.py index d4af6fff..d8e6209d 100644 --- a/src/orb/types/invoice_line_item_create_response.py +++ b/src/orb/types/invoice_line_item_create_response.py @@ -13,12 +13,19 @@ "InvoiceLineItemCreateResponse", "Adjustment", "AdjustmentMonetaryUsageDiscountAdjustment", + "AdjustmentMonetaryUsageDiscountAdjustmentFilter", "AdjustmentMonetaryAmountDiscountAdjustment", + "AdjustmentMonetaryAmountDiscountAdjustmentFilter", "AdjustmentMonetaryPercentageDiscountAdjustment", + "AdjustmentMonetaryPercentageDiscountAdjustmentFilter", "AdjustmentMonetaryMinimumAdjustment", + "AdjustmentMonetaryMinimumAdjustmentFilter", "AdjustmentMonetaryMaximumAdjustment", + "AdjustmentMonetaryMaximumAdjustmentFilter", "Maximum", + "MaximumFilter", "Minimum", + "MinimumFilter", "SubLineItem", "SubLineItemMatrixSubLineItem", "SubLineItemMatrixSubLineItemGrouping", @@ -32,6 +39,17 @@ ] +class AdjustmentMonetaryUsageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentMonetaryUsageDiscountAdjustment(BaseModel): id: str @@ -43,6 +61,9 @@ class AdjustmentMonetaryUsageDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentMonetaryUsageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -59,6 +80,17 @@ class AdjustmentMonetaryUsageDiscountAdjustment(BaseModel): """ +class AdjustmentMonetaryAmountDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentMonetaryAmountDiscountAdjustment(BaseModel): id: str @@ -76,6 +108,9 @@ class AdjustmentMonetaryAmountDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentMonetaryAmountDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -86,6 +121,17 @@ class AdjustmentMonetaryAmountDiscountAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentMonetaryPercentageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentMonetaryPercentageDiscountAdjustment(BaseModel): id: str @@ -97,6 +143,9 @@ class AdjustmentMonetaryPercentageDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentMonetaryPercentageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -113,6 +162,17 @@ class AdjustmentMonetaryPercentageDiscountAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentMonetaryMinimumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentMonetaryMinimumAdjustment(BaseModel): id: str @@ -124,6 +184,9 @@ class AdjustmentMonetaryMinimumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentMonetaryMinimumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -143,6 +206,17 @@ class AdjustmentMonetaryMinimumAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentMonetaryMaximumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentMonetaryMaximumAdjustment(BaseModel): id: str @@ -154,6 +228,9 @@ class AdjustmentMonetaryMaximumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentMonetaryMaximumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -182,6 +259,17 @@ class AdjustmentMonetaryMaximumAdjustment(BaseModel): ] +class MaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class Maximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -189,10 +277,24 @@ class Maximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[MaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class MinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class Minimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -200,6 +302,9 @@ class Minimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[MinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" diff --git a/src/orb/types/item.py b/src/orb/types/item.py index ad22a1dd..cbb47c97 100644 --- a/src/orb/types/item.py +++ b/src/orb/types/item.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List +from typing import Dict, List from datetime import datetime from typing_extensions import Literal @@ -22,4 +22,12 @@ class Item(BaseModel): external_connections: List[ExternalConnection] + metadata: Dict[str, str] + """User specified key-value pairs for the resource. + + If not present, this defaults to an empty dictionary. Individual keys can be + removed by setting the value to `null`, and the entire metadata mapping can be + cleared by setting `metadata` to `null`. + """ + name: str diff --git a/src/orb/types/item_create_params.py b/src/orb/types/item_create_params.py index 8b45e468..178b7e23 100644 --- a/src/orb/types/item_create_params.py +++ b/src/orb/types/item_create_params.py @@ -2,6 +2,7 @@ from __future__ import annotations +from typing import Dict, Optional from typing_extensions import Required, TypedDict __all__ = ["ItemCreateParams"] @@ -10,3 +11,10 @@ class ItemCreateParams(TypedDict, total=False): name: Required[str] """The name of the item.""" + + 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`. + """ diff --git a/src/orb/types/item_update_params.py b/src/orb/types/item_update_params.py index a94f7c59..695af653 100644 --- a/src/orb/types/item_update_params.py +++ b/src/orb/types/item_update_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Iterable, Optional +from typing import Dict, Iterable, Optional from typing_extensions import Literal, Required, TypedDict __all__ = ["ItemUpdateParams", "ExternalConnection"] @@ -11,6 +11,13 @@ class ItemUpdateParams(TypedDict, total=False): external_connections: Optional[Iterable[ExternalConnection]] + 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`. + """ + name: Optional[str] diff --git a/src/orb/types/plan.py b/src/orb/types/plan.py index a4b43d96..62809a57 100644 --- a/src/orb/types/plan.py +++ b/src/orb/types/plan.py @@ -13,21 +13,41 @@ "Plan", "Adjustment", "AdjustmentPlanPhaseUsageDiscountAdjustment", + "AdjustmentPlanPhaseUsageDiscountAdjustmentFilter", "AdjustmentPlanPhaseAmountDiscountAdjustment", + "AdjustmentPlanPhaseAmountDiscountAdjustmentFilter", "AdjustmentPlanPhasePercentageDiscountAdjustment", + "AdjustmentPlanPhasePercentageDiscountAdjustmentFilter", "AdjustmentPlanPhaseMinimumAdjustment", + "AdjustmentPlanPhaseMinimumAdjustmentFilter", "AdjustmentPlanPhaseMaximumAdjustment", + "AdjustmentPlanPhaseMaximumAdjustmentFilter", "BasePlan", "Maximum", + "MaximumFilter", "Minimum", + "MinimumFilter", "PlanPhase", "PlanPhaseMaximum", + "PlanPhaseMaximumFilter", "PlanPhaseMinimum", + "PlanPhaseMinimumFilter", "Product", "TrialConfig", ] +class AdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): id: str @@ -36,6 +56,9 @@ class AdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentPlanPhaseUsageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -55,6 +78,17 @@ class AdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): """ +class AdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): id: str @@ -69,6 +103,9 @@ class AdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentPlanPhaseAmountDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -82,6 +119,17 @@ class AdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel): id: str @@ -90,6 +138,9 @@ class AdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentPlanPhasePercentageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -109,6 +160,17 @@ class AdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentPlanPhaseMinimumAdjustment(BaseModel): id: str @@ -117,6 +179,9 @@ class AdjustmentPlanPhaseMinimumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentPlanPhaseMinimumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -139,6 +204,17 @@ class AdjustmentPlanPhaseMinimumAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentPlanPhaseMaximumAdjustment(BaseModel): id: str @@ -147,6 +223,9 @@ class AdjustmentPlanPhaseMaximumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentPlanPhaseMaximumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -191,6 +270,17 @@ class BasePlan(BaseModel): name: Optional[str] = None +class MaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class Maximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -198,10 +288,24 @@ class Maximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[MaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class MinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class Minimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -209,10 +313,24 @@ class Minimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[MinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" +class PlanPhaseMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class PlanPhaseMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -220,10 +338,24 @@ class PlanPhaseMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[PlanPhaseMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class PlanPhaseMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class PlanPhaseMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -231,6 +363,9 @@ class PlanPhaseMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[PlanPhaseMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" diff --git a/src/orb/types/plan_create_params.py b/src/orb/types/plan_create_params.py index ae82aaf8..7964ec74 100644 --- a/src/orb/types/plan_create_params.py +++ b/src/orb/types/plan_create_params.py @@ -11,91 +11,130 @@ "PriceNewPlanUnitPrice", "PriceNewPlanUnitPriceUnitConfig", "PriceNewPlanUnitPriceBillingCycleConfiguration", + "PriceNewPlanUnitPriceDimensionalPriceConfiguration", "PriceNewPlanUnitPriceInvoicingCycleConfiguration", "PriceNewPlanPackagePrice", "PriceNewPlanPackagePricePackageConfig", "PriceNewPlanPackagePriceBillingCycleConfiguration", + "PriceNewPlanPackagePriceDimensionalPriceConfiguration", "PriceNewPlanPackagePriceInvoicingCycleConfiguration", "PriceNewPlanMatrixPrice", "PriceNewPlanMatrixPriceMatrixConfig", "PriceNewPlanMatrixPriceMatrixConfigMatrixValue", "PriceNewPlanMatrixPriceBillingCycleConfiguration", + "PriceNewPlanMatrixPriceDimensionalPriceConfiguration", "PriceNewPlanMatrixPriceInvoicingCycleConfiguration", "PriceNewPlanTieredPrice", "PriceNewPlanTieredPriceTieredConfig", "PriceNewPlanTieredPriceTieredConfigTier", "PriceNewPlanTieredPriceBillingCycleConfiguration", + "PriceNewPlanTieredPriceDimensionalPriceConfiguration", "PriceNewPlanTieredPriceInvoicingCycleConfiguration", "PriceNewPlanTieredBpsPrice", "PriceNewPlanTieredBpsPriceTieredBpsConfig", "PriceNewPlanTieredBpsPriceTieredBpsConfigTier", "PriceNewPlanTieredBpsPriceBillingCycleConfiguration", + "PriceNewPlanTieredBpsPriceDimensionalPriceConfiguration", "PriceNewPlanTieredBpsPriceInvoicingCycleConfiguration", "PriceNewPlanBpsPrice", "PriceNewPlanBpsPriceBpsConfig", "PriceNewPlanBpsPriceBillingCycleConfiguration", + "PriceNewPlanBpsPriceDimensionalPriceConfiguration", "PriceNewPlanBpsPriceInvoicingCycleConfiguration", "PriceNewPlanBulkBpsPrice", "PriceNewPlanBulkBpsPriceBulkBpsConfig", "PriceNewPlanBulkBpsPriceBulkBpsConfigTier", "PriceNewPlanBulkBpsPriceBillingCycleConfiguration", + "PriceNewPlanBulkBpsPriceDimensionalPriceConfiguration", "PriceNewPlanBulkBpsPriceInvoicingCycleConfiguration", "PriceNewPlanBulkPrice", "PriceNewPlanBulkPriceBulkConfig", "PriceNewPlanBulkPriceBulkConfigTier", "PriceNewPlanBulkPriceBillingCycleConfiguration", + "PriceNewPlanBulkPriceDimensionalPriceConfiguration", "PriceNewPlanBulkPriceInvoicingCycleConfiguration", "PriceNewPlanThresholdTotalAmountPrice", "PriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration", + "PriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration", "PriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration", "PriceNewPlanTieredPackagePrice", "PriceNewPlanTieredPackagePriceBillingCycleConfiguration", + "PriceNewPlanTieredPackagePriceDimensionalPriceConfiguration", "PriceNewPlanTieredPackagePriceInvoicingCycleConfiguration", "PriceNewPlanTieredWithMinimumPrice", "PriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration", + "PriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration", "PriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration", "PriceNewPlanUnitWithPercentPrice", "PriceNewPlanUnitWithPercentPriceBillingCycleConfiguration", + "PriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration", "PriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration", "PriceNewPlanPackageWithAllocationPrice", "PriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration", + "PriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration", "PriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration", "PriceNewPlanTierWithProrationPrice", "PriceNewPlanTierWithProrationPriceBillingCycleConfiguration", + "PriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration", "PriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration", "PriceNewPlanUnitWithProrationPrice", "PriceNewPlanUnitWithProrationPriceBillingCycleConfiguration", + "PriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration", "PriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration", "PriceNewPlanGroupedAllocationPrice", "PriceNewPlanGroupedAllocationPriceBillingCycleConfiguration", + "PriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration", "PriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration", "PriceNewPlanGroupedWithProratedMinimumPrice", "PriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration", + "PriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration", "PriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration", "PriceNewPlanGroupedWithMeteredMinimumPrice", "PriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration", + "PriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration", "PriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration", "PriceNewPlanMatrixWithDisplayNamePrice", "PriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration", + "PriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration", "PriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration", "PriceNewPlanBulkWithProrationPrice", "PriceNewPlanBulkWithProrationPriceBillingCycleConfiguration", + "PriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration", "PriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration", "PriceNewPlanGroupedTieredPackagePrice", "PriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration", + "PriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration", "PriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration", "PriceNewPlanMaxGroupTieredPackagePrice", "PriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration", + "PriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration", "PriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration", "PriceNewPlanScalableMatrixWithUnitPricingPrice", "PriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration", + "PriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration", "PriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration", "PriceNewPlanScalableMatrixWithTieredPricingPrice", "PriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration", + "PriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration", "PriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration", "PriceNewPlanCumulativeGroupedBulkPrice", "PriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration", + "PriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration", "PriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration", + "PriceNewPlanTieredPackageWithMinimumPrice", + "PriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration", + "PriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration", + "PriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration", + "PriceNewPlanMatrixWithAllocationPrice", + "PriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig", + "PriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue", + "PriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration", + "PriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration", + "PriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration", + "PriceNewPlanGroupedTieredPrice", + "PriceNewPlanGroupedTieredPriceBillingCycleConfiguration", + "PriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration", + "PriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration", ] @@ -155,6 +194,20 @@ class PriceNewPlanUnitPriceBillingCycleConfiguration(TypedDict, total=False): """The unit of billing period duration.""" +class PriceNewPlanUnitPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class PriceNewPlanUnitPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -204,6 +257,9 @@ class PriceNewPlanUnitPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[PriceNewPlanUnitPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -250,6 +306,20 @@ class PriceNewPlanPackagePriceBillingCycleConfiguration(TypedDict, total=False): """The unit of billing period duration.""" +class PriceNewPlanPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class PriceNewPlanPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -299,6 +369,9 @@ class PriceNewPlanPackagePrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[PriceNewPlanPackagePriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -356,6 +429,20 @@ class PriceNewPlanMatrixPriceBillingCycleConfiguration(TypedDict, total=False): """The unit of billing period duration.""" +class PriceNewPlanMatrixPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class PriceNewPlanMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -405,6 +492,9 @@ class PriceNewPlanMatrixPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[PriceNewPlanMatrixPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -455,6 +545,20 @@ class PriceNewPlanTieredPriceBillingCycleConfiguration(TypedDict, total=False): """The unit of billing period duration.""" +class PriceNewPlanTieredPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class PriceNewPlanTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -504,6 +608,9 @@ class PriceNewPlanTieredPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[PriceNewPlanTieredPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -560,6 +667,20 @@ class PriceNewPlanTieredBpsPriceBillingCycleConfiguration(TypedDict, total=False """The unit of billing period duration.""" +class PriceNewPlanTieredBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class PriceNewPlanTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -609,6 +730,9 @@ class PriceNewPlanTieredBpsPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[PriceNewPlanTieredBpsPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -651,6 +775,20 @@ class PriceNewPlanBpsPriceBillingCycleConfiguration(TypedDict, total=False): """The unit of billing period duration.""" +class PriceNewPlanBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class PriceNewPlanBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -700,6 +838,9 @@ class PriceNewPlanBpsPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[PriceNewPlanBpsPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -753,6 +894,20 @@ class PriceNewPlanBulkBpsPriceBillingCycleConfiguration(TypedDict, total=False): """The unit of billing period duration.""" +class PriceNewPlanBulkBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class PriceNewPlanBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -802,6 +957,9 @@ class PriceNewPlanBulkBpsPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[PriceNewPlanBulkBpsPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -849,6 +1007,20 @@ class PriceNewPlanBulkPriceBillingCycleConfiguration(TypedDict, total=False): """The unit of billing period duration.""" +class PriceNewPlanBulkPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class PriceNewPlanBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -898,6 +1070,9 @@ class PriceNewPlanBulkPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[PriceNewPlanBulkPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -932,6 +1107,20 @@ class PriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration(TypedDict, """The unit of billing period duration.""" +class PriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class PriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -981,6 +1170,9 @@ class PriceNewPlanThresholdTotalAmountPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[PriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1015,6 +1207,20 @@ class PriceNewPlanTieredPackagePriceBillingCycleConfiguration(TypedDict, total=F """The unit of billing period duration.""" +class PriceNewPlanTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class PriceNewPlanTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1064,6 +1270,9 @@ class PriceNewPlanTieredPackagePrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[PriceNewPlanTieredPackagePriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1098,6 +1307,20 @@ class PriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration(TypedDict, tot """The unit of billing period duration.""" +class PriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class PriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1147,6 +1370,9 @@ class PriceNewPlanTieredWithMinimumPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[PriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1181,6 +1407,20 @@ class PriceNewPlanUnitWithPercentPriceBillingCycleConfiguration(TypedDict, total """The unit of billing period duration.""" +class PriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class PriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1230,6 +1470,9 @@ class PriceNewPlanUnitWithPercentPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[PriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1264,6 +1507,20 @@ class PriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration(TypedDict, """The unit of billing period duration.""" +class PriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class PriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1313,6 +1570,9 @@ class PriceNewPlanPackageWithAllocationPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[PriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1347,6 +1607,20 @@ class PriceNewPlanTierWithProrationPriceBillingCycleConfiguration(TypedDict, tot """The unit of billing period duration.""" +class PriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class PriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1396,6 +1670,9 @@ class PriceNewPlanTierWithProrationPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[PriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1430,6 +1707,20 @@ class PriceNewPlanUnitWithProrationPriceBillingCycleConfiguration(TypedDict, tot """The unit of billing period duration.""" +class PriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class PriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1479,6 +1770,9 @@ class PriceNewPlanUnitWithProrationPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[PriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1513,6 +1807,20 @@ class PriceNewPlanGroupedAllocationPriceBillingCycleConfiguration(TypedDict, tot """The unit of billing period duration.""" +class PriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class PriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1562,6 +1870,9 @@ class PriceNewPlanGroupedAllocationPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[PriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1596,6 +1907,20 @@ class PriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration(Typed """The unit of billing period duration.""" +class PriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class PriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1645,6 +1970,9 @@ class PriceNewPlanGroupedWithProratedMinimumPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[PriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1679,6 +2007,20 @@ class PriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration(TypedD """The unit of billing period duration.""" +class PriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class PriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1728,6 +2070,9 @@ class PriceNewPlanGroupedWithMeteredMinimumPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[PriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1762,6 +2107,20 @@ class PriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration(TypedDict, """The unit of billing period duration.""" +class PriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class PriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1811,6 +2170,9 @@ class PriceNewPlanMatrixWithDisplayNamePrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[PriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1845,6 +2207,20 @@ class PriceNewPlanBulkWithProrationPriceBillingCycleConfiguration(TypedDict, tot """The unit of billing period duration.""" +class PriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class PriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1894,6 +2270,9 @@ class PriceNewPlanBulkWithProrationPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[PriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1928,6 +2307,20 @@ class PriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration(TypedDict, """The unit of billing period duration.""" +class PriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class PriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1977,6 +2370,9 @@ class PriceNewPlanGroupedTieredPackagePrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[PriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2011,6 +2407,20 @@ class PriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration(TypedDict, """The unit of billing period duration.""" +class PriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class PriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2060,6 +2470,9 @@ class PriceNewPlanMaxGroupTieredPackagePrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[PriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2094,6 +2507,20 @@ class PriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration(Ty """The unit of billing period duration.""" +class PriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class PriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2143,6 +2570,11 @@ class PriceNewPlanScalableMatrixWithUnitPricingPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[ + PriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2177,6 +2609,20 @@ class PriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration( """The unit of billing period duration.""" +class PriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class PriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2226,6 +2672,11 @@ class PriceNewPlanScalableMatrixWithTieredPricingPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[ + PriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2260,6 +2711,20 @@ class PriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration(TypedDict, """The unit of billing period duration.""" +class PriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class PriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2309,6 +2774,9 @@ class PriceNewPlanCumulativeGroupedBulkPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[PriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2335,6 +2803,332 @@ class PriceNewPlanCumulativeGroupedBulkPrice(TypedDict, total=False): """ +class PriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceNewPlanTieredPackageWithMinimumPrice(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_package_with_minimum"]] + + name: Required[str] + """The name of the price.""" + + tiered_package_with_minimum_config: Required[Dict[str, object]] + + 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[PriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[PriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration] + """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[PriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue(TypedDict, total=False): + dimension_values: Required[List[Optional[str]]] + """One or two matrix keys to filter usage to this Matrix value by. + + For example, ["region", "tier"] could be used to filter cloud usage by a cloud + region and an instance tier. + """ + + unit_amount: Required[str] + """Unit price for the specified dimension_values""" + + +class PriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig(TypedDict, total=False): + allocation: Required[float] + """Allocation to be used to calculate the price""" + + default_unit_amount: Required[str] + """Default per unit rate for any usage not bucketed into a specified matrix_value""" + + dimensions: Required[List[Optional[str]]] + """One or two event property values to evaluate matrix groups by""" + + matrix_values: Required[Iterable[PriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue]] + """Matrix values for specified matrix grouping keys""" + + +class PriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceNewPlanMatrixWithAllocationPrice(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.""" + + matrix_with_allocation_config: Required[PriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig] + + model_type: Required[Literal["matrix_with_allocation"]] + + 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[PriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[PriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration] + """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[PriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceNewPlanGroupedTieredPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceNewPlanGroupedTieredPrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_tiered"]] + + 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[PriceNewPlanGroupedTieredPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[PriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration] + """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[PriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + Price: TypeAlias = Union[ PriceNewPlanUnitPrice, PriceNewPlanPackagePrice, @@ -2361,4 +3155,7 @@ class PriceNewPlanCumulativeGroupedBulkPrice(TypedDict, total=False): PriceNewPlanScalableMatrixWithUnitPricingPrice, PriceNewPlanScalableMatrixWithTieredPricingPrice, PriceNewPlanCumulativeGroupedBulkPrice, + PriceNewPlanTieredPackageWithMinimumPrice, + PriceNewPlanMatrixWithAllocationPrice, + PriceNewPlanGroupedTieredPrice, ] diff --git a/src/orb/types/plan_version.py b/src/orb/types/plan_version.py new file mode 100644 index 00000000..4e4ab8ab --- /dev/null +++ b/src/orb/types/plan_version.py @@ -0,0 +1,265 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Union, Optional +from datetime import datetime +from typing_extensions import Literal, Annotated, TypeAlias + +from .price import Price +from .._utils import PropertyInfo +from .._models import BaseModel +from .plan_version_phase import PlanVersionPhase + +__all__ = [ + "PlanVersion", + "Adjustment", + "AdjustmentPlanPhaseUsageDiscountAdjustment", + "AdjustmentPlanPhaseUsageDiscountAdjustmentFilter", + "AdjustmentPlanPhaseAmountDiscountAdjustment", + "AdjustmentPlanPhaseAmountDiscountAdjustmentFilter", + "AdjustmentPlanPhasePercentageDiscountAdjustment", + "AdjustmentPlanPhasePercentageDiscountAdjustmentFilter", + "AdjustmentPlanPhaseMinimumAdjustment", + "AdjustmentPlanPhaseMinimumAdjustmentFilter", + "AdjustmentPlanPhaseMaximumAdjustment", + "AdjustmentPlanPhaseMaximumAdjustmentFilter", +] + + +class AdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + +class AdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): + id: str + + adjustment_type: Literal["usage_discount"] + + applies_to_price_ids: List[str] + """The price IDs that this adjustment applies to.""" + + filters: List[AdjustmentPlanPhaseUsageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + + is_invoice_level: bool + """ + True for adjustments that apply to an entire invocice, false for adjustments + that apply to only one price. + """ + + plan_phase_order: Optional[int] = None + """The plan phase in which this adjustment is active.""" + + reason: Optional[str] = None + """The reason for the adjustment.""" + + usage_discount: float + """ + The number of usage units by which to discount the price this adjustment applies + to in a given billing period. + """ + + +class AdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + +class AdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): + id: str + + adjustment_type: Literal["amount_discount"] + + amount_discount: str + """ + The amount by which to discount the prices this adjustment applies to in a given + billing period. + """ + + applies_to_price_ids: List[str] + """The price IDs that this adjustment applies to.""" + + filters: List[AdjustmentPlanPhaseAmountDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + + is_invoice_level: bool + """ + True for adjustments that apply to an entire invocice, false for adjustments + that apply to only one price. + """ + + plan_phase_order: Optional[int] = None + """The plan phase in which this adjustment is active.""" + + reason: Optional[str] = None + """The reason for the adjustment.""" + + +class AdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + +class AdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel): + id: str + + adjustment_type: Literal["percentage_discount"] + + applies_to_price_ids: List[str] + """The price IDs that this adjustment applies to.""" + + filters: List[AdjustmentPlanPhasePercentageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + + is_invoice_level: bool + """ + True for adjustments that apply to an entire invocice, false for adjustments + that apply to only one price. + """ + + percentage_discount: float + """ + The percentage (as a value between 0 and 1) by which to discount the price + intervals this adjustment applies to in a given billing period. + """ + + plan_phase_order: Optional[int] = None + """The plan phase in which this adjustment is active.""" + + reason: Optional[str] = None + """The reason for the adjustment.""" + + +class AdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + +class AdjustmentPlanPhaseMinimumAdjustment(BaseModel): + id: str + + adjustment_type: Literal["minimum"] + + applies_to_price_ids: List[str] + """The price IDs that this adjustment applies to.""" + + filters: List[AdjustmentPlanPhaseMinimumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + + is_invoice_level: bool + """ + True for adjustments that apply to an entire invocice, false for adjustments + that apply to only one price. + """ + + item_id: str + """The item ID that revenue from this minimum will be attributed to.""" + + minimum_amount: str + """ + The minimum amount to charge in a given billing period for the prices this + adjustment applies to. + """ + + plan_phase_order: Optional[int] = None + """The plan phase in which this adjustment is active.""" + + reason: Optional[str] = None + """The reason for the adjustment.""" + + +class AdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + +class AdjustmentPlanPhaseMaximumAdjustment(BaseModel): + id: str + + adjustment_type: Literal["maximum"] + + applies_to_price_ids: List[str] + """The price IDs that this adjustment applies to.""" + + filters: List[AdjustmentPlanPhaseMaximumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + + is_invoice_level: bool + """ + True for adjustments that apply to an entire invocice, false for adjustments + that apply to only one price. + """ + + maximum_amount: str + """ + The maximum amount to charge in a given billing period for the prices this + adjustment applies to. + """ + + plan_phase_order: Optional[int] = None + """The plan phase in which this adjustment is active.""" + + reason: Optional[str] = None + """The reason for the adjustment.""" + + +Adjustment: TypeAlias = Annotated[ + Union[ + AdjustmentPlanPhaseUsageDiscountAdjustment, + AdjustmentPlanPhaseAmountDiscountAdjustment, + AdjustmentPlanPhasePercentageDiscountAdjustment, + AdjustmentPlanPhaseMinimumAdjustment, + AdjustmentPlanPhaseMaximumAdjustment, + ], + PropertyInfo(discriminator="adjustment_type"), +] + + +class PlanVersion(BaseModel): + adjustments: List[Adjustment] + """Adjustments for this plan. + + If the plan has phases, this includes adjustments across all phases of the plan. + """ + + created_at: datetime + + plan_phases: Optional[List[PlanVersionPhase]] = None + + prices: List[Price] + """Prices for this plan. + + If the plan has phases, this includes prices across all phases of the plan. + """ + + version: int diff --git a/src/orb/types/plan_version_phase.py b/src/orb/types/plan_version_phase.py new file mode 100644 index 00000000..4de75935 --- /dev/null +++ b/src/orb/types/plan_version_phase.py @@ -0,0 +1,27 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = ["PlanVersionPhase"] + + +class PlanVersionPhase(BaseModel): + id: str + + description: Optional[str] = None + + duration: Optional[int] = None + """How many terms of length `duration_unit` this phase is active for. + + If null, this phase is evergreen and active indefinitely + """ + + duration_unit: Optional[Literal["daily", "monthly", "quarterly", "semi_annual", "annual"]] = None + + name: str + + order: int + """Determines the ordering of the phase in a plan's lifecycle. 1 = first phase.""" diff --git a/src/orb/types/price.py b/src/orb/types/price.py index a53d02c4..2282c68d 100644 --- a/src/orb/types/price.py +++ b/src/orb/types/price.py @@ -16,41 +16,53 @@ "UnitPriceBillableMetric", "UnitPriceBillingCycleConfiguration", "UnitPriceCreditAllocation", + "UnitPriceCreditAllocationCustomExpiration", "UnitPriceInvoicingCycleConfiguration", "UnitPriceItem", "UnitPriceMaximum", + "UnitPriceMaximumFilter", "UnitPriceMinimum", + "UnitPriceMinimumFilter", "UnitPriceUnitConfig", "UnitPriceDimensionalPriceConfiguration", "PackagePrice", "PackagePriceBillableMetric", "PackagePriceBillingCycleConfiguration", "PackagePriceCreditAllocation", + "PackagePriceCreditAllocationCustomExpiration", "PackagePriceInvoicingCycleConfiguration", "PackagePriceItem", "PackagePriceMaximum", + "PackagePriceMaximumFilter", "PackagePriceMinimum", + "PackagePriceMinimumFilter", "PackagePricePackageConfig", "PackagePriceDimensionalPriceConfiguration", "MatrixPrice", "MatrixPriceBillableMetric", "MatrixPriceBillingCycleConfiguration", "MatrixPriceCreditAllocation", + "MatrixPriceCreditAllocationCustomExpiration", "MatrixPriceInvoicingCycleConfiguration", "MatrixPriceItem", "MatrixPriceMatrixConfig", "MatrixPriceMatrixConfigMatrixValue", "MatrixPriceMaximum", + "MatrixPriceMaximumFilter", "MatrixPriceMinimum", + "MatrixPriceMinimumFilter", "MatrixPriceDimensionalPriceConfiguration", "TieredPrice", "TieredPriceBillableMetric", "TieredPriceBillingCycleConfiguration", "TieredPriceCreditAllocation", + "TieredPriceCreditAllocationCustomExpiration", "TieredPriceInvoicingCycleConfiguration", "TieredPriceItem", "TieredPriceMaximum", + "TieredPriceMaximumFilter", "TieredPriceMinimum", + "TieredPriceMinimumFilter", "TieredPriceTieredConfig", "TieredPriceTieredConfigTier", "TieredPriceDimensionalPriceConfiguration", @@ -58,10 +70,13 @@ "TieredBpsPriceBillableMetric", "TieredBpsPriceBillingCycleConfiguration", "TieredBpsPriceCreditAllocation", + "TieredBpsPriceCreditAllocationCustomExpiration", "TieredBpsPriceInvoicingCycleConfiguration", "TieredBpsPriceItem", "TieredBpsPriceMaximum", + "TieredBpsPriceMaximumFilter", "TieredBpsPriceMinimum", + "TieredBpsPriceMinimumFilter", "TieredBpsPriceTieredBpsConfig", "TieredBpsPriceTieredBpsConfigTier", "TieredBpsPriceDimensionalPriceConfiguration", @@ -70,10 +85,13 @@ "BpsPriceBillingCycleConfiguration", "BpsPriceBpsConfig", "BpsPriceCreditAllocation", + "BpsPriceCreditAllocationCustomExpiration", "BpsPriceInvoicingCycleConfiguration", "BpsPriceItem", "BpsPriceMaximum", + "BpsPriceMaximumFilter", "BpsPriceMinimum", + "BpsPriceMinimumFilter", "BpsPriceDimensionalPriceConfiguration", "BulkBpsPrice", "BulkBpsPriceBillableMetric", @@ -81,10 +99,13 @@ "BulkBpsPriceBulkBpsConfig", "BulkBpsPriceBulkBpsConfigTier", "BulkBpsPriceCreditAllocation", + "BulkBpsPriceCreditAllocationCustomExpiration", "BulkBpsPriceInvoicingCycleConfiguration", "BulkBpsPriceItem", "BulkBpsPriceMaximum", + "BulkBpsPriceMaximumFilter", "BulkBpsPriceMinimum", + "BulkBpsPriceMinimumFilter", "BulkBpsPriceDimensionalPriceConfiguration", "BulkPrice", "BulkPriceBillableMetric", @@ -92,192 +113,255 @@ "BulkPriceBulkConfig", "BulkPriceBulkConfigTier", "BulkPriceCreditAllocation", + "BulkPriceCreditAllocationCustomExpiration", "BulkPriceInvoicingCycleConfiguration", "BulkPriceItem", "BulkPriceMaximum", + "BulkPriceMaximumFilter", "BulkPriceMinimum", + "BulkPriceMinimumFilter", "BulkPriceDimensionalPriceConfiguration", "ThresholdTotalAmountPrice", "ThresholdTotalAmountPriceBillableMetric", "ThresholdTotalAmountPriceBillingCycleConfiguration", "ThresholdTotalAmountPriceCreditAllocation", + "ThresholdTotalAmountPriceCreditAllocationCustomExpiration", "ThresholdTotalAmountPriceInvoicingCycleConfiguration", "ThresholdTotalAmountPriceItem", "ThresholdTotalAmountPriceMaximum", + "ThresholdTotalAmountPriceMaximumFilter", "ThresholdTotalAmountPriceMinimum", + "ThresholdTotalAmountPriceMinimumFilter", "ThresholdTotalAmountPriceDimensionalPriceConfiguration", "TieredPackagePrice", "TieredPackagePriceBillableMetric", "TieredPackagePriceBillingCycleConfiguration", "TieredPackagePriceCreditAllocation", + "TieredPackagePriceCreditAllocationCustomExpiration", "TieredPackagePriceInvoicingCycleConfiguration", "TieredPackagePriceItem", "TieredPackagePriceMaximum", + "TieredPackagePriceMaximumFilter", "TieredPackagePriceMinimum", + "TieredPackagePriceMinimumFilter", "TieredPackagePriceDimensionalPriceConfiguration", "GroupedTieredPrice", "GroupedTieredPriceBillableMetric", "GroupedTieredPriceBillingCycleConfiguration", "GroupedTieredPriceCreditAllocation", + "GroupedTieredPriceCreditAllocationCustomExpiration", "GroupedTieredPriceInvoicingCycleConfiguration", "GroupedTieredPriceItem", "GroupedTieredPriceMaximum", + "GroupedTieredPriceMaximumFilter", "GroupedTieredPriceMinimum", + "GroupedTieredPriceMinimumFilter", "GroupedTieredPriceDimensionalPriceConfiguration", "TieredWithMinimumPrice", "TieredWithMinimumPriceBillableMetric", "TieredWithMinimumPriceBillingCycleConfiguration", "TieredWithMinimumPriceCreditAllocation", + "TieredWithMinimumPriceCreditAllocationCustomExpiration", "TieredWithMinimumPriceInvoicingCycleConfiguration", "TieredWithMinimumPriceItem", "TieredWithMinimumPriceMaximum", + "TieredWithMinimumPriceMaximumFilter", "TieredWithMinimumPriceMinimum", + "TieredWithMinimumPriceMinimumFilter", "TieredWithMinimumPriceDimensionalPriceConfiguration", "TieredPackageWithMinimumPrice", "TieredPackageWithMinimumPriceBillableMetric", "TieredPackageWithMinimumPriceBillingCycleConfiguration", "TieredPackageWithMinimumPriceCreditAllocation", + "TieredPackageWithMinimumPriceCreditAllocationCustomExpiration", "TieredPackageWithMinimumPriceInvoicingCycleConfiguration", "TieredPackageWithMinimumPriceItem", "TieredPackageWithMinimumPriceMaximum", + "TieredPackageWithMinimumPriceMaximumFilter", "TieredPackageWithMinimumPriceMinimum", + "TieredPackageWithMinimumPriceMinimumFilter", "TieredPackageWithMinimumPriceDimensionalPriceConfiguration", "PackageWithAllocationPrice", "PackageWithAllocationPriceBillableMetric", "PackageWithAllocationPriceBillingCycleConfiguration", "PackageWithAllocationPriceCreditAllocation", + "PackageWithAllocationPriceCreditAllocationCustomExpiration", "PackageWithAllocationPriceInvoicingCycleConfiguration", "PackageWithAllocationPriceItem", "PackageWithAllocationPriceMaximum", + "PackageWithAllocationPriceMaximumFilter", "PackageWithAllocationPriceMinimum", + "PackageWithAllocationPriceMinimumFilter", "PackageWithAllocationPriceDimensionalPriceConfiguration", "UnitWithPercentPrice", "UnitWithPercentPriceBillableMetric", "UnitWithPercentPriceBillingCycleConfiguration", "UnitWithPercentPriceCreditAllocation", + "UnitWithPercentPriceCreditAllocationCustomExpiration", "UnitWithPercentPriceInvoicingCycleConfiguration", "UnitWithPercentPriceItem", "UnitWithPercentPriceMaximum", + "UnitWithPercentPriceMaximumFilter", "UnitWithPercentPriceMinimum", + "UnitWithPercentPriceMinimumFilter", "UnitWithPercentPriceDimensionalPriceConfiguration", "MatrixWithAllocationPrice", "MatrixWithAllocationPriceBillableMetric", "MatrixWithAllocationPriceBillingCycleConfiguration", "MatrixWithAllocationPriceCreditAllocation", + "MatrixWithAllocationPriceCreditAllocationCustomExpiration", "MatrixWithAllocationPriceInvoicingCycleConfiguration", "MatrixWithAllocationPriceItem", "MatrixWithAllocationPriceMatrixWithAllocationConfig", "MatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue", "MatrixWithAllocationPriceMaximum", + "MatrixWithAllocationPriceMaximumFilter", "MatrixWithAllocationPriceMinimum", + "MatrixWithAllocationPriceMinimumFilter", "MatrixWithAllocationPriceDimensionalPriceConfiguration", "TieredWithProrationPrice", "TieredWithProrationPriceBillableMetric", "TieredWithProrationPriceBillingCycleConfiguration", "TieredWithProrationPriceCreditAllocation", + "TieredWithProrationPriceCreditAllocationCustomExpiration", "TieredWithProrationPriceInvoicingCycleConfiguration", "TieredWithProrationPriceItem", "TieredWithProrationPriceMaximum", + "TieredWithProrationPriceMaximumFilter", "TieredWithProrationPriceMinimum", + "TieredWithProrationPriceMinimumFilter", "TieredWithProrationPriceDimensionalPriceConfiguration", "UnitWithProrationPrice", "UnitWithProrationPriceBillableMetric", "UnitWithProrationPriceBillingCycleConfiguration", "UnitWithProrationPriceCreditAllocation", + "UnitWithProrationPriceCreditAllocationCustomExpiration", "UnitWithProrationPriceInvoicingCycleConfiguration", "UnitWithProrationPriceItem", "UnitWithProrationPriceMaximum", + "UnitWithProrationPriceMaximumFilter", "UnitWithProrationPriceMinimum", + "UnitWithProrationPriceMinimumFilter", "UnitWithProrationPriceDimensionalPriceConfiguration", "GroupedAllocationPrice", "GroupedAllocationPriceBillableMetric", "GroupedAllocationPriceBillingCycleConfiguration", "GroupedAllocationPriceCreditAllocation", + "GroupedAllocationPriceCreditAllocationCustomExpiration", "GroupedAllocationPriceInvoicingCycleConfiguration", "GroupedAllocationPriceItem", "GroupedAllocationPriceMaximum", + "GroupedAllocationPriceMaximumFilter", "GroupedAllocationPriceMinimum", + "GroupedAllocationPriceMinimumFilter", "GroupedAllocationPriceDimensionalPriceConfiguration", "GroupedWithProratedMinimumPrice", "GroupedWithProratedMinimumPriceBillableMetric", "GroupedWithProratedMinimumPriceBillingCycleConfiguration", "GroupedWithProratedMinimumPriceCreditAllocation", + "GroupedWithProratedMinimumPriceCreditAllocationCustomExpiration", "GroupedWithProratedMinimumPriceInvoicingCycleConfiguration", "GroupedWithProratedMinimumPriceItem", "GroupedWithProratedMinimumPriceMaximum", + "GroupedWithProratedMinimumPriceMaximumFilter", "GroupedWithProratedMinimumPriceMinimum", + "GroupedWithProratedMinimumPriceMinimumFilter", "GroupedWithProratedMinimumPriceDimensionalPriceConfiguration", "GroupedWithMeteredMinimumPrice", "GroupedWithMeteredMinimumPriceBillableMetric", "GroupedWithMeteredMinimumPriceBillingCycleConfiguration", "GroupedWithMeteredMinimumPriceCreditAllocation", + "GroupedWithMeteredMinimumPriceCreditAllocationCustomExpiration", "GroupedWithMeteredMinimumPriceInvoicingCycleConfiguration", "GroupedWithMeteredMinimumPriceItem", "GroupedWithMeteredMinimumPriceMaximum", + "GroupedWithMeteredMinimumPriceMaximumFilter", "GroupedWithMeteredMinimumPriceMinimum", + "GroupedWithMeteredMinimumPriceMinimumFilter", "GroupedWithMeteredMinimumPriceDimensionalPriceConfiguration", "MatrixWithDisplayNamePrice", "MatrixWithDisplayNamePriceBillableMetric", "MatrixWithDisplayNamePriceBillingCycleConfiguration", "MatrixWithDisplayNamePriceCreditAllocation", + "MatrixWithDisplayNamePriceCreditAllocationCustomExpiration", "MatrixWithDisplayNamePriceInvoicingCycleConfiguration", "MatrixWithDisplayNamePriceItem", "MatrixWithDisplayNamePriceMaximum", + "MatrixWithDisplayNamePriceMaximumFilter", "MatrixWithDisplayNamePriceMinimum", + "MatrixWithDisplayNamePriceMinimumFilter", "MatrixWithDisplayNamePriceDimensionalPriceConfiguration", "BulkWithProrationPrice", "BulkWithProrationPriceBillableMetric", "BulkWithProrationPriceBillingCycleConfiguration", "BulkWithProrationPriceCreditAllocation", + "BulkWithProrationPriceCreditAllocationCustomExpiration", "BulkWithProrationPriceInvoicingCycleConfiguration", "BulkWithProrationPriceItem", "BulkWithProrationPriceMaximum", + "BulkWithProrationPriceMaximumFilter", "BulkWithProrationPriceMinimum", + "BulkWithProrationPriceMinimumFilter", "BulkWithProrationPriceDimensionalPriceConfiguration", "GroupedTieredPackagePrice", "GroupedTieredPackagePriceBillableMetric", "GroupedTieredPackagePriceBillingCycleConfiguration", "GroupedTieredPackagePriceCreditAllocation", + "GroupedTieredPackagePriceCreditAllocationCustomExpiration", "GroupedTieredPackagePriceInvoicingCycleConfiguration", "GroupedTieredPackagePriceItem", "GroupedTieredPackagePriceMaximum", + "GroupedTieredPackagePriceMaximumFilter", "GroupedTieredPackagePriceMinimum", + "GroupedTieredPackagePriceMinimumFilter", "GroupedTieredPackagePriceDimensionalPriceConfiguration", "MaxGroupTieredPackagePrice", "MaxGroupTieredPackagePriceBillableMetric", "MaxGroupTieredPackagePriceBillingCycleConfiguration", "MaxGroupTieredPackagePriceCreditAllocation", + "MaxGroupTieredPackagePriceCreditAllocationCustomExpiration", "MaxGroupTieredPackagePriceInvoicingCycleConfiguration", "MaxGroupTieredPackagePriceItem", "MaxGroupTieredPackagePriceMaximum", + "MaxGroupTieredPackagePriceMaximumFilter", "MaxGroupTieredPackagePriceMinimum", + "MaxGroupTieredPackagePriceMinimumFilter", "MaxGroupTieredPackagePriceDimensionalPriceConfiguration", "ScalableMatrixWithUnitPricingPrice", "ScalableMatrixWithUnitPricingPriceBillableMetric", "ScalableMatrixWithUnitPricingPriceBillingCycleConfiguration", "ScalableMatrixWithUnitPricingPriceCreditAllocation", + "ScalableMatrixWithUnitPricingPriceCreditAllocationCustomExpiration", "ScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration", "ScalableMatrixWithUnitPricingPriceItem", "ScalableMatrixWithUnitPricingPriceMaximum", + "ScalableMatrixWithUnitPricingPriceMaximumFilter", "ScalableMatrixWithUnitPricingPriceMinimum", + "ScalableMatrixWithUnitPricingPriceMinimumFilter", "ScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration", "ScalableMatrixWithTieredPricingPrice", "ScalableMatrixWithTieredPricingPriceBillableMetric", "ScalableMatrixWithTieredPricingPriceBillingCycleConfiguration", "ScalableMatrixWithTieredPricingPriceCreditAllocation", + "ScalableMatrixWithTieredPricingPriceCreditAllocationCustomExpiration", "ScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration", "ScalableMatrixWithTieredPricingPriceItem", "ScalableMatrixWithTieredPricingPriceMaximum", + "ScalableMatrixWithTieredPricingPriceMaximumFilter", "ScalableMatrixWithTieredPricingPriceMinimum", + "ScalableMatrixWithTieredPricingPriceMinimumFilter", "ScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration", "CumulativeGroupedBulkPrice", "CumulativeGroupedBulkPriceBillableMetric", "CumulativeGroupedBulkPriceBillingCycleConfiguration", "CumulativeGroupedBulkPriceCreditAllocation", + "CumulativeGroupedBulkPriceCreditAllocationCustomExpiration", "CumulativeGroupedBulkPriceInvoicingCycleConfiguration", "CumulativeGroupedBulkPriceItem", "CumulativeGroupedBulkPriceMaximum", + "CumulativeGroupedBulkPriceMaximumFilter", "CumulativeGroupedBulkPriceMinimum", + "CumulativeGroupedBulkPriceMinimumFilter", "CumulativeGroupedBulkPriceDimensionalPriceConfiguration", ] @@ -292,11 +376,19 @@ class UnitPriceBillingCycleConfiguration(BaseModel): duration_unit: Literal["day", "month"] +class UnitPriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class UnitPriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[UnitPriceCreditAllocationCustomExpiration] = None + class UnitPriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -310,6 +402,17 @@ class UnitPriceItem(BaseModel): name: str +class UnitPriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class UnitPriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -317,10 +420,24 @@ class UnitPriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[UnitPriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class UnitPriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class UnitPriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -328,6 +445,9 @@ class UnitPriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[UnitPriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -409,11 +529,19 @@ class PackagePriceBillingCycleConfiguration(BaseModel): duration_unit: Literal["day", "month"] +class PackagePriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class PackagePriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[PackagePriceCreditAllocationCustomExpiration] = None + class PackagePriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -427,6 +555,17 @@ class PackagePriceItem(BaseModel): name: str +class PackagePriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class PackagePriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -434,10 +573,24 @@ class PackagePriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[PackagePriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class PackagePriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class PackagePriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -445,6 +598,9 @@ class PackagePriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[PackagePriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -533,11 +689,19 @@ class MatrixPriceBillingCycleConfiguration(BaseModel): duration_unit: Literal["day", "month"] +class MatrixPriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class MatrixPriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[MatrixPriceCreditAllocationCustomExpiration] = None + class MatrixPriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -574,6 +738,17 @@ class MatrixPriceMatrixConfig(BaseModel): """Matrix values for specified matrix grouping keys""" +class MatrixPriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class MatrixPriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -581,10 +756,24 @@ class MatrixPriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[MatrixPriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class MatrixPriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class MatrixPriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -592,6 +781,9 @@ class MatrixPriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[MatrixPriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -668,11 +860,19 @@ class TieredPriceBillingCycleConfiguration(BaseModel): duration_unit: Literal["day", "month"] +class TieredPriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class TieredPriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[TieredPriceCreditAllocationCustomExpiration] = None + class TieredPriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -686,6 +886,17 @@ class TieredPriceItem(BaseModel): name: str +class TieredPriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class TieredPriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -693,10 +904,24 @@ class TieredPriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[TieredPriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class TieredPriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class TieredPriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -704,6 +929,9 @@ class TieredPriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[TieredPriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -796,11 +1024,19 @@ class TieredBpsPriceBillingCycleConfiguration(BaseModel): duration_unit: Literal["day", "month"] +class TieredBpsPriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class TieredBpsPriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[TieredBpsPriceCreditAllocationCustomExpiration] = None + class TieredBpsPriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -814,6 +1050,17 @@ class TieredBpsPriceItem(BaseModel): name: str +class TieredBpsPriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class TieredBpsPriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -821,10 +1068,24 @@ class TieredBpsPriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[TieredBpsPriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class TieredBpsPriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class TieredBpsPriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -832,6 +1093,9 @@ class TieredBpsPriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[TieredBpsPriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -938,11 +1202,19 @@ class BpsPriceBpsConfig(BaseModel): """Optional currency amount maximum to cap spend per event""" +class BpsPriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class BpsPriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[BpsPriceCreditAllocationCustomExpiration] = None + class BpsPriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -956,6 +1228,17 @@ class BpsPriceItem(BaseModel): name: str +class BpsPriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class BpsPriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -963,10 +1246,24 @@ class BpsPriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[BpsPriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class BpsPriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class BpsPriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -974,6 +1271,9 @@ class BpsPriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[BpsPriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -1069,11 +1369,19 @@ class BulkBpsPriceBulkBpsConfig(BaseModel): """ +class BulkBpsPriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class BulkBpsPriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[BulkBpsPriceCreditAllocationCustomExpiration] = None + class BulkBpsPriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -1087,6 +1395,17 @@ class BulkBpsPriceItem(BaseModel): name: str +class BulkBpsPriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class BulkBpsPriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -1094,10 +1413,24 @@ class BulkBpsPriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[BulkBpsPriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class BulkBpsPriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class BulkBpsPriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -1105,6 +1438,9 @@ class BulkBpsPriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[BulkBpsPriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -1194,11 +1530,19 @@ class BulkPriceBulkConfig(BaseModel): """Bulk tiers for rating based on total usage volume""" +class BulkPriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class BulkPriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[BulkPriceCreditAllocationCustomExpiration] = None + class BulkPriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -1212,6 +1556,17 @@ class BulkPriceItem(BaseModel): name: str +class BulkPriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class BulkPriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -1219,10 +1574,24 @@ class BulkPriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[BulkPriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class BulkPriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class BulkPriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -1230,6 +1599,9 @@ class BulkPriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[BulkPriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -1306,11 +1678,19 @@ class ThresholdTotalAmountPriceBillingCycleConfiguration(BaseModel): duration_unit: Literal["day", "month"] +class ThresholdTotalAmountPriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class ThresholdTotalAmountPriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[ThresholdTotalAmountPriceCreditAllocationCustomExpiration] = None + class ThresholdTotalAmountPriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -1324,6 +1704,17 @@ class ThresholdTotalAmountPriceItem(BaseModel): name: str +class ThresholdTotalAmountPriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class ThresholdTotalAmountPriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -1331,10 +1722,24 @@ class ThresholdTotalAmountPriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[ThresholdTotalAmountPriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class ThresholdTotalAmountPriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class ThresholdTotalAmountPriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -1342,6 +1747,9 @@ class ThresholdTotalAmountPriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[ThresholdTotalAmountPriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -1418,11 +1826,19 @@ class TieredPackagePriceBillingCycleConfiguration(BaseModel): duration_unit: Literal["day", "month"] +class TieredPackagePriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class TieredPackagePriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[TieredPackagePriceCreditAllocationCustomExpiration] = None + class TieredPackagePriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -1436,6 +1852,17 @@ class TieredPackagePriceItem(BaseModel): name: str +class TieredPackagePriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class TieredPackagePriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -1443,10 +1870,24 @@ class TieredPackagePriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[TieredPackagePriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class TieredPackagePriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class TieredPackagePriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -1454,6 +1895,9 @@ class TieredPackagePriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[TieredPackagePriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -1530,11 +1974,19 @@ class GroupedTieredPriceBillingCycleConfiguration(BaseModel): duration_unit: Literal["day", "month"] +class GroupedTieredPriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class GroupedTieredPriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[GroupedTieredPriceCreditAllocationCustomExpiration] = None + class GroupedTieredPriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -1548,6 +2000,17 @@ class GroupedTieredPriceItem(BaseModel): name: str +class GroupedTieredPriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class GroupedTieredPriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -1555,10 +2018,24 @@ class GroupedTieredPriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[GroupedTieredPriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class GroupedTieredPriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class GroupedTieredPriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -1566,6 +2043,9 @@ class GroupedTieredPriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[GroupedTieredPriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -1642,11 +2122,19 @@ class TieredWithMinimumPriceBillingCycleConfiguration(BaseModel): duration_unit: Literal["day", "month"] +class TieredWithMinimumPriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class TieredWithMinimumPriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[TieredWithMinimumPriceCreditAllocationCustomExpiration] = None + class TieredWithMinimumPriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -1660,6 +2148,17 @@ class TieredWithMinimumPriceItem(BaseModel): name: str +class TieredWithMinimumPriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class TieredWithMinimumPriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -1667,10 +2166,24 @@ class TieredWithMinimumPriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[TieredWithMinimumPriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class TieredWithMinimumPriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class TieredWithMinimumPriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -1678,6 +2191,9 @@ class TieredWithMinimumPriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[TieredWithMinimumPriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -1754,11 +2270,19 @@ class TieredPackageWithMinimumPriceBillingCycleConfiguration(BaseModel): duration_unit: Literal["day", "month"] +class TieredPackageWithMinimumPriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class TieredPackageWithMinimumPriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[TieredPackageWithMinimumPriceCreditAllocationCustomExpiration] = None + class TieredPackageWithMinimumPriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -1772,6 +2296,17 @@ class TieredPackageWithMinimumPriceItem(BaseModel): name: str +class TieredPackageWithMinimumPriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class TieredPackageWithMinimumPriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -1779,10 +2314,24 @@ class TieredPackageWithMinimumPriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[TieredPackageWithMinimumPriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class TieredPackageWithMinimumPriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class TieredPackageWithMinimumPriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -1790,6 +2339,9 @@ class TieredPackageWithMinimumPriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[TieredPackageWithMinimumPriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -1866,11 +2418,19 @@ class PackageWithAllocationPriceBillingCycleConfiguration(BaseModel): duration_unit: Literal["day", "month"] +class PackageWithAllocationPriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class PackageWithAllocationPriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[PackageWithAllocationPriceCreditAllocationCustomExpiration] = None + class PackageWithAllocationPriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -1884,6 +2444,17 @@ class PackageWithAllocationPriceItem(BaseModel): name: str +class PackageWithAllocationPriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class PackageWithAllocationPriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -1891,10 +2462,24 @@ class PackageWithAllocationPriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[PackageWithAllocationPriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class PackageWithAllocationPriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class PackageWithAllocationPriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -1902,6 +2487,9 @@ class PackageWithAllocationPriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[PackageWithAllocationPriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -1978,11 +2566,19 @@ class UnitWithPercentPriceBillingCycleConfiguration(BaseModel): duration_unit: Literal["day", "month"] +class UnitWithPercentPriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class UnitWithPercentPriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[UnitWithPercentPriceCreditAllocationCustomExpiration] = None + class UnitWithPercentPriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -1996,6 +2592,17 @@ class UnitWithPercentPriceItem(BaseModel): name: str +class UnitWithPercentPriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class UnitWithPercentPriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -2003,10 +2610,24 @@ class UnitWithPercentPriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[UnitWithPercentPriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class UnitWithPercentPriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class UnitWithPercentPriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -2014,6 +2635,9 @@ class UnitWithPercentPriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[UnitWithPercentPriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -2090,11 +2714,19 @@ class MatrixWithAllocationPriceBillingCycleConfiguration(BaseModel): duration_unit: Literal["day", "month"] +class MatrixWithAllocationPriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class MatrixWithAllocationPriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[MatrixWithAllocationPriceCreditAllocationCustomExpiration] = None + class MatrixWithAllocationPriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -2134,6 +2766,17 @@ class MatrixWithAllocationPriceMatrixWithAllocationConfig(BaseModel): """Matrix values for specified matrix grouping keys""" +class MatrixWithAllocationPriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class MatrixWithAllocationPriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -2141,10 +2784,24 @@ class MatrixWithAllocationPriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[MatrixWithAllocationPriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class MatrixWithAllocationPriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class MatrixWithAllocationPriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -2152,6 +2809,9 @@ class MatrixWithAllocationPriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[MatrixWithAllocationPriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -2228,11 +2888,19 @@ class TieredWithProrationPriceBillingCycleConfiguration(BaseModel): duration_unit: Literal["day", "month"] +class TieredWithProrationPriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class TieredWithProrationPriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[TieredWithProrationPriceCreditAllocationCustomExpiration] = None + class TieredWithProrationPriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -2246,6 +2914,17 @@ class TieredWithProrationPriceItem(BaseModel): name: str +class TieredWithProrationPriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class TieredWithProrationPriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -2253,10 +2932,24 @@ class TieredWithProrationPriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[TieredWithProrationPriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class TieredWithProrationPriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class TieredWithProrationPriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -2264,6 +2957,9 @@ class TieredWithProrationPriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[TieredWithProrationPriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -2340,11 +3036,19 @@ class UnitWithProrationPriceBillingCycleConfiguration(BaseModel): duration_unit: Literal["day", "month"] +class UnitWithProrationPriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class UnitWithProrationPriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[UnitWithProrationPriceCreditAllocationCustomExpiration] = None + class UnitWithProrationPriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -2358,6 +3062,17 @@ class UnitWithProrationPriceItem(BaseModel): name: str +class UnitWithProrationPriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class UnitWithProrationPriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -2365,10 +3080,24 @@ class UnitWithProrationPriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[UnitWithProrationPriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class UnitWithProrationPriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class UnitWithProrationPriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -2376,6 +3105,9 @@ class UnitWithProrationPriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[UnitWithProrationPriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -2452,11 +3184,19 @@ class GroupedAllocationPriceBillingCycleConfiguration(BaseModel): duration_unit: Literal["day", "month"] +class GroupedAllocationPriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class GroupedAllocationPriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[GroupedAllocationPriceCreditAllocationCustomExpiration] = None + class GroupedAllocationPriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -2470,6 +3210,17 @@ class GroupedAllocationPriceItem(BaseModel): name: str +class GroupedAllocationPriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class GroupedAllocationPriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -2477,10 +3228,24 @@ class GroupedAllocationPriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[GroupedAllocationPriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class GroupedAllocationPriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class GroupedAllocationPriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -2488,6 +3253,9 @@ class GroupedAllocationPriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[GroupedAllocationPriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -2564,11 +3332,19 @@ class GroupedWithProratedMinimumPriceBillingCycleConfiguration(BaseModel): duration_unit: Literal["day", "month"] +class GroupedWithProratedMinimumPriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class GroupedWithProratedMinimumPriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[GroupedWithProratedMinimumPriceCreditAllocationCustomExpiration] = None + class GroupedWithProratedMinimumPriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -2582,6 +3358,17 @@ class GroupedWithProratedMinimumPriceItem(BaseModel): name: str +class GroupedWithProratedMinimumPriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class GroupedWithProratedMinimumPriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -2589,10 +3376,24 @@ class GroupedWithProratedMinimumPriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[GroupedWithProratedMinimumPriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class GroupedWithProratedMinimumPriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class GroupedWithProratedMinimumPriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -2600,6 +3401,9 @@ class GroupedWithProratedMinimumPriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[GroupedWithProratedMinimumPriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -2676,11 +3480,19 @@ class GroupedWithMeteredMinimumPriceBillingCycleConfiguration(BaseModel): duration_unit: Literal["day", "month"] +class GroupedWithMeteredMinimumPriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class GroupedWithMeteredMinimumPriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[GroupedWithMeteredMinimumPriceCreditAllocationCustomExpiration] = None + class GroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -2694,6 +3506,17 @@ class GroupedWithMeteredMinimumPriceItem(BaseModel): name: str +class GroupedWithMeteredMinimumPriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class GroupedWithMeteredMinimumPriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -2701,10 +3524,24 @@ class GroupedWithMeteredMinimumPriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[GroupedWithMeteredMinimumPriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class GroupedWithMeteredMinimumPriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class GroupedWithMeteredMinimumPriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -2712,6 +3549,9 @@ class GroupedWithMeteredMinimumPriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[GroupedWithMeteredMinimumPriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -2788,11 +3628,19 @@ class MatrixWithDisplayNamePriceBillingCycleConfiguration(BaseModel): duration_unit: Literal["day", "month"] +class MatrixWithDisplayNamePriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class MatrixWithDisplayNamePriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[MatrixWithDisplayNamePriceCreditAllocationCustomExpiration] = None + class MatrixWithDisplayNamePriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -2806,6 +3654,17 @@ class MatrixWithDisplayNamePriceItem(BaseModel): name: str +class MatrixWithDisplayNamePriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class MatrixWithDisplayNamePriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -2813,10 +3672,24 @@ class MatrixWithDisplayNamePriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[MatrixWithDisplayNamePriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class MatrixWithDisplayNamePriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class MatrixWithDisplayNamePriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -2824,6 +3697,9 @@ class MatrixWithDisplayNamePriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[MatrixWithDisplayNamePriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -2900,11 +3776,19 @@ class BulkWithProrationPriceBillingCycleConfiguration(BaseModel): duration_unit: Literal["day", "month"] +class BulkWithProrationPriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class BulkWithProrationPriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[BulkWithProrationPriceCreditAllocationCustomExpiration] = None + class BulkWithProrationPriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -2918,6 +3802,17 @@ class BulkWithProrationPriceItem(BaseModel): name: str +class BulkWithProrationPriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class BulkWithProrationPriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -2925,10 +3820,24 @@ class BulkWithProrationPriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[BulkWithProrationPriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class BulkWithProrationPriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class BulkWithProrationPriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -2936,6 +3845,9 @@ class BulkWithProrationPriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[BulkWithProrationPriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -3012,11 +3924,19 @@ class GroupedTieredPackagePriceBillingCycleConfiguration(BaseModel): duration_unit: Literal["day", "month"] +class GroupedTieredPackagePriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class GroupedTieredPackagePriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[GroupedTieredPackagePriceCreditAllocationCustomExpiration] = None + class GroupedTieredPackagePriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -3030,6 +3950,17 @@ class GroupedTieredPackagePriceItem(BaseModel): name: str +class GroupedTieredPackagePriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class GroupedTieredPackagePriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -3037,10 +3968,24 @@ class GroupedTieredPackagePriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[GroupedTieredPackagePriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class GroupedTieredPackagePriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class GroupedTieredPackagePriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -3048,6 +3993,9 @@ class GroupedTieredPackagePriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[GroupedTieredPackagePriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -3124,11 +4072,19 @@ class MaxGroupTieredPackagePriceBillingCycleConfiguration(BaseModel): duration_unit: Literal["day", "month"] +class MaxGroupTieredPackagePriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class MaxGroupTieredPackagePriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[MaxGroupTieredPackagePriceCreditAllocationCustomExpiration] = None + class MaxGroupTieredPackagePriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -3142,6 +4098,17 @@ class MaxGroupTieredPackagePriceItem(BaseModel): name: str +class MaxGroupTieredPackagePriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class MaxGroupTieredPackagePriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -3149,10 +4116,24 @@ class MaxGroupTieredPackagePriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[MaxGroupTieredPackagePriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class MaxGroupTieredPackagePriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class MaxGroupTieredPackagePriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -3160,6 +4141,9 @@ class MaxGroupTieredPackagePriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[MaxGroupTieredPackagePriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -3236,11 +4220,19 @@ class ScalableMatrixWithUnitPricingPriceBillingCycleConfiguration(BaseModel): duration_unit: Literal["day", "month"] +class ScalableMatrixWithUnitPricingPriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class ScalableMatrixWithUnitPricingPriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[ScalableMatrixWithUnitPricingPriceCreditAllocationCustomExpiration] = None + class ScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -3254,6 +4246,17 @@ class ScalableMatrixWithUnitPricingPriceItem(BaseModel): name: str +class ScalableMatrixWithUnitPricingPriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class ScalableMatrixWithUnitPricingPriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -3261,10 +4264,24 @@ class ScalableMatrixWithUnitPricingPriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[ScalableMatrixWithUnitPricingPriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class ScalableMatrixWithUnitPricingPriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class ScalableMatrixWithUnitPricingPriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -3272,6 +4289,9 @@ class ScalableMatrixWithUnitPricingPriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[ScalableMatrixWithUnitPricingPriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -3348,11 +4368,19 @@ class ScalableMatrixWithTieredPricingPriceBillingCycleConfiguration(BaseModel): duration_unit: Literal["day", "month"] +class ScalableMatrixWithTieredPricingPriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class ScalableMatrixWithTieredPricingPriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[ScalableMatrixWithTieredPricingPriceCreditAllocationCustomExpiration] = None + class ScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -3366,6 +4394,17 @@ class ScalableMatrixWithTieredPricingPriceItem(BaseModel): name: str +class ScalableMatrixWithTieredPricingPriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class ScalableMatrixWithTieredPricingPriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -3373,10 +4412,24 @@ class ScalableMatrixWithTieredPricingPriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[ScalableMatrixWithTieredPricingPriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class ScalableMatrixWithTieredPricingPriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class ScalableMatrixWithTieredPricingPriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -3384,6 +4437,9 @@ class ScalableMatrixWithTieredPricingPriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[ScalableMatrixWithTieredPricingPriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" @@ -3460,11 +4516,19 @@ class CumulativeGroupedBulkPriceBillingCycleConfiguration(BaseModel): duration_unit: Literal["day", "month"] +class CumulativeGroupedBulkPriceCreditAllocationCustomExpiration(BaseModel): + duration: int + + duration_unit: Literal["day", "month"] + + class CumulativeGroupedBulkPriceCreditAllocation(BaseModel): allows_rollover: bool currency: str + custom_expiration: Optional[CumulativeGroupedBulkPriceCreditAllocationCustomExpiration] = None + class CumulativeGroupedBulkPriceInvoicingCycleConfiguration(BaseModel): duration: int @@ -3478,6 +4542,17 @@ class CumulativeGroupedBulkPriceItem(BaseModel): name: str +class CumulativeGroupedBulkPriceMaximumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class CumulativeGroupedBulkPriceMaximum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this maximum amount applies to. @@ -3485,10 +4560,24 @@ class CumulativeGroupedBulkPriceMaximum(BaseModel): For plan/plan phase maximums, this can be a subset of prices. """ + filters: List[CumulativeGroupedBulkPriceMaximumFilter] + """The filters that determine which prices to apply this maximum to.""" + maximum_amount: str """Maximum amount applied""" +class CumulativeGroupedBulkPriceMinimumFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class CumulativeGroupedBulkPriceMinimum(BaseModel): applies_to_price_ids: List[str] """List of price_ids that this minimum amount applies to. @@ -3496,6 +4585,9 @@ class CumulativeGroupedBulkPriceMinimum(BaseModel): For plan/plan phase minimums, this can be a subset of prices. """ + filters: List[CumulativeGroupedBulkPriceMinimumFilter] + """The filters that determine which prices to apply this minimum to.""" + minimum_amount: str """Minimum amount applied""" diff --git a/src/orb/types/price_create_params.py b/src/orb/types/price_create_params.py index 9116a686..29a63d61 100644 --- a/src/orb/types/price_create_params.py +++ b/src/orb/types/price_create_params.py @@ -10,101 +10,129 @@ "NewFloatingUnitPrice", "NewFloatingUnitPriceUnitConfig", "NewFloatingUnitPriceBillingCycleConfiguration", + "NewFloatingUnitPriceDimensionalPriceConfiguration", "NewFloatingUnitPriceInvoicingCycleConfiguration", "NewFloatingPackagePrice", "NewFloatingPackagePricePackageConfig", "NewFloatingPackagePriceBillingCycleConfiguration", + "NewFloatingPackagePriceDimensionalPriceConfiguration", "NewFloatingPackagePriceInvoicingCycleConfiguration", "NewFloatingMatrixPrice", "NewFloatingMatrixPriceMatrixConfig", "NewFloatingMatrixPriceMatrixConfigMatrixValue", "NewFloatingMatrixPriceBillingCycleConfiguration", + "NewFloatingMatrixPriceDimensionalPriceConfiguration", "NewFloatingMatrixPriceInvoicingCycleConfiguration", "NewFloatingMatrixWithAllocationPrice", "NewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig", "NewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue", "NewFloatingMatrixWithAllocationPriceBillingCycleConfiguration", + "NewFloatingMatrixWithAllocationPriceDimensionalPriceConfiguration", "NewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration", "NewFloatingTieredPrice", "NewFloatingTieredPriceTieredConfig", "NewFloatingTieredPriceTieredConfigTier", "NewFloatingTieredPriceBillingCycleConfiguration", + "NewFloatingTieredPriceDimensionalPriceConfiguration", "NewFloatingTieredPriceInvoicingCycleConfiguration", "NewFloatingTieredBpsPrice", "NewFloatingTieredBpsPriceTieredBpsConfig", "NewFloatingTieredBpsPriceTieredBpsConfigTier", "NewFloatingTieredBpsPriceBillingCycleConfiguration", + "NewFloatingTieredBpsPriceDimensionalPriceConfiguration", "NewFloatingTieredBpsPriceInvoicingCycleConfiguration", "NewFloatingBpsPrice", "NewFloatingBpsPriceBpsConfig", "NewFloatingBpsPriceBillingCycleConfiguration", + "NewFloatingBpsPriceDimensionalPriceConfiguration", "NewFloatingBpsPriceInvoicingCycleConfiguration", "NewFloatingBulkBpsPrice", "NewFloatingBulkBpsPriceBulkBpsConfig", "NewFloatingBulkBpsPriceBulkBpsConfigTier", "NewFloatingBulkBpsPriceBillingCycleConfiguration", + "NewFloatingBulkBpsPriceDimensionalPriceConfiguration", "NewFloatingBulkBpsPriceInvoicingCycleConfiguration", "NewFloatingBulkPrice", "NewFloatingBulkPriceBulkConfig", "NewFloatingBulkPriceBulkConfigTier", "NewFloatingBulkPriceBillingCycleConfiguration", + "NewFloatingBulkPriceDimensionalPriceConfiguration", "NewFloatingBulkPriceInvoicingCycleConfiguration", "NewFloatingThresholdTotalAmountPrice", "NewFloatingThresholdTotalAmountPriceBillingCycleConfiguration", + "NewFloatingThresholdTotalAmountPriceDimensionalPriceConfiguration", "NewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration", "NewFloatingTieredPackagePrice", "NewFloatingTieredPackagePriceBillingCycleConfiguration", + "NewFloatingTieredPackagePriceDimensionalPriceConfiguration", "NewFloatingTieredPackagePriceInvoicingCycleConfiguration", "NewFloatingGroupedTieredPrice", "NewFloatingGroupedTieredPriceBillingCycleConfiguration", + "NewFloatingGroupedTieredPriceDimensionalPriceConfiguration", "NewFloatingGroupedTieredPriceInvoicingCycleConfiguration", "NewFloatingMaxGroupTieredPackagePrice", "NewFloatingMaxGroupTieredPackagePriceBillingCycleConfiguration", + "NewFloatingMaxGroupTieredPackagePriceDimensionalPriceConfiguration", "NewFloatingMaxGroupTieredPackagePriceInvoicingCycleConfiguration", "NewFloatingTieredWithMinimumPrice", "NewFloatingTieredWithMinimumPriceBillingCycleConfiguration", + "NewFloatingTieredWithMinimumPriceDimensionalPriceConfiguration", "NewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration", "NewFloatingPackageWithAllocationPrice", "NewFloatingPackageWithAllocationPriceBillingCycleConfiguration", + "NewFloatingPackageWithAllocationPriceDimensionalPriceConfiguration", "NewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration", "NewFloatingTieredPackageWithMinimumPrice", "NewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration", + "NewFloatingTieredPackageWithMinimumPriceDimensionalPriceConfiguration", "NewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration", "NewFloatingUnitWithPercentPrice", "NewFloatingUnitWithPercentPriceBillingCycleConfiguration", + "NewFloatingUnitWithPercentPriceDimensionalPriceConfiguration", "NewFloatingUnitWithPercentPriceInvoicingCycleConfiguration", "NewFloatingTieredWithProrationPrice", "NewFloatingTieredWithProrationPriceBillingCycleConfiguration", + "NewFloatingTieredWithProrationPriceDimensionalPriceConfiguration", "NewFloatingTieredWithProrationPriceInvoicingCycleConfiguration", "NewFloatingUnitWithProrationPrice", "NewFloatingUnitWithProrationPriceBillingCycleConfiguration", + "NewFloatingUnitWithProrationPriceDimensionalPriceConfiguration", "NewFloatingUnitWithProrationPriceInvoicingCycleConfiguration", "NewFloatingGroupedAllocationPrice", "NewFloatingGroupedAllocationPriceBillingCycleConfiguration", + "NewFloatingGroupedAllocationPriceDimensionalPriceConfiguration", "NewFloatingGroupedAllocationPriceInvoicingCycleConfiguration", "NewFloatingGroupedWithProratedMinimumPrice", "NewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration", + "NewFloatingGroupedWithProratedMinimumPriceDimensionalPriceConfiguration", "NewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration", "NewFloatingGroupedWithMeteredMinimumPrice", "NewFloatingGroupedWithMeteredMinimumPriceBillingCycleConfiguration", + "NewFloatingGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration", "NewFloatingGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration", "NewFloatingMatrixWithDisplayNamePrice", "NewFloatingMatrixWithDisplayNamePriceBillingCycleConfiguration", + "NewFloatingMatrixWithDisplayNamePriceDimensionalPriceConfiguration", "NewFloatingMatrixWithDisplayNamePriceInvoicingCycleConfiguration", "NewFloatingBulkWithProrationPrice", "NewFloatingBulkWithProrationPriceBillingCycleConfiguration", + "NewFloatingBulkWithProrationPriceDimensionalPriceConfiguration", "NewFloatingBulkWithProrationPriceInvoicingCycleConfiguration", "NewFloatingGroupedTieredPackagePrice", "NewFloatingGroupedTieredPackagePriceBillingCycleConfiguration", + "NewFloatingGroupedTieredPackagePriceDimensionalPriceConfiguration", "NewFloatingGroupedTieredPackagePriceInvoicingCycleConfiguration", "NewFloatingScalableMatrixWithUnitPricingPrice", "NewFloatingScalableMatrixWithUnitPricingPriceBillingCycleConfiguration", + "NewFloatingScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration", "NewFloatingScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration", "NewFloatingScalableMatrixWithTieredPricingPrice", "NewFloatingScalableMatrixWithTieredPricingPriceBillingCycleConfiguration", + "NewFloatingScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration", "NewFloatingScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration", "NewFloatingCumulativeGroupedBulkPrice", "NewFloatingCumulativeGroupedBulkPriceBillingCycleConfiguration", + "NewFloatingCumulativeGroupedBulkPriceDimensionalPriceConfiguration", "NewFloatingCumulativeGroupedBulkPriceInvoicingCycleConfiguration", ] @@ -147,6 +175,9 @@ class NewFloatingUnitPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingUnitPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -186,6 +217,20 @@ class NewFloatingUnitPriceBillingCycleConfiguration(TypedDict, total=False): """The unit of billing period duration.""" +class NewFloatingUnitPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingUnitPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -232,6 +277,9 @@ class NewFloatingPackagePrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingPackagePriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -278,6 +326,20 @@ class NewFloatingPackagePriceBillingCycleConfiguration(TypedDict, total=False): """The unit of billing period duration.""" +class NewFloatingPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -324,6 +386,9 @@ class NewFloatingMatrixPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingMatrixPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -381,6 +446,20 @@ class NewFloatingMatrixPriceBillingCycleConfiguration(TypedDict, total=False): """The unit of billing period duration.""" +class NewFloatingMatrixPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -427,6 +506,9 @@ class NewFloatingMatrixWithAllocationPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingMatrixWithAllocationPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -487,6 +569,20 @@ class NewFloatingMatrixWithAllocationPriceBillingCycleConfiguration(TypedDict, t """The unit of billing period duration.""" +class NewFloatingMatrixWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -533,6 +629,9 @@ class NewFloatingTieredPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingTieredPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -583,6 +682,20 @@ class NewFloatingTieredPriceBillingCycleConfiguration(TypedDict, total=False): """The unit of billing period duration.""" +class NewFloatingTieredPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -629,6 +742,9 @@ class NewFloatingTieredBpsPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingTieredBpsPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -685,6 +801,20 @@ class NewFloatingTieredBpsPriceBillingCycleConfiguration(TypedDict, total=False) """The unit of billing period duration.""" +class NewFloatingTieredBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -731,6 +861,9 @@ class NewFloatingBpsPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingBpsPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -773,6 +906,20 @@ class NewFloatingBpsPriceBillingCycleConfiguration(TypedDict, total=False): """The unit of billing period duration.""" +class NewFloatingBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -819,6 +966,9 @@ class NewFloatingBulkBpsPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingBulkBpsPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -872,6 +1022,20 @@ class NewFloatingBulkBpsPriceBillingCycleConfiguration(TypedDict, total=False): """The unit of billing period duration.""" +class NewFloatingBulkBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -918,6 +1082,9 @@ class NewFloatingBulkPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingBulkPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -965,6 +1132,20 @@ class NewFloatingBulkPriceBillingCycleConfiguration(TypedDict, total=False): """The unit of billing period duration.""" +class NewFloatingBulkPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1011,6 +1192,9 @@ class NewFloatingThresholdTotalAmountPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingThresholdTotalAmountPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1045,6 +1229,20 @@ class NewFloatingThresholdTotalAmountPriceBillingCycleConfiguration(TypedDict, t """The unit of billing period duration.""" +class NewFloatingThresholdTotalAmountPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1091,6 +1289,9 @@ class NewFloatingTieredPackagePrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingTieredPackagePriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1125,6 +1326,20 @@ class NewFloatingTieredPackagePriceBillingCycleConfiguration(TypedDict, total=Fa """The unit of billing period duration.""" +class NewFloatingTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1171,6 +1386,9 @@ class NewFloatingGroupedTieredPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingGroupedTieredPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1205,6 +1423,20 @@ class NewFloatingGroupedTieredPriceBillingCycleConfiguration(TypedDict, total=Fa """The unit of billing period duration.""" +class NewFloatingGroupedTieredPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingGroupedTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1251,6 +1483,9 @@ class NewFloatingMaxGroupTieredPackagePrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingMaxGroupTieredPackagePriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1285,6 +1520,20 @@ class NewFloatingMaxGroupTieredPackagePriceBillingCycleConfiguration(TypedDict, """The unit of billing period duration.""" +class NewFloatingMaxGroupTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1331,6 +1580,9 @@ class NewFloatingTieredWithMinimumPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingTieredWithMinimumPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1365,6 +1617,20 @@ class NewFloatingTieredWithMinimumPriceBillingCycleConfiguration(TypedDict, tota """The unit of billing period duration.""" +class NewFloatingTieredWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1411,6 +1677,9 @@ class NewFloatingPackageWithAllocationPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingPackageWithAllocationPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1445,6 +1714,20 @@ class NewFloatingPackageWithAllocationPriceBillingCycleConfiguration(TypedDict, """The unit of billing period duration.""" +class NewFloatingPackageWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1491,6 +1774,9 @@ class NewFloatingTieredPackageWithMinimumPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingTieredPackageWithMinimumPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1525,6 +1811,20 @@ class NewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration(TypedDic """The unit of billing period duration.""" +class NewFloatingTieredPackageWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1571,6 +1871,9 @@ class NewFloatingUnitWithPercentPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingUnitWithPercentPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1605,6 +1908,20 @@ class NewFloatingUnitWithPercentPriceBillingCycleConfiguration(TypedDict, total= """The unit of billing period duration.""" +class NewFloatingUnitWithPercentPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1651,6 +1968,9 @@ class NewFloatingTieredWithProrationPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingTieredWithProrationPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1685,6 +2005,20 @@ class NewFloatingTieredWithProrationPriceBillingCycleConfiguration(TypedDict, to """The unit of billing period duration.""" +class NewFloatingTieredWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingTieredWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1731,6 +2065,9 @@ class NewFloatingUnitWithProrationPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingUnitWithProrationPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1765,6 +2102,20 @@ class NewFloatingUnitWithProrationPriceBillingCycleConfiguration(TypedDict, tota """The unit of billing period duration.""" +class NewFloatingUnitWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1811,6 +2162,9 @@ class NewFloatingGroupedAllocationPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingGroupedAllocationPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1845,6 +2199,20 @@ class NewFloatingGroupedAllocationPriceBillingCycleConfiguration(TypedDict, tota """The unit of billing period duration.""" +class NewFloatingGroupedAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1891,6 +2259,9 @@ class NewFloatingGroupedWithProratedMinimumPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingGroupedWithProratedMinimumPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1925,6 +2296,20 @@ class NewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration(TypedD """The unit of billing period duration.""" +class NewFloatingGroupedWithProratedMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1971,6 +2356,9 @@ class NewFloatingGroupedWithMeteredMinimumPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2005,6 +2393,20 @@ class NewFloatingGroupedWithMeteredMinimumPriceBillingCycleConfiguration(TypedDi """The unit of billing period duration.""" +class NewFloatingGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2051,6 +2453,9 @@ class NewFloatingMatrixWithDisplayNamePrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingMatrixWithDisplayNamePriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2085,6 +2490,20 @@ class NewFloatingMatrixWithDisplayNamePriceBillingCycleConfiguration(TypedDict, """The unit of billing period duration.""" +class NewFloatingMatrixWithDisplayNamePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2131,6 +2550,9 @@ class NewFloatingBulkWithProrationPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingBulkWithProrationPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2165,6 +2587,20 @@ class NewFloatingBulkWithProrationPriceBillingCycleConfiguration(TypedDict, tota """The unit of billing period duration.""" +class NewFloatingBulkWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2211,6 +2647,9 @@ class NewFloatingGroupedTieredPackagePrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingGroupedTieredPackagePriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2245,6 +2684,20 @@ class NewFloatingGroupedTieredPackagePriceBillingCycleConfiguration(TypedDict, t """The unit of billing period duration.""" +class NewFloatingGroupedTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2291,6 +2744,11 @@ class NewFloatingScalableMatrixWithUnitPricingPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[ + NewFloatingScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2325,6 +2783,20 @@ class NewFloatingScalableMatrixWithUnitPricingPriceBillingCycleConfiguration(Typ """The unit of billing period duration.""" +class NewFloatingScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2371,6 +2843,11 @@ class NewFloatingScalableMatrixWithTieredPricingPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[ + NewFloatingScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2405,6 +2882,20 @@ class NewFloatingScalableMatrixWithTieredPricingPriceBillingCycleConfiguration(T """The unit of billing period duration.""" +class NewFloatingScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2451,6 +2942,9 @@ class NewFloatingCumulativeGroupedBulkPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[NewFloatingCumulativeGroupedBulkPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2485,6 +2979,20 @@ class NewFloatingCumulativeGroupedBulkPriceBillingCycleConfiguration(TypedDict, """The unit of billing period duration.""" +class NewFloatingCumulativeGroupedBulkPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class NewFloatingCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" diff --git a/src/orb/types/price_evaluate_multiple_params.py b/src/orb/types/price_evaluate_multiple_params.py new file mode 100644 index 00000000..61067d05 --- /dev/null +++ b/src/orb/types/price_evaluate_multiple_params.py @@ -0,0 +1,3246 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Dict, List, Union, Iterable, Optional +from datetime import datetime +from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict + +from .._utils import PropertyInfo + +__all__ = [ + "PriceEvaluateMultipleParams", + "Event", + "PriceEvaluation", + "PriceEvaluationPrice", + "PriceEvaluationPriceNewFloatingUnitPrice", + "PriceEvaluationPriceNewFloatingUnitPriceUnitConfig", + "PriceEvaluationPriceNewFloatingUnitPriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingUnitPriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingUnitPriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingPackagePrice", + "PriceEvaluationPriceNewFloatingPackagePricePackageConfig", + "PriceEvaluationPriceNewFloatingPackagePriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingPackagePriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingPackagePriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingMatrixPrice", + "PriceEvaluationPriceNewFloatingMatrixPriceMatrixConfig", + "PriceEvaluationPriceNewFloatingMatrixPriceMatrixConfigMatrixValue", + "PriceEvaluationPriceNewFloatingMatrixPriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingMatrixPriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingMatrixPriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingMatrixWithAllocationPrice", + "PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig", + "PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue", + "PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingTieredPrice", + "PriceEvaluationPriceNewFloatingTieredPriceTieredConfig", + "PriceEvaluationPriceNewFloatingTieredPriceTieredConfigTier", + "PriceEvaluationPriceNewFloatingTieredPriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingTieredPriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingTieredPriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingTieredBpsPrice", + "PriceEvaluationPriceNewFloatingTieredBpsPriceTieredBpsConfig", + "PriceEvaluationPriceNewFloatingTieredBpsPriceTieredBpsConfigTier", + "PriceEvaluationPriceNewFloatingTieredBpsPriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingTieredBpsPriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingTieredBpsPriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingBpsPrice", + "PriceEvaluationPriceNewFloatingBpsPriceBpsConfig", + "PriceEvaluationPriceNewFloatingBpsPriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingBpsPriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingBpsPriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingBulkBpsPrice", + "PriceEvaluationPriceNewFloatingBulkBpsPriceBulkBpsConfig", + "PriceEvaluationPriceNewFloatingBulkBpsPriceBulkBpsConfigTier", + "PriceEvaluationPriceNewFloatingBulkBpsPriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingBulkBpsPriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingBulkBpsPriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingBulkPrice", + "PriceEvaluationPriceNewFloatingBulkPriceBulkConfig", + "PriceEvaluationPriceNewFloatingBulkPriceBulkConfigTier", + "PriceEvaluationPriceNewFloatingBulkPriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingBulkPriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingBulkPriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingThresholdTotalAmountPrice", + "PriceEvaluationPriceNewFloatingThresholdTotalAmountPriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingThresholdTotalAmountPriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingTieredPackagePrice", + "PriceEvaluationPriceNewFloatingTieredPackagePriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingTieredPackagePriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingTieredPackagePriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingGroupedTieredPrice", + "PriceEvaluationPriceNewFloatingGroupedTieredPriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingGroupedTieredPriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingGroupedTieredPriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingMaxGroupTieredPackagePrice", + "PriceEvaluationPriceNewFloatingMaxGroupTieredPackagePriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingMaxGroupTieredPackagePriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingMaxGroupTieredPackagePriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingTieredWithMinimumPrice", + "PriceEvaluationPriceNewFloatingTieredWithMinimumPriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingTieredWithMinimumPriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingPackageWithAllocationPrice", + "PriceEvaluationPriceNewFloatingPackageWithAllocationPriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingPackageWithAllocationPriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingTieredPackageWithMinimumPrice", + "PriceEvaluationPriceNewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingTieredPackageWithMinimumPriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingUnitWithPercentPrice", + "PriceEvaluationPriceNewFloatingUnitWithPercentPriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingUnitWithPercentPriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingUnitWithPercentPriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingTieredWithProrationPrice", + "PriceEvaluationPriceNewFloatingTieredWithProrationPriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingTieredWithProrationPriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingTieredWithProrationPriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingUnitWithProrationPrice", + "PriceEvaluationPriceNewFloatingUnitWithProrationPriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingUnitWithProrationPriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingUnitWithProrationPriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingGroupedAllocationPrice", + "PriceEvaluationPriceNewFloatingGroupedAllocationPriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingGroupedAllocationPriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingGroupedAllocationPriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingGroupedWithProratedMinimumPrice", + "PriceEvaluationPriceNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingGroupedWithProratedMinimumPriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingGroupedWithMeteredMinimumPrice", + "PriceEvaluationPriceNewFloatingGroupedWithMeteredMinimumPriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingMatrixWithDisplayNamePrice", + "PriceEvaluationPriceNewFloatingMatrixWithDisplayNamePriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingMatrixWithDisplayNamePriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingMatrixWithDisplayNamePriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingBulkWithProrationPrice", + "PriceEvaluationPriceNewFloatingBulkWithProrationPriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingBulkWithProrationPriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingBulkWithProrationPriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingGroupedTieredPackagePrice", + "PriceEvaluationPriceNewFloatingGroupedTieredPackagePriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingGroupedTieredPackagePriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingGroupedTieredPackagePriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingScalableMatrixWithUnitPricingPrice", + "PriceEvaluationPriceNewFloatingScalableMatrixWithUnitPricingPriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingScalableMatrixWithTieredPricingPrice", + "PriceEvaluationPriceNewFloatingScalableMatrixWithTieredPricingPriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration", + "PriceEvaluationPriceNewFloatingCumulativeGroupedBulkPrice", + "PriceEvaluationPriceNewFloatingCumulativeGroupedBulkPriceBillingCycleConfiguration", + "PriceEvaluationPriceNewFloatingCumulativeGroupedBulkPriceDimensionalPriceConfiguration", + "PriceEvaluationPriceNewFloatingCumulativeGroupedBulkPriceInvoicingCycleConfiguration", +] + + +class PriceEvaluateMultipleParams(TypedDict, total=False): + timeframe_end: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]] + """The exclusive upper bound for event timestamps""" + + timeframe_start: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]] + """The inclusive lower bound for event timestamps""" + + customer_id: Optional[str] + """The ID of the customer to which this evaluation is scoped.""" + + events: Optional[Iterable[Event]] + """Optional list of preview events to use instead of actual usage data (max 500)""" + + external_customer_id: Optional[str] + """The external customer ID of the customer to which this evaluation is scoped.""" + + price_evaluations: Iterable[PriceEvaluation] + """List of prices to evaluate (max 100)""" + + +class Event(TypedDict, total=False): + event_name: Required[str] + """A name to meaningfully identify the action or event type.""" + + properties: Required[object] + """A dictionary of custom properties. + + Values in this dictionary must be numeric, boolean, or strings. Nested + dictionaries are disallowed. + """ + + timestamp: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]] + """An ISO 8601 format date with no timezone offset (i.e. + + UTC). This should represent the time that usage was recorded, and is + particularly important to attribute usage to a given billing period. + """ + + customer_id: Optional[str] + """The Orb Customer identifier""" + + external_customer_id: Optional[str] + """ + An alias for the Orb customer, whose mapping is specified when creating the + customer + """ + + +class PriceEvaluationPriceNewFloatingUnitPriceUnitConfig(TypedDict, total=False): + unit_amount: Required[str] + """Rate per unit of usage""" + + +class PriceEvaluationPriceNewFloatingUnitPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingUnitPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingUnitPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingUnitPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["unit"]] + + name: Required[str] + """The name of the price.""" + + unit_config: Required[PriceEvaluationPriceNewFloatingUnitPriceUnitConfig] + + 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[PriceEvaluationPriceNewFloatingUnitPriceBillingCycleConfiguration] + """ + 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.""" + + dimensional_price_configuration: Optional[PriceEvaluationPriceNewFloatingUnitPriceDimensionalPriceConfiguration] + """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[PriceEvaluationPriceNewFloatingUnitPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingPackagePricePackageConfig(TypedDict, total=False): + package_amount: Required[str] + """A currency amount to rate usage by""" + + package_size: Required[int] + """An integer amount to represent package size. + + For example, 1000 here would divide usage by 1000 before multiplying by + package_amount in rating + """ + + +class PriceEvaluationPriceNewFloatingPackagePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["package"]] + + name: Required[str] + """The name of the price.""" + + package_config: Required[PriceEvaluationPriceNewFloatingPackagePricePackageConfig] + + 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[PriceEvaluationPriceNewFloatingPackagePriceBillingCycleConfiguration] + """ + 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.""" + + dimensional_price_configuration: Optional[PriceEvaluationPriceNewFloatingPackagePriceDimensionalPriceConfiguration] + """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[PriceEvaluationPriceNewFloatingPackagePriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingMatrixPriceMatrixConfigMatrixValue(TypedDict, total=False): + dimension_values: Required[List[Optional[str]]] + """One or two matrix keys to filter usage to this Matrix value by. + + For example, ["region", "tier"] could be used to filter cloud usage by a cloud + region and an instance tier. + """ + + unit_amount: Required[str] + """Unit price for the specified dimension_values""" + + +class PriceEvaluationPriceNewFloatingMatrixPriceMatrixConfig(TypedDict, total=False): + default_unit_amount: Required[str] + """Default per unit rate for any usage not bucketed into a specified matrix_value""" + + dimensions: Required[List[Optional[str]]] + """One or two event property values to evaluate matrix groups by""" + + matrix_values: Required[Iterable[PriceEvaluationPriceNewFloatingMatrixPriceMatrixConfigMatrixValue]] + """Matrix values for specified matrix grouping keys""" + + +class PriceEvaluationPriceNewFloatingMatrixPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingMatrixPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingMatrixPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + matrix_config: Required[PriceEvaluationPriceNewFloatingMatrixPriceMatrixConfig] + + model_type: Required[Literal["matrix"]] + + 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[PriceEvaluationPriceNewFloatingMatrixPriceBillingCycleConfiguration] + """ + 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.""" + + dimensional_price_configuration: Optional[PriceEvaluationPriceNewFloatingMatrixPriceDimensionalPriceConfiguration] + """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[PriceEvaluationPriceNewFloatingMatrixPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue( + TypedDict, total=False +): + dimension_values: Required[List[Optional[str]]] + """One or two matrix keys to filter usage to this Matrix value by. + + For example, ["region", "tier"] could be used to filter cloud usage by a cloud + region and an instance tier. + """ + + unit_amount: Required[str] + """Unit price for the specified dimension_values""" + + +class PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig(TypedDict, total=False): + allocation: Required[float] + """Allocation to be used to calculate the price""" + + default_unit_amount: Required[str] + """Default per unit rate for any usage not bucketed into a specified matrix_value""" + + dimensions: Required[List[Optional[str]]] + """One or two event property values to evaluate matrix groups by""" + + matrix_values: Required[ + Iterable[PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue] + ] + """Matrix values for specified matrix grouping keys""" + + +class PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingMatrixWithAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + matrix_with_allocation_config: Required[ + PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig + ] + + model_type: Required[Literal["matrix_with_allocation"]] + + 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[ + PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceBillingCycleConfiguration + ] + """ + 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.""" + + dimensional_price_configuration: Optional[ + PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceDimensionalPriceConfiguration + ] + """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[ + PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingTieredPriceTieredConfigTier(TypedDict, total=False): + first_unit: Required[float] + """Exclusive tier starting value""" + + unit_amount: Required[str] + """Amount per unit""" + + last_unit: Optional[float] + """Inclusive tier ending value. If null, this is treated as the last tier""" + + +class PriceEvaluationPriceNewFloatingTieredPriceTieredConfig(TypedDict, total=False): + tiers: Required[Iterable[PriceEvaluationPriceNewFloatingTieredPriceTieredConfigTier]] + """Tiers for rating based on total usage quantities into the specified tier""" + + +class PriceEvaluationPriceNewFloatingTieredPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingTieredPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingTieredPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["tiered"]] + + name: Required[str] + """The name of the price.""" + + tiered_config: Required[PriceEvaluationPriceNewFloatingTieredPriceTieredConfig] + + 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[PriceEvaluationPriceNewFloatingTieredPriceBillingCycleConfiguration] + """ + 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.""" + + dimensional_price_configuration: Optional[PriceEvaluationPriceNewFloatingTieredPriceDimensionalPriceConfiguration] + """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[PriceEvaluationPriceNewFloatingTieredPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingTieredBpsPriceTieredBpsConfigTier(TypedDict, total=False): + bps: Required[float] + """Per-event basis point rate""" + + minimum_amount: Required[str] + """Exclusive tier starting value""" + + maximum_amount: Optional[str] + """Inclusive tier ending value""" + + per_unit_maximum: Optional[str] + """Per unit maximum to charge""" + + +class PriceEvaluationPriceNewFloatingTieredBpsPriceTieredBpsConfig(TypedDict, total=False): + tiers: Required[Iterable[PriceEvaluationPriceNewFloatingTieredBpsPriceTieredBpsConfigTier]] + """ + Tiers for a Graduated BPS pricing model, where usage is bucketed into specified + tiers + """ + + +class PriceEvaluationPriceNewFloatingTieredBpsPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingTieredBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingTieredBpsPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["tiered_bps"]] + + name: Required[str] + """The name of the price.""" + + tiered_bps_config: Required[PriceEvaluationPriceNewFloatingTieredBpsPriceTieredBpsConfig] + + 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[PriceEvaluationPriceNewFloatingTieredBpsPriceBillingCycleConfiguration] + """ + 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.""" + + dimensional_price_configuration: Optional[ + PriceEvaluationPriceNewFloatingTieredBpsPriceDimensionalPriceConfiguration + ] + """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[PriceEvaluationPriceNewFloatingTieredBpsPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingBpsPriceBpsConfig(TypedDict, total=False): + bps: Required[float] + """Basis point take rate per event""" + + per_unit_maximum: Optional[str] + """Optional currency amount maximum to cap spend per event""" + + +class PriceEvaluationPriceNewFloatingBpsPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingBpsPrice(TypedDict, total=False): + bps_config: Required[PriceEvaluationPriceNewFloatingBpsPriceBpsConfig] + + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["bps"]] + + 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[PriceEvaluationPriceNewFloatingBpsPriceBillingCycleConfiguration] + """ + 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.""" + + dimensional_price_configuration: Optional[PriceEvaluationPriceNewFloatingBpsPriceDimensionalPriceConfiguration] + """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[PriceEvaluationPriceNewFloatingBpsPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingBulkBpsPriceBulkBpsConfigTier(TypedDict, total=False): + bps: Required[float] + """Basis points to rate on""" + + maximum_amount: Optional[str] + """Upper bound for tier""" + + per_unit_maximum: Optional[str] + """The maximum amount to charge for any one event""" + + +class PriceEvaluationPriceNewFloatingBulkBpsPriceBulkBpsConfig(TypedDict, total=False): + tiers: Required[Iterable[PriceEvaluationPriceNewFloatingBulkBpsPriceBulkBpsConfigTier]] + """ + Tiers for a bulk BPS pricing model where all usage is aggregated to a single + tier based on total volume + """ + + +class PriceEvaluationPriceNewFloatingBulkBpsPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingBulkBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingBulkBpsPrice(TypedDict, total=False): + bulk_bps_config: Required[PriceEvaluationPriceNewFloatingBulkBpsPriceBulkBpsConfig] + + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["bulk_bps"]] + + 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[PriceEvaluationPriceNewFloatingBulkBpsPriceBillingCycleConfiguration] + """ + 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.""" + + dimensional_price_configuration: Optional[PriceEvaluationPriceNewFloatingBulkBpsPriceDimensionalPriceConfiguration] + """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[PriceEvaluationPriceNewFloatingBulkBpsPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingBulkPriceBulkConfigTier(TypedDict, total=False): + unit_amount: Required[str] + """Amount per unit""" + + maximum_units: Optional[float] + """Upper bound for this tier""" + + +class PriceEvaluationPriceNewFloatingBulkPriceBulkConfig(TypedDict, total=False): + tiers: Required[Iterable[PriceEvaluationPriceNewFloatingBulkPriceBulkConfigTier]] + """Bulk tiers for rating based on total usage volume""" + + +class PriceEvaluationPriceNewFloatingBulkPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingBulkPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingBulkPrice(TypedDict, total=False): + bulk_config: Required[PriceEvaluationPriceNewFloatingBulkPriceBulkConfig] + + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["bulk"]] + + 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[PriceEvaluationPriceNewFloatingBulkPriceBillingCycleConfiguration] + """ + 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.""" + + dimensional_price_configuration: Optional[PriceEvaluationPriceNewFloatingBulkPriceDimensionalPriceConfiguration] + """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[PriceEvaluationPriceNewFloatingBulkPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingThresholdTotalAmountPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingThresholdTotalAmountPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingThresholdTotalAmountPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["threshold_total_amount"]] + + name: Required[str] + """The name of the price.""" + + threshold_total_amount_config: Required[Dict[str, object]] + + 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[ + PriceEvaluationPriceNewFloatingThresholdTotalAmountPriceBillingCycleConfiguration + ] + """ + 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.""" + + dimensional_price_configuration: Optional[ + PriceEvaluationPriceNewFloatingThresholdTotalAmountPriceDimensionalPriceConfiguration + ] + """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[ + PriceEvaluationPriceNewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingTieredPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["tiered_package"]] + + name: Required[str] + """The name of the price.""" + + tiered_package_config: Required[Dict[str, object]] + + 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[PriceEvaluationPriceNewFloatingTieredPackagePriceBillingCycleConfiguration] + """ + 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.""" + + dimensional_price_configuration: Optional[ + PriceEvaluationPriceNewFloatingTieredPackagePriceDimensionalPriceConfiguration + ] + """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[ + PriceEvaluationPriceNewFloatingTieredPackagePriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingGroupedTieredPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingGroupedTieredPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingGroupedTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingGroupedTieredPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + grouped_tiered_config: Required[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_tiered"]] + + 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[PriceEvaluationPriceNewFloatingGroupedTieredPriceBillingCycleConfiguration] + """ + 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.""" + + dimensional_price_configuration: Optional[ + PriceEvaluationPriceNewFloatingGroupedTieredPriceDimensionalPriceConfiguration + ] + """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[ + PriceEvaluationPriceNewFloatingGroupedTieredPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingMaxGroupTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingMaxGroupTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingMaxGroupTieredPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + max_group_tiered_package_config: Required[Dict[str, object]] + + model_type: Required[Literal["max_group_tiered_package"]] + + 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[ + PriceEvaluationPriceNewFloatingMaxGroupTieredPackagePriceBillingCycleConfiguration + ] + """ + 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.""" + + dimensional_price_configuration: Optional[ + PriceEvaluationPriceNewFloatingMaxGroupTieredPackagePriceDimensionalPriceConfiguration + ] + """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[ + PriceEvaluationPriceNewFloatingMaxGroupTieredPackagePriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingTieredWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingTieredWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingTieredWithMinimumPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["tiered_with_minimum"]] + + name: Required[str] + """The name of the price.""" + + tiered_with_minimum_config: Required[Dict[str, object]] + + 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[ + PriceEvaluationPriceNewFloatingTieredWithMinimumPriceBillingCycleConfiguration + ] + """ + 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.""" + + dimensional_price_configuration: Optional[ + PriceEvaluationPriceNewFloatingTieredWithMinimumPriceDimensionalPriceConfiguration + ] + """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[ + PriceEvaluationPriceNewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingPackageWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingPackageWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingPackageWithAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["package_with_allocation"]] + + name: Required[str] + """The name of the price.""" + + package_with_allocation_config: Required[Dict[str, object]] + + 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[ + PriceEvaluationPriceNewFloatingPackageWithAllocationPriceBillingCycleConfiguration + ] + """ + 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.""" + + dimensional_price_configuration: Optional[ + PriceEvaluationPriceNewFloatingPackageWithAllocationPriceDimensionalPriceConfiguration + ] + """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[ + PriceEvaluationPriceNewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingTieredPackageWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingTieredPackageWithMinimumPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["tiered_package_with_minimum"]] + + name: Required[str] + """The name of the price.""" + + tiered_package_with_minimum_config: Required[Dict[str, object]] + + 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[ + PriceEvaluationPriceNewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration + ] + """ + 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.""" + + dimensional_price_configuration: Optional[ + PriceEvaluationPriceNewFloatingTieredPackageWithMinimumPriceDimensionalPriceConfiguration + ] + """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[ + PriceEvaluationPriceNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingUnitWithPercentPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingUnitWithPercentPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingUnitWithPercentPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["unit_with_percent"]] + + name: Required[str] + """The name of the price.""" + + unit_with_percent_config: Required[Dict[str, object]] + + 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[PriceEvaluationPriceNewFloatingUnitWithPercentPriceBillingCycleConfiguration] + """ + 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.""" + + dimensional_price_configuration: Optional[ + PriceEvaluationPriceNewFloatingUnitWithPercentPriceDimensionalPriceConfiguration + ] + """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[ + PriceEvaluationPriceNewFloatingUnitWithPercentPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingTieredWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingTieredWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingTieredWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingTieredWithProrationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["tiered_with_proration"]] + + name: Required[str] + """The name of the price.""" + + tiered_with_proration_config: Required[Dict[str, object]] + + 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[ + PriceEvaluationPriceNewFloatingTieredWithProrationPriceBillingCycleConfiguration + ] + """ + 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.""" + + dimensional_price_configuration: Optional[ + PriceEvaluationPriceNewFloatingTieredWithProrationPriceDimensionalPriceConfiguration + ] + """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[ + PriceEvaluationPriceNewFloatingTieredWithProrationPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingUnitWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingUnitWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingUnitWithProrationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["unit_with_proration"]] + + name: Required[str] + """The name of the price.""" + + unit_with_proration_config: Required[Dict[str, object]] + + 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[ + PriceEvaluationPriceNewFloatingUnitWithProrationPriceBillingCycleConfiguration + ] + """ + 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.""" + + dimensional_price_configuration: Optional[ + PriceEvaluationPriceNewFloatingUnitWithProrationPriceDimensionalPriceConfiguration + ] + """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[ + PriceEvaluationPriceNewFloatingUnitWithProrationPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingGroupedAllocationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingGroupedAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingGroupedAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + grouped_allocation_config: Required[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_allocation"]] + + 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[ + PriceEvaluationPriceNewFloatingGroupedAllocationPriceBillingCycleConfiguration + ] + """ + 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.""" + + dimensional_price_configuration: Optional[ + PriceEvaluationPriceNewFloatingGroupedAllocationPriceDimensionalPriceConfiguration + ] + """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[ + PriceEvaluationPriceNewFloatingGroupedAllocationPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingGroupedWithProratedMinimumPriceDimensionalPriceConfiguration( + TypedDict, total=False +): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingGroupedWithProratedMinimumPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + grouped_with_prorated_minimum_config: Required[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_with_prorated_minimum"]] + + 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[ + PriceEvaluationPriceNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration + ] + """ + 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.""" + + dimensional_price_configuration: Optional[ + PriceEvaluationPriceNewFloatingGroupedWithProratedMinimumPriceDimensionalPriceConfiguration + ] + """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[ + PriceEvaluationPriceNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingGroupedWithMeteredMinimumPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration( + TypedDict, total=False +): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingGroupedWithMeteredMinimumPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + grouped_with_metered_minimum_config: Required[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_with_metered_minimum"]] + + 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[ + PriceEvaluationPriceNewFloatingGroupedWithMeteredMinimumPriceBillingCycleConfiguration + ] + """ + 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.""" + + dimensional_price_configuration: Optional[ + PriceEvaluationPriceNewFloatingGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration + ] + """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[ + PriceEvaluationPriceNewFloatingGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingMatrixWithDisplayNamePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingMatrixWithDisplayNamePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingMatrixWithDisplayNamePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + matrix_with_display_name_config: Required[Dict[str, object]] + + model_type: Required[Literal["matrix_with_display_name"]] + + 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[ + PriceEvaluationPriceNewFloatingMatrixWithDisplayNamePriceBillingCycleConfiguration + ] + """ + 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.""" + + dimensional_price_configuration: Optional[ + PriceEvaluationPriceNewFloatingMatrixWithDisplayNamePriceDimensionalPriceConfiguration + ] + """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[ + PriceEvaluationPriceNewFloatingMatrixWithDisplayNamePriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingBulkWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingBulkWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingBulkWithProrationPrice(TypedDict, total=False): + bulk_with_proration_config: Required[Dict[str, object]] + + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["bulk_with_proration"]] + + 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[ + PriceEvaluationPriceNewFloatingBulkWithProrationPriceBillingCycleConfiguration + ] + """ + 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.""" + + dimensional_price_configuration: Optional[ + PriceEvaluationPriceNewFloatingBulkWithProrationPriceDimensionalPriceConfiguration + ] + """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[ + PriceEvaluationPriceNewFloatingBulkWithProrationPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingGroupedTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingGroupedTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingGroupedTieredPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + grouped_tiered_package_config: Required[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_tiered_package"]] + + 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[ + PriceEvaluationPriceNewFloatingGroupedTieredPackagePriceBillingCycleConfiguration + ] + """ + 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.""" + + dimensional_price_configuration: Optional[ + PriceEvaluationPriceNewFloatingGroupedTieredPackagePriceDimensionalPriceConfiguration + ] + """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[ + PriceEvaluationPriceNewFloatingGroupedTieredPackagePriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingScalableMatrixWithUnitPricingPriceBillingCycleConfiguration( + TypedDict, total=False +): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration( + TypedDict, total=False +): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration( + TypedDict, total=False +): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingScalableMatrixWithUnitPricingPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["scalable_matrix_with_unit_pricing"]] + + name: Required[str] + """The name of the price.""" + + scalable_matrix_with_unit_pricing_config: Required[Dict[str, object]] + + 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[ + PriceEvaluationPriceNewFloatingScalableMatrixWithUnitPricingPriceBillingCycleConfiguration + ] + """ + 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.""" + + dimensional_price_configuration: Optional[ + PriceEvaluationPriceNewFloatingScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration + ] + """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[ + PriceEvaluationPriceNewFloatingScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingScalableMatrixWithTieredPricingPriceBillingCycleConfiguration( + TypedDict, total=False +): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration( + TypedDict, total=False +): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration( + TypedDict, total=False +): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingScalableMatrixWithTieredPricingPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["scalable_matrix_with_tiered_pricing"]] + + name: Required[str] + """The name of the price.""" + + scalable_matrix_with_tiered_pricing_config: Required[Dict[str, object]] + + 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[ + PriceEvaluationPriceNewFloatingScalableMatrixWithTieredPricingPriceBillingCycleConfiguration + ] + """ + 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.""" + + dimensional_price_configuration: Optional[ + PriceEvaluationPriceNewFloatingScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration + ] + """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[ + PriceEvaluationPriceNewFloatingScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +class PriceEvaluationPriceNewFloatingCumulativeGroupedBulkPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingCumulativeGroupedBulkPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class PriceEvaluationPriceNewFloatingCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class PriceEvaluationPriceNewFloatingCumulativeGroupedBulkPrice(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[Dict[str, object]] + + currency: Required[str] + """An ISO 4217 currency string for which this price is billed in.""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["cumulative_grouped_bulk"]] + + 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[ + PriceEvaluationPriceNewFloatingCumulativeGroupedBulkPriceBillingCycleConfiguration + ] + """ + 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.""" + + dimensional_price_configuration: Optional[ + PriceEvaluationPriceNewFloatingCumulativeGroupedBulkPriceDimensionalPriceConfiguration + ] + """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[ + PriceEvaluationPriceNewFloatingCumulativeGroupedBulkPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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`. + """ + + +PriceEvaluationPrice: TypeAlias = Union[ + PriceEvaluationPriceNewFloatingUnitPrice, + PriceEvaluationPriceNewFloatingPackagePrice, + PriceEvaluationPriceNewFloatingMatrixPrice, + PriceEvaluationPriceNewFloatingMatrixWithAllocationPrice, + PriceEvaluationPriceNewFloatingTieredPrice, + PriceEvaluationPriceNewFloatingTieredBpsPrice, + PriceEvaluationPriceNewFloatingBpsPrice, + PriceEvaluationPriceNewFloatingBulkBpsPrice, + PriceEvaluationPriceNewFloatingBulkPrice, + PriceEvaluationPriceNewFloatingThresholdTotalAmountPrice, + PriceEvaluationPriceNewFloatingTieredPackagePrice, + PriceEvaluationPriceNewFloatingGroupedTieredPrice, + PriceEvaluationPriceNewFloatingMaxGroupTieredPackagePrice, + PriceEvaluationPriceNewFloatingTieredWithMinimumPrice, + PriceEvaluationPriceNewFloatingPackageWithAllocationPrice, + PriceEvaluationPriceNewFloatingTieredPackageWithMinimumPrice, + PriceEvaluationPriceNewFloatingUnitWithPercentPrice, + PriceEvaluationPriceNewFloatingTieredWithProrationPrice, + PriceEvaluationPriceNewFloatingUnitWithProrationPrice, + PriceEvaluationPriceNewFloatingGroupedAllocationPrice, + PriceEvaluationPriceNewFloatingGroupedWithProratedMinimumPrice, + PriceEvaluationPriceNewFloatingGroupedWithMeteredMinimumPrice, + PriceEvaluationPriceNewFloatingMatrixWithDisplayNamePrice, + PriceEvaluationPriceNewFloatingBulkWithProrationPrice, + PriceEvaluationPriceNewFloatingGroupedTieredPackagePrice, + PriceEvaluationPriceNewFloatingScalableMatrixWithUnitPricingPrice, + PriceEvaluationPriceNewFloatingScalableMatrixWithTieredPricingPrice, + PriceEvaluationPriceNewFloatingCumulativeGroupedBulkPrice, +] + + +class PriceEvaluation(TypedDict, total=False): + filter: Optional[str] + """ + A boolean + [computed property](/extensibility/advanced-metrics#computed-properties) used to + filter the underlying billable metric + """ + + grouping_keys: List[str] + """ + Properties (or + [computed properties](/extensibility/advanced-metrics#computed-properties)) used + to group the underlying billable metric + """ + + price: Optional[PriceEvaluationPrice] + """ + An inline price definition to evaluate, allowing you to test price + configurations before adding them to Orb. + """ + + price_id: Optional[str] + """The ID of a price to evaluate that exists in your Orb account.""" diff --git a/src/orb/types/price_evaluate_multiple_response.py b/src/orb/types/price_evaluate_multiple_response.py new file mode 100644 index 00000000..b846e87b --- /dev/null +++ b/src/orb/types/price_evaluate_multiple_response.py @@ -0,0 +1,26 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from .._models import BaseModel +from .evaluate_price_group import EvaluatePriceGroup + +__all__ = ["PriceEvaluateMultipleResponse", "Data"] + + +class Data(BaseModel): + currency: str + """The currency of the price""" + + price_groups: List[EvaluatePriceGroup] + """The computed price groups associated with input price.""" + + inline_price_index: Optional[int] = None + """The index of the inline price""" + + price_id: Optional[str] = None + """The ID of the price""" + + +class PriceEvaluateMultipleResponse(BaseModel): + data: List[Data] diff --git a/src/orb/types/shared/amount_discount.py b/src/orb/types/shared/amount_discount.py index e9c80a97..a21bddfe 100644 --- a/src/orb/types/shared/amount_discount.py +++ b/src/orb/types/shared/amount_discount.py @@ -12,12 +12,12 @@ class AmountDiscount(BaseModel): amount_discount: str """Only available if discount_type is `amount`.""" - applies_to_price_ids: List[str] + discount_type: Literal["amount"] + + applies_to_price_ids: Optional[List[str]] = None """List of price_ids that this discount applies to. For plan/plan phase discounts, this can be a subset of prices. """ - discount_type: Literal["amount"] - reason: Optional[str] = None diff --git a/src/orb/types/shared/percentage_discount.py b/src/orb/types/shared/percentage_discount.py index de989cd4..32fd52b4 100644 --- a/src/orb/types/shared/percentage_discount.py +++ b/src/orb/types/shared/percentage_discount.py @@ -9,12 +9,6 @@ class PercentageDiscount(BaseModel): - applies_to_price_ids: List[str] - """List of price_ids that this discount applies to. - - For plan/plan phase discounts, this can be a subset of prices. - """ - discount_type: Literal["percentage"] percentage_discount: float @@ -23,4 +17,10 @@ class PercentageDiscount(BaseModel): This is a number between 0 and 1. """ + applies_to_price_ids: Optional[List[str]] = None + """List of price_ids that this discount applies to. + + For plan/plan phase discounts, this can be a subset of prices. + """ + reason: Optional[str] = None diff --git a/src/orb/types/shared/trial_discount.py b/src/orb/types/shared/trial_discount.py index 5abfa574..eaeb9de3 100644 --- a/src/orb/types/shared/trial_discount.py +++ b/src/orb/types/shared/trial_discount.py @@ -9,14 +9,14 @@ class TrialDiscount(BaseModel): - applies_to_price_ids: List[str] + discount_type: Literal["trial"] + + applies_to_price_ids: Optional[List[str]] = None """List of price_ids that this discount applies to. For plan/plan phase discounts, this can be a subset of prices. """ - discount_type: Literal["trial"] - reason: Optional[str] = None trial_amount_discount: Optional[str] = None diff --git a/src/orb/types/shared/usage_discount.py b/src/orb/types/shared/usage_discount.py index df1d2186..620128fb 100644 --- a/src/orb/types/shared/usage_discount.py +++ b/src/orb/types/shared/usage_discount.py @@ -9,12 +9,6 @@ class UsageDiscount(BaseModel): - applies_to_price_ids: List[str] - """List of price_ids that this discount applies to. - - For plan/plan phase discounts, this can be a subset of prices. - """ - discount_type: Literal["usage"] usage_discount: float @@ -23,4 +17,10 @@ class UsageDiscount(BaseModel): Number of usage units that this discount is for """ + applies_to_price_ids: Optional[List[str]] = None + """List of price_ids that this discount applies to. + + For plan/plan phase discounts, this can be a subset of prices. + """ + reason: Optional[str] = None diff --git a/src/orb/types/shared_params/amount_discount.py b/src/orb/types/shared_params/amount_discount.py index 7915c7fe..03956cd4 100644 --- a/src/orb/types/shared_params/amount_discount.py +++ b/src/orb/types/shared_params/amount_discount.py @@ -12,12 +12,12 @@ class AmountDiscount(TypedDict, total=False): amount_discount: Required[str] """Only available if discount_type is `amount`.""" - applies_to_price_ids: Required[List[str]] + discount_type: Required[Literal["amount"]] + + applies_to_price_ids: Optional[List[str]] """List of price_ids that this discount applies to. For plan/plan phase discounts, this can be a subset of prices. """ - discount_type: Required[Literal["amount"]] - reason: Optional[str] diff --git a/src/orb/types/shared_params/percentage_discount.py b/src/orb/types/shared_params/percentage_discount.py index c2b15ea7..288ec075 100644 --- a/src/orb/types/shared_params/percentage_discount.py +++ b/src/orb/types/shared_params/percentage_discount.py @@ -9,12 +9,6 @@ class PercentageDiscount(TypedDict, total=False): - applies_to_price_ids: Required[List[str]] - """List of price_ids that this discount applies to. - - For plan/plan phase discounts, this can be a subset of prices. - """ - discount_type: Required[Literal["percentage"]] percentage_discount: Required[float] @@ -23,4 +17,10 @@ class PercentageDiscount(TypedDict, total=False): This is a number between 0 and 1. """ + applies_to_price_ids: Optional[List[str]] + """List of price_ids that this discount applies to. + + For plan/plan phase discounts, this can be a subset of prices. + """ + reason: Optional[str] diff --git a/src/orb/types/shared_params/trial_discount.py b/src/orb/types/shared_params/trial_discount.py index c4f15cab..3aebe792 100644 --- a/src/orb/types/shared_params/trial_discount.py +++ b/src/orb/types/shared_params/trial_discount.py @@ -9,14 +9,14 @@ class TrialDiscount(TypedDict, total=False): - applies_to_price_ids: Required[List[str]] + discount_type: Required[Literal["trial"]] + + applies_to_price_ids: Optional[List[str]] """List of price_ids that this discount applies to. For plan/plan phase discounts, this can be a subset of prices. """ - discount_type: Required[Literal["trial"]] - reason: Optional[str] trial_amount_discount: Optional[str] diff --git a/src/orb/types/shared_params/usage_discount.py b/src/orb/types/shared_params/usage_discount.py index 091dd67d..f20196ff 100644 --- a/src/orb/types/shared_params/usage_discount.py +++ b/src/orb/types/shared_params/usage_discount.py @@ -9,12 +9,6 @@ class UsageDiscount(TypedDict, total=False): - applies_to_price_ids: Required[List[str]] - """List of price_ids that this discount applies to. - - For plan/plan phase discounts, this can be a subset of prices. - """ - discount_type: Required[Literal["usage"]] usage_discount: Required[float] @@ -23,4 +17,10 @@ class UsageDiscount(TypedDict, total=False): Number of usage units that this discount is for """ + applies_to_price_ids: Optional[List[str]] + """List of price_ids that this discount applies to. + + For plan/plan phase discounts, this can be a subset of prices. + """ + reason: Optional[str] diff --git a/src/orb/types/subscription.py b/src/orb/types/subscription.py index 51911875..0f5ad87f 100644 --- a/src/orb/types/subscription.py +++ b/src/orb/types/subscription.py @@ -15,18 +15,28 @@ "AdjustmentInterval", "AdjustmentIntervalAdjustment", "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter", "BillingCycleAnchorConfiguration", "DiscountInterval", "DiscountIntervalAmountDiscountInterval", + "DiscountIntervalAmountDiscountIntervalFilter", "DiscountIntervalPercentageDiscountInterval", + "DiscountIntervalPercentageDiscountIntervalFilter", "DiscountIntervalUsageDiscountInterval", + "DiscountIntervalUsageDiscountIntervalFilter", "FixedFeeQuantitySchedule", "MaximumInterval", + "MaximumIntervalFilter", "MinimumInterval", + "MinimumIntervalFilter", "PendingSubscriptionChange", "PriceInterval", "PriceIntervalFixedFeeQuantityTransition", @@ -35,6 +45,17 @@ ] +class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): id: str @@ -43,6 +64,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -62,6 +86,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): """ +class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): id: str @@ -76,6 +111,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -89,6 +127,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel): id: str @@ -97,6 +146,9 @@ class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseMode applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -116,6 +168,17 @@ class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseMode """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): id: str @@ -124,6 +187,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -146,6 +212,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel): id: str @@ -154,6 +231,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -224,13 +304,21 @@ class BillingCycleAnchorConfiguration(BaseModel): """ +class DiscountIntervalAmountDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class DiscountIntervalAmountDiscountInterval(BaseModel): amount_discount: str """Only available if discount_type is `amount`.""" - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" - applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -239,14 +327,25 @@ class DiscountIntervalAmountDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalAmountDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" -class DiscountIntervalPercentageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class DiscountIntervalPercentageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + values: List[str] + """The IDs or values that match this filter.""" + + +class DiscountIntervalPercentageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -255,6 +354,9 @@ class DiscountIntervalPercentageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalPercentageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + percentage_discount: float """ Only available if discount_type is `percentage`.This is a number between 0 @@ -265,10 +367,18 @@ class DiscountIntervalPercentageDiscountInterval(BaseModel): """The start date of the discount interval.""" -class DiscountIntervalUsageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class DiscountIntervalUsageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class DiscountIntervalUsageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -277,6 +387,9 @@ class DiscountIntervalUsageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalUsageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" @@ -307,16 +420,27 @@ class FixedFeeQuantitySchedule(BaseModel): start_date: datetime -class MaximumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this maximum interval applies to.""" +class MaximumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class MaximumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this maximum interval applies to.""" end_date: Optional[datetime] = None """The end date of the maximum interval.""" + filters: List[MaximumIntervalFilter] + """The filters that determine which prices this maximum interval applies to.""" + maximum_amount: str """ The maximum amount to charge in a given billing period for the price intervals @@ -327,16 +451,27 @@ class MaximumInterval(BaseModel): """The start date of the maximum interval.""" -class MinimumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this minimum interval applies to.""" +class MinimumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class MinimumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this minimum interval applies to.""" end_date: Optional[datetime] = None """The end date of the minimum interval.""" + filters: List[MinimumIntervalFilter] + """The filters that determine which prices this minimum interval applies to.""" + minimum_amount: str """ The minimum amount to charge in a given billing period for the price intervals @@ -534,6 +669,9 @@ class Subscription(BaseModel): minimum_intervals: List[MinimumInterval] """The minimum intervals for this subscription sorted by the start_date.""" + name: str + """The name of the subscription.""" + net_terms: int """ Determines the difference between the invoice issue date for subscription @@ -545,7 +683,7 @@ class Subscription(BaseModel): pending_subscription_change: Optional[PendingSubscriptionChange] = None """A pending subscription change if one exists on this subscription.""" - plan: Plan + plan: Optional[Plan] = None """ 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 diff --git a/src/orb/types/subscription_cancel_response.py b/src/orb/types/subscription_cancel_response.py index 7481099d..13afd7e8 100644 --- a/src/orb/types/subscription_cancel_response.py +++ b/src/orb/types/subscription_cancel_response.py @@ -17,18 +17,28 @@ "AdjustmentInterval", "AdjustmentIntervalAdjustment", "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter", "BillingCycleAnchorConfiguration", "DiscountInterval", "DiscountIntervalAmountDiscountInterval", + "DiscountIntervalAmountDiscountIntervalFilter", "DiscountIntervalPercentageDiscountInterval", + "DiscountIntervalPercentageDiscountIntervalFilter", "DiscountIntervalUsageDiscountInterval", + "DiscountIntervalUsageDiscountIntervalFilter", "FixedFeeQuantitySchedule", "MaximumInterval", + "MaximumIntervalFilter", "MinimumInterval", + "MinimumIntervalFilter", "PendingSubscriptionChange", "PriceInterval", "PriceIntervalFixedFeeQuantityTransition", @@ -38,6 +48,17 @@ ] +class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): id: str @@ -46,6 +67,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -65,6 +89,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): """ +class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): id: str @@ -79,6 +114,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -92,6 +130,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel): id: str @@ -100,6 +149,9 @@ class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseMode applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -119,6 +171,17 @@ class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseMode """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): id: str @@ -127,6 +190,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -149,6 +215,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel): id: str @@ -157,6 +234,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -227,13 +307,21 @@ class BillingCycleAnchorConfiguration(BaseModel): """ +class DiscountIntervalAmountDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class DiscountIntervalAmountDiscountInterval(BaseModel): amount_discount: str """Only available if discount_type is `amount`.""" - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" - applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -242,14 +330,25 @@ class DiscountIntervalAmountDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalAmountDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" -class DiscountIntervalPercentageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class DiscountIntervalPercentageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + values: List[str] + """The IDs or values that match this filter.""" + + +class DiscountIntervalPercentageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -258,6 +357,9 @@ class DiscountIntervalPercentageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalPercentageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + percentage_discount: float """ Only available if discount_type is `percentage`.This is a number between 0 @@ -268,10 +370,18 @@ class DiscountIntervalPercentageDiscountInterval(BaseModel): """The start date of the discount interval.""" -class DiscountIntervalUsageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class DiscountIntervalUsageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class DiscountIntervalUsageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -280,6 +390,9 @@ class DiscountIntervalUsageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalUsageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" @@ -310,16 +423,27 @@ class FixedFeeQuantitySchedule(BaseModel): start_date: datetime -class MaximumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this maximum interval applies to.""" +class MaximumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class MaximumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this maximum interval applies to.""" end_date: Optional[datetime] = None """The end date of the maximum interval.""" + filters: List[MaximumIntervalFilter] + """The filters that determine which prices this maximum interval applies to.""" + maximum_amount: str """ The maximum amount to charge in a given billing period for the price intervals @@ -330,16 +454,27 @@ class MaximumInterval(BaseModel): """The start date of the maximum interval.""" -class MinimumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this minimum interval applies to.""" +class MinimumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class MinimumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this minimum interval applies to.""" end_date: Optional[datetime] = None """The end date of the minimum interval.""" + filters: List[MinimumIntervalFilter] + """The filters that determine which prices this minimum interval applies to.""" + minimum_amount: str """ The minimum amount to charge in a given billing period for the price intervals @@ -551,6 +686,9 @@ class SubscriptionCancelResponse(BaseModel): minimum_intervals: List[MinimumInterval] """The minimum intervals for this subscription sorted by the start_date.""" + name: str + """The name of the subscription.""" + net_terms: int """ Determines the difference between the invoice issue date for subscription @@ -562,7 +700,7 @@ class SubscriptionCancelResponse(BaseModel): pending_subscription_change: Optional[PendingSubscriptionChange] = None """A pending subscription change if one exists on this subscription.""" - plan: Plan + plan: Optional[Plan] = None """ 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 diff --git a/src/orb/types/subscription_change_apply_response.py b/src/orb/types/subscription_change_apply_response.py index 625a60a7..95b15e2c 100644 --- a/src/orb/types/subscription_change_apply_response.py +++ b/src/orb/types/subscription_change_apply_response.py @@ -18,18 +18,28 @@ "SubscriptionAdjustmentInterval", "SubscriptionAdjustmentIntervalAdjustment", "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment", + "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter", "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment", + "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter", "SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment", + "SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter", "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment", + "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter", "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment", + "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter", "SubscriptionBillingCycleAnchorConfiguration", "SubscriptionDiscountInterval", "SubscriptionDiscountIntervalAmountDiscountInterval", + "SubscriptionDiscountIntervalAmountDiscountIntervalFilter", "SubscriptionDiscountIntervalPercentageDiscountInterval", + "SubscriptionDiscountIntervalPercentageDiscountIntervalFilter", "SubscriptionDiscountIntervalUsageDiscountInterval", + "SubscriptionDiscountIntervalUsageDiscountIntervalFilter", "SubscriptionFixedFeeQuantitySchedule", "SubscriptionMaximumInterval", + "SubscriptionMaximumIntervalFilter", "SubscriptionMinimumInterval", + "SubscriptionMinimumIntervalFilter", "SubscriptionPendingSubscriptionChange", "SubscriptionPriceInterval", "SubscriptionPriceIntervalFixedFeeQuantityTransition", @@ -39,6 +49,17 @@ ] +class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): id: str @@ -47,6 +68,9 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(B applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -66,6 +90,17 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(B """ +class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): id: str @@ -80,6 +115,9 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment( applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -93,6 +131,17 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment( """The reason for the adjustment.""" +class SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel): id: str @@ -101,6 +150,9 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustm applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -120,6 +172,17 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustm """The reason for the adjustment.""" +class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): id: str @@ -128,6 +191,9 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseMod applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -150,6 +216,17 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseMod """The reason for the adjustment.""" +class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel): id: str @@ -158,6 +235,9 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseMod applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -228,13 +308,21 @@ class SubscriptionBillingCycleAnchorConfiguration(BaseModel): """ +class SubscriptionDiscountIntervalAmountDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class SubscriptionDiscountIntervalAmountDiscountInterval(BaseModel): amount_discount: str """Only available if discount_type is `amount`.""" - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" - applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -243,14 +331,25 @@ class SubscriptionDiscountIntervalAmountDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[SubscriptionDiscountIntervalAmountDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" -class SubscriptionDiscountIntervalPercentageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class SubscriptionDiscountIntervalPercentageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + values: List[str] + """The IDs or values that match this filter.""" + + +class SubscriptionDiscountIntervalPercentageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -259,6 +358,9 @@ class SubscriptionDiscountIntervalPercentageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[SubscriptionDiscountIntervalPercentageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + percentage_discount: float """ Only available if discount_type is `percentage`.This is a number between 0 @@ -269,10 +371,18 @@ class SubscriptionDiscountIntervalPercentageDiscountInterval(BaseModel): """The start date of the discount interval.""" -class SubscriptionDiscountIntervalUsageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class SubscriptionDiscountIntervalUsageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class SubscriptionDiscountIntervalUsageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -281,6 +391,9 @@ class SubscriptionDiscountIntervalUsageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[SubscriptionDiscountIntervalUsageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" @@ -311,16 +424,27 @@ class SubscriptionFixedFeeQuantitySchedule(BaseModel): start_date: datetime -class SubscriptionMaximumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this maximum interval applies to.""" +class SubscriptionMaximumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class SubscriptionMaximumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this maximum interval applies to.""" end_date: Optional[datetime] = None """The end date of the maximum interval.""" + filters: List[SubscriptionMaximumIntervalFilter] + """The filters that determine which prices this maximum interval applies to.""" + maximum_amount: str """ The maximum amount to charge in a given billing period for the price intervals @@ -331,16 +455,27 @@ class SubscriptionMaximumInterval(BaseModel): """The start date of the maximum interval.""" -class SubscriptionMinimumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this minimum interval applies to.""" +class SubscriptionMinimumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class SubscriptionMinimumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this minimum interval applies to.""" end_date: Optional[datetime] = None """The end date of the minimum interval.""" + filters: List[SubscriptionMinimumIntervalFilter] + """The filters that determine which prices this minimum interval applies to.""" + minimum_amount: str """ The minimum amount to charge in a given billing period for the price intervals @@ -552,6 +687,9 @@ class Subscription(BaseModel): minimum_intervals: List[SubscriptionMinimumInterval] """The minimum intervals for this subscription sorted by the start_date.""" + name: str + """The name of the subscription.""" + net_terms: int """ Determines the difference between the invoice issue date for subscription @@ -563,7 +701,7 @@ class Subscription(BaseModel): pending_subscription_change: Optional[SubscriptionPendingSubscriptionChange] = None """A pending subscription change if one exists on this subscription.""" - plan: Plan + plan: Optional[Plan] = None """ 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 diff --git a/src/orb/types/subscription_change_cancel_response.py b/src/orb/types/subscription_change_cancel_response.py index 4bb41909..963563f3 100644 --- a/src/orb/types/subscription_change_cancel_response.py +++ b/src/orb/types/subscription_change_cancel_response.py @@ -18,18 +18,28 @@ "SubscriptionAdjustmentInterval", "SubscriptionAdjustmentIntervalAdjustment", "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment", + "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter", "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment", + "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter", "SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment", + "SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter", "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment", + "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter", "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment", + "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter", "SubscriptionBillingCycleAnchorConfiguration", "SubscriptionDiscountInterval", "SubscriptionDiscountIntervalAmountDiscountInterval", + "SubscriptionDiscountIntervalAmountDiscountIntervalFilter", "SubscriptionDiscountIntervalPercentageDiscountInterval", + "SubscriptionDiscountIntervalPercentageDiscountIntervalFilter", "SubscriptionDiscountIntervalUsageDiscountInterval", + "SubscriptionDiscountIntervalUsageDiscountIntervalFilter", "SubscriptionFixedFeeQuantitySchedule", "SubscriptionMaximumInterval", + "SubscriptionMaximumIntervalFilter", "SubscriptionMinimumInterval", + "SubscriptionMinimumIntervalFilter", "SubscriptionPendingSubscriptionChange", "SubscriptionPriceInterval", "SubscriptionPriceIntervalFixedFeeQuantityTransition", @@ -39,6 +49,17 @@ ] +class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): id: str @@ -47,6 +68,9 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(B applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -66,6 +90,17 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(B """ +class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): id: str @@ -80,6 +115,9 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment( applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -93,6 +131,17 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment( """The reason for the adjustment.""" +class SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel): id: str @@ -101,6 +150,9 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustm applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -120,6 +172,17 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustm """The reason for the adjustment.""" +class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): id: str @@ -128,6 +191,9 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseMod applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -150,6 +216,17 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseMod """The reason for the adjustment.""" +class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel): id: str @@ -158,6 +235,9 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseMod applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -228,13 +308,21 @@ class SubscriptionBillingCycleAnchorConfiguration(BaseModel): """ +class SubscriptionDiscountIntervalAmountDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class SubscriptionDiscountIntervalAmountDiscountInterval(BaseModel): amount_discount: str """Only available if discount_type is `amount`.""" - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" - applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -243,14 +331,25 @@ class SubscriptionDiscountIntervalAmountDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[SubscriptionDiscountIntervalAmountDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" -class SubscriptionDiscountIntervalPercentageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class SubscriptionDiscountIntervalPercentageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + values: List[str] + """The IDs or values that match this filter.""" + + +class SubscriptionDiscountIntervalPercentageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -259,6 +358,9 @@ class SubscriptionDiscountIntervalPercentageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[SubscriptionDiscountIntervalPercentageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + percentage_discount: float """ Only available if discount_type is `percentage`.This is a number between 0 @@ -269,10 +371,18 @@ class SubscriptionDiscountIntervalPercentageDiscountInterval(BaseModel): """The start date of the discount interval.""" -class SubscriptionDiscountIntervalUsageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class SubscriptionDiscountIntervalUsageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class SubscriptionDiscountIntervalUsageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -281,6 +391,9 @@ class SubscriptionDiscountIntervalUsageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[SubscriptionDiscountIntervalUsageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" @@ -311,16 +424,27 @@ class SubscriptionFixedFeeQuantitySchedule(BaseModel): start_date: datetime -class SubscriptionMaximumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this maximum interval applies to.""" +class SubscriptionMaximumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class SubscriptionMaximumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this maximum interval applies to.""" end_date: Optional[datetime] = None """The end date of the maximum interval.""" + filters: List[SubscriptionMaximumIntervalFilter] + """The filters that determine which prices this maximum interval applies to.""" + maximum_amount: str """ The maximum amount to charge in a given billing period for the price intervals @@ -331,16 +455,27 @@ class SubscriptionMaximumInterval(BaseModel): """The start date of the maximum interval.""" -class SubscriptionMinimumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this minimum interval applies to.""" +class SubscriptionMinimumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class SubscriptionMinimumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this minimum interval applies to.""" end_date: Optional[datetime] = None """The end date of the minimum interval.""" + filters: List[SubscriptionMinimumIntervalFilter] + """The filters that determine which prices this minimum interval applies to.""" + minimum_amount: str """ The minimum amount to charge in a given billing period for the price intervals @@ -552,6 +687,9 @@ class Subscription(BaseModel): minimum_intervals: List[SubscriptionMinimumInterval] """The minimum intervals for this subscription sorted by the start_date.""" + name: str + """The name of the subscription.""" + net_terms: int """ Determines the difference between the invoice issue date for subscription @@ -563,7 +701,7 @@ class Subscription(BaseModel): pending_subscription_change: Optional[SubscriptionPendingSubscriptionChange] = None """A pending subscription change if one exists on this subscription.""" - plan: Plan + plan: Optional[Plan] = None """ 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 diff --git a/src/orb/types/subscription_change_retrieve_response.py b/src/orb/types/subscription_change_retrieve_response.py index 04068bf2..3beed64f 100644 --- a/src/orb/types/subscription_change_retrieve_response.py +++ b/src/orb/types/subscription_change_retrieve_response.py @@ -18,18 +18,28 @@ "SubscriptionAdjustmentInterval", "SubscriptionAdjustmentIntervalAdjustment", "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment", + "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter", "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment", + "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter", "SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment", + "SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter", "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment", + "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter", "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment", + "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter", "SubscriptionBillingCycleAnchorConfiguration", "SubscriptionDiscountInterval", "SubscriptionDiscountIntervalAmountDiscountInterval", + "SubscriptionDiscountIntervalAmountDiscountIntervalFilter", "SubscriptionDiscountIntervalPercentageDiscountInterval", + "SubscriptionDiscountIntervalPercentageDiscountIntervalFilter", "SubscriptionDiscountIntervalUsageDiscountInterval", + "SubscriptionDiscountIntervalUsageDiscountIntervalFilter", "SubscriptionFixedFeeQuantitySchedule", "SubscriptionMaximumInterval", + "SubscriptionMaximumIntervalFilter", "SubscriptionMinimumInterval", + "SubscriptionMinimumIntervalFilter", "SubscriptionPendingSubscriptionChange", "SubscriptionPriceInterval", "SubscriptionPriceIntervalFixedFeeQuantityTransition", @@ -39,6 +49,17 @@ ] +class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): id: str @@ -47,6 +68,9 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(B applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -66,6 +90,17 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(B """ +class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): id: str @@ -80,6 +115,9 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment( applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -93,6 +131,17 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment( """The reason for the adjustment.""" +class SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel): id: str @@ -101,6 +150,9 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustm applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -120,6 +172,17 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustm """The reason for the adjustment.""" +class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): id: str @@ -128,6 +191,9 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseMod applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -150,6 +216,17 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseMod """The reason for the adjustment.""" +class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel): id: str @@ -158,6 +235,9 @@ class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseMod applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -228,13 +308,21 @@ class SubscriptionBillingCycleAnchorConfiguration(BaseModel): """ +class SubscriptionDiscountIntervalAmountDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class SubscriptionDiscountIntervalAmountDiscountInterval(BaseModel): amount_discount: str """Only available if discount_type is `amount`.""" - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" - applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -243,14 +331,25 @@ class SubscriptionDiscountIntervalAmountDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[SubscriptionDiscountIntervalAmountDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" -class SubscriptionDiscountIntervalPercentageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class SubscriptionDiscountIntervalPercentageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + values: List[str] + """The IDs or values that match this filter.""" + + +class SubscriptionDiscountIntervalPercentageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -259,6 +358,9 @@ class SubscriptionDiscountIntervalPercentageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[SubscriptionDiscountIntervalPercentageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + percentage_discount: float """ Only available if discount_type is `percentage`.This is a number between 0 @@ -269,10 +371,18 @@ class SubscriptionDiscountIntervalPercentageDiscountInterval(BaseModel): """The start date of the discount interval.""" -class SubscriptionDiscountIntervalUsageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class SubscriptionDiscountIntervalUsageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class SubscriptionDiscountIntervalUsageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -281,6 +391,9 @@ class SubscriptionDiscountIntervalUsageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[SubscriptionDiscountIntervalUsageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" @@ -311,16 +424,27 @@ class SubscriptionFixedFeeQuantitySchedule(BaseModel): start_date: datetime -class SubscriptionMaximumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this maximum interval applies to.""" +class SubscriptionMaximumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class SubscriptionMaximumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this maximum interval applies to.""" end_date: Optional[datetime] = None """The end date of the maximum interval.""" + filters: List[SubscriptionMaximumIntervalFilter] + """The filters that determine which prices this maximum interval applies to.""" + maximum_amount: str """ The maximum amount to charge in a given billing period for the price intervals @@ -331,16 +455,27 @@ class SubscriptionMaximumInterval(BaseModel): """The start date of the maximum interval.""" -class SubscriptionMinimumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this minimum interval applies to.""" +class SubscriptionMinimumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class SubscriptionMinimumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this minimum interval applies to.""" end_date: Optional[datetime] = None """The end date of the minimum interval.""" + filters: List[SubscriptionMinimumIntervalFilter] + """The filters that determine which prices this minimum interval applies to.""" + minimum_amount: str """ The minimum amount to charge in a given billing period for the price intervals @@ -552,6 +687,9 @@ class Subscription(BaseModel): minimum_intervals: List[SubscriptionMinimumInterval] """The minimum intervals for this subscription sorted by the start_date.""" + name: str + """The name of the subscription.""" + net_terms: int """ Determines the difference between the invoice issue date for subscription @@ -563,7 +701,7 @@ class Subscription(BaseModel): pending_subscription_change: Optional[SubscriptionPendingSubscriptionChange] = None """A pending subscription change if one exists on this subscription.""" - plan: Plan + plan: Optional[Plan] = None """ 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 diff --git a/src/orb/types/subscription_create_params.py b/src/orb/types/subscription_create_params.py index cf34ff18..a85819a9 100644 --- a/src/orb/types/subscription_create_params.py +++ b/src/orb/types/subscription_create_params.py @@ -19,96 +19,136 @@ "AddAdjustmentAdjustmentNewMaximum", "AddPrice", "AddPriceAllocationPrice", + "AddPriceAllocationPriceCustomExpiration", "AddPriceDiscount", "AddPricePrice", "AddPricePriceNewSubscriptionUnitPrice", "AddPricePriceNewSubscriptionUnitPriceUnitConfig", "AddPricePriceNewSubscriptionUnitPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionUnitPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionPackagePrice", "AddPricePriceNewSubscriptionPackagePricePackageConfig", "AddPricePriceNewSubscriptionPackagePriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionPackagePriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionMatrixPrice", "AddPricePriceNewSubscriptionMatrixPriceMatrixConfig", "AddPricePriceNewSubscriptionMatrixPriceMatrixConfigMatrixValue", "AddPricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionMatrixPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionTieredPrice", "AddPricePriceNewSubscriptionTieredPriceTieredConfig", "AddPricePriceNewSubscriptionTieredPriceTieredConfigTier", "AddPricePriceNewSubscriptionTieredPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionTieredPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionTieredBpsPrice", "AddPricePriceNewSubscriptionTieredBpsPriceTieredBpsConfig", "AddPricePriceNewSubscriptionTieredBpsPriceTieredBpsConfigTier", "AddPricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionTieredBpsPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionBpsPrice", "AddPricePriceNewSubscriptionBpsPriceBpsConfig", "AddPricePriceNewSubscriptionBpsPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionBpsPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionBulkBpsPrice", "AddPricePriceNewSubscriptionBulkBpsPriceBulkBpsConfig", "AddPricePriceNewSubscriptionBulkBpsPriceBulkBpsConfigTier", "AddPricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionBulkBpsPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionBulkPrice", "AddPricePriceNewSubscriptionBulkPriceBulkConfig", "AddPricePriceNewSubscriptionBulkPriceBulkConfigTier", "AddPricePriceNewSubscriptionBulkPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionBulkPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionThresholdTotalAmountPrice", "AddPricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionThresholdTotalAmountPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionTieredPackagePrice", "AddPricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionTieredPackagePriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionTieredWithMinimumPrice", "AddPricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionTieredWithMinimumPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionUnitWithPercentPrice", "AddPricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionUnitWithPercentPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionPackageWithAllocationPrice", "AddPricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionPackageWithAllocationPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionTierWithProrationPrice", "AddPricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionTierWithProrationPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionUnitWithProrationPrice", "AddPricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionUnitWithProrationPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionGroupedAllocationPrice", "AddPricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionGroupedAllocationPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionGroupedWithProratedMinimumPrice", "AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionBulkWithProrationPrice", "AddPricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionBulkWithProrationPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice", "AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice", "AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionCumulativeGroupedBulkPrice", "AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionMaxGroupTieredPackagePrice", "AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPrice", "AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionMatrixWithDisplayNamePrice", "AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionGroupedTieredPackagePrice", "AddPricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionGroupedTieredPackagePriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration", + "AddPricePriceNewSubscriptionMatrixWithAllocationPrice", + "AddPricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfig", + "AddPricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue", + "AddPricePriceNewSubscriptionMatrixWithAllocationPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionMatrixWithAllocationPriceDimensionalPriceConfiguration", + "AddPricePriceNewSubscriptionMatrixWithAllocationPriceInvoicingCycleConfiguration", + "AddPricePriceNewSubscriptionTieredPackageWithMinimumPrice", + "AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceDimensionalPriceConfiguration", + "AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceInvoicingCycleConfiguration", + "AddPricePriceNewSubscriptionGroupedTieredPrice", + "AddPricePriceNewSubscriptionGroupedTieredPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionGroupedTieredPriceDimensionalPriceConfiguration", + "AddPricePriceNewSubscriptionGroupedTieredPriceInvoicingCycleConfiguration", "BillingCycleAnchorConfiguration", "RemoveAdjustment", "RemovePrice", @@ -121,96 +161,136 @@ "ReplaceAdjustmentAdjustmentNewMaximum", "ReplacePrice", "ReplacePriceAllocationPrice", + "ReplacePriceAllocationPriceCustomExpiration", "ReplacePriceDiscount", "ReplacePricePrice", "ReplacePricePriceNewSubscriptionUnitPrice", "ReplacePricePriceNewSubscriptionUnitPriceUnitConfig", "ReplacePricePriceNewSubscriptionUnitPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionUnitPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionPackagePrice", "ReplacePricePriceNewSubscriptionPackagePricePackageConfig", "ReplacePricePriceNewSubscriptionPackagePriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionPackagePriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionMatrixPrice", "ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfig", "ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfigMatrixValue", "ReplacePricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionMatrixPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionTieredPrice", "ReplacePricePriceNewSubscriptionTieredPriceTieredConfig", "ReplacePricePriceNewSubscriptionTieredPriceTieredConfigTier", "ReplacePricePriceNewSubscriptionTieredPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionTieredPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionTieredBpsPrice", "ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfig", "ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfigTier", "ReplacePricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionTieredBpsPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionBpsPrice", "ReplacePricePriceNewSubscriptionBpsPriceBpsConfig", "ReplacePricePriceNewSubscriptionBpsPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionBpsPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionBulkBpsPrice", "ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfig", "ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfigTier", "ReplacePricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionBulkBpsPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionBulkPrice", "ReplacePricePriceNewSubscriptionBulkPriceBulkConfig", "ReplacePricePriceNewSubscriptionBulkPriceBulkConfigTier", "ReplacePricePriceNewSubscriptionBulkPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionBulkPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionThresholdTotalAmountPrice", "ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionTieredPackagePrice", "ReplacePricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionTieredPackagePriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionTieredWithMinimumPrice", "ReplacePricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionTieredWithMinimumPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionUnitWithPercentPrice", "ReplacePricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionUnitWithPercentPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionPackageWithAllocationPrice", "ReplacePricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionPackageWithAllocationPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionTierWithProrationPrice", "ReplacePricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionTierWithProrationPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionUnitWithProrationPrice", "ReplacePricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionUnitWithProrationPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionGroupedAllocationPrice", "ReplacePricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionGroupedAllocationPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPrice", "ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionBulkWithProrationPrice", "ReplacePricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionBulkWithProrationPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice", "ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice", "ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPrice", "ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePrice", "ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPrice", "ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePrice", "ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionGroupedTieredPackagePrice", "ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration", + "ReplacePricePriceNewSubscriptionMatrixWithAllocationPrice", + "ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfig", + "ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue", + "ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPrice", + "ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewSubscriptionGroupedTieredPrice", + "ReplacePricePriceNewSubscriptionGroupedTieredPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionGroupedTieredPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewSubscriptionGroupedTieredPriceInvoicingCycleConfiguration", ] @@ -252,6 +332,12 @@ class SubscriptionCreateParams(TypedDict, total=False): credits_overage_rate: Optional[float] + currency: Optional[str] + """The currency to use for the subscription. + + If not specified, the invoicing currency for the plan will be used. + """ + customer_id: Optional[str] default_invoice_memo: Optional[str] @@ -299,6 +385,12 @@ class SubscriptionCreateParams(TypedDict, total=False): metadata mapping can be cleared by setting `metadata` to `null`. """ + name: Optional[str] + """The name to use for the subscription. + + If not specified, the plan name will be used. + """ + net_terms: Optional[int] """ The net terms determines the difference between the invoice date and the issue @@ -374,11 +466,11 @@ class SubscriptionCreateParams(TypedDict, total=False): class AddAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False): adjustment_type: Required[Literal["percentage_discount"]] - applies_to_price_ids: Required[List[str]] - """The set of price IDs to which this adjustment applies.""" - percentage_discount: Required[float] + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + is_invoice_level: bool """When false, this adjustment will be applied to a single price. @@ -389,11 +481,11 @@ class AddAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False): class AddAdjustmentAdjustmentNewUsageDiscount(TypedDict, total=False): adjustment_type: Required[Literal["usage_discount"]] - applies_to_price_ids: Required[List[str]] - """The set of price IDs to which this adjustment applies.""" - usage_discount: Required[float] + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + is_invoice_level: bool """When false, this adjustment will be applied to a single price. @@ -406,7 +498,7 @@ class AddAdjustmentAdjustmentNewAmountDiscount(TypedDict, total=False): amount_discount: Required[str] - applies_to_price_ids: Required[List[str]] + applies_to_price_ids: Optional[List[str]] """The set of price IDs to which this adjustment applies.""" is_invoice_level: bool @@ -419,14 +511,14 @@ class AddAdjustmentAdjustmentNewAmountDiscount(TypedDict, total=False): class AddAdjustmentAdjustmentNewMinimum(TypedDict, total=False): adjustment_type: Required[Literal["minimum"]] - applies_to_price_ids: Required[List[str]] - """The set of price IDs to which this adjustment applies.""" - item_id: Required[str] """The item ID that revenue from this minimum will be attributed to.""" minimum_amount: Required[str] + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + is_invoice_level: bool """When false, this adjustment will be applied to a single price. @@ -437,11 +529,11 @@ class AddAdjustmentAdjustmentNewMinimum(TypedDict, total=False): class AddAdjustmentAdjustmentNewMaximum(TypedDict, total=False): adjustment_type: Required[Literal["maximum"]] - applies_to_price_ids: Required[List[str]] - """The set of price IDs to which this adjustment applies.""" - maximum_amount: Required[str] + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + is_invoice_level: bool """When false, this adjustment will be applied to a single price. @@ -481,6 +573,12 @@ class AddAdjustment(TypedDict, total=False): """ +class AddPriceAllocationPriceCustomExpiration(TypedDict, total=False): + duration: Required[int] + + duration_unit: Required[Literal["day", "month"]] + + class AddPriceAllocationPrice(TypedDict, total=False): amount: Required[str] """An amount of the currency to allocate to the customer at the specified cadence.""" @@ -494,10 +592,13 @@ class AddPriceAllocationPrice(TypedDict, total=False): this price. """ - expires_at_end_of_cadence: Required[bool] + custom_expiration: Optional[AddPriceAllocationPriceCustomExpiration] + """The custom expiration for the allocation.""" + + expires_at_end_of_cadence: Optional[bool] """ Whether the allocated amount should expire at the end of the cadence or roll - over to the next period. + over to the next period. Set to null if using custom_expiration. """ @@ -533,6 +634,20 @@ class AddPricePriceNewSubscriptionUnitPriceBillingCycleConfiguration(TypedDict, """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionUnitPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -582,6 +697,9 @@ class AddPricePriceNewSubscriptionUnitPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionUnitPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -634,6 +752,20 @@ class AddPricePriceNewSubscriptionPackagePriceBillingCycleConfiguration(TypedDic """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -683,6 +815,9 @@ class AddPricePriceNewSubscriptionPackagePrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionPackagePriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -746,6 +881,20 @@ class AddPricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration(TypedDict """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionMatrixPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -795,6 +944,9 @@ class AddPricePriceNewSubscriptionMatrixPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionMatrixPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -851,6 +1003,20 @@ class AddPricePriceNewSubscriptionTieredPriceBillingCycleConfiguration(TypedDict """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionTieredPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -900,6 +1066,9 @@ class AddPricePriceNewSubscriptionTieredPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionTieredPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -962,6 +1131,20 @@ class AddPricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration(TypedD """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionTieredBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1011,6 +1194,9 @@ class AddPricePriceNewSubscriptionTieredBpsPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionTieredBpsPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1059,6 +1245,20 @@ class AddPricePriceNewSubscriptionBpsPriceBillingCycleConfiguration(TypedDict, t """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1108,6 +1308,9 @@ class AddPricePriceNewSubscriptionBpsPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionBpsPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1167,6 +1370,20 @@ class AddPricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration(TypedDic """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionBulkBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1216,6 +1433,9 @@ class AddPricePriceNewSubscriptionBulkBpsPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionBulkBpsPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1269,6 +1489,20 @@ class AddPricePriceNewSubscriptionBulkPriceBillingCycleConfiguration(TypedDict, """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionBulkPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1318,6 +1552,9 @@ class AddPricePriceNewSubscriptionBulkPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionBulkPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1358,6 +1595,20 @@ class AddPricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfigura """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionThresholdTotalAmountPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1409,6 +1660,11 @@ class AddPricePriceNewSubscriptionThresholdTotalAmountPrice(TypedDict, total=Fal price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionThresholdTotalAmountPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1451,6 +1707,20 @@ class AddPricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration(Ty """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1500,6 +1770,11 @@ class AddPricePriceNewSubscriptionTieredPackagePrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionTieredPackagePriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1540,6 +1815,20 @@ class AddPricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguratio """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionTieredWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1589,6 +1878,11 @@ class AddPricePriceNewSubscriptionTieredWithMinimumPrice(TypedDict, total=False) price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionTieredWithMinimumPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1631,6 +1925,20 @@ class AddPricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration( """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionUnitWithPercentPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1680,6 +1988,11 @@ class AddPricePriceNewSubscriptionUnitWithPercentPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionUnitWithPercentPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1720,6 +2033,20 @@ class AddPricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfigur """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionPackageWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1771,6 +2098,11 @@ class AddPricePriceNewSubscriptionPackageWithAllocationPrice(TypedDict, total=Fa price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionPackageWithAllocationPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1813,6 +2145,20 @@ class AddPricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguratio """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionTierWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1862,6 +2208,11 @@ class AddPricePriceNewSubscriptionTierWithProrationPrice(TypedDict, total=False) price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionTierWithProrationPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1904,6 +2255,20 @@ class AddPricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguratio """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionUnitWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1953,6 +2318,11 @@ class AddPricePriceNewSubscriptionUnitWithProrationPrice(TypedDict, total=False) price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionUnitWithProrationPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1995,6 +2365,20 @@ class AddPricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguratio """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionGroupedAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2044,6 +2428,11 @@ class AddPricePriceNewSubscriptionGroupedAllocationPrice(TypedDict, total=False) price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionGroupedAllocationPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2086,6 +2475,20 @@ class AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleCon """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2137,6 +2540,11 @@ class AddPricePriceNewSubscriptionGroupedWithProratedMinimumPrice(TypedDict, tot price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2179,6 +2587,20 @@ class AddPricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguratio """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionBulkWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2228,6 +2650,11 @@ class AddPricePriceNewSubscriptionBulkWithProrationPrice(TypedDict, total=False) price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionBulkWithProrationPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2270,6 +2697,22 @@ class AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycle """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration( + TypedDict, total=False +): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2321,6 +2764,11 @@ class AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice(TypedDict, price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2363,6 +2811,22 @@ class AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCyc """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration( + TypedDict, total=False +): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration( TypedDict, total=False ): @@ -2416,6 +2880,11 @@ class AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice(TypedDict price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2458,6 +2927,20 @@ class AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfigur """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2509,6 +2992,11 @@ class AddPricePriceNewSubscriptionCumulativeGroupedBulkPrice(TypedDict, total=Fa price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2551,6 +3039,20 @@ class AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfigur """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2602,6 +3104,11 @@ class AddPricePriceNewSubscriptionMaxGroupTieredPackagePrice(TypedDict, total=Fa price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2644,6 +3151,20 @@ class AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConf """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2695,6 +3216,11 @@ class AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPrice(TypedDict, tota price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2737,6 +3263,20 @@ class AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfigur """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2788,6 +3328,11 @@ class AddPricePriceNewSubscriptionMatrixWithDisplayNamePrice(TypedDict, total=Fa price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2830,6 +3375,20 @@ class AddPricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfigura """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionGroupedTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2881,6 +3440,11 @@ class AddPricePriceNewSubscriptionGroupedTieredPackagePrice(TypedDict, total=Fal price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionGroupedTieredPackagePriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2915,261 +3479,1006 @@ class AddPricePriceNewSubscriptionGroupedTieredPackagePrice(TypedDict, total=Fal """ -AddPricePrice: TypeAlias = Union[ - AddPricePriceNewSubscriptionUnitPrice, - AddPricePriceNewSubscriptionPackagePrice, - AddPricePriceNewSubscriptionMatrixPrice, - AddPricePriceNewSubscriptionTieredPrice, - AddPricePriceNewSubscriptionTieredBpsPrice, - AddPricePriceNewSubscriptionBpsPrice, - AddPricePriceNewSubscriptionBulkBpsPrice, - AddPricePriceNewSubscriptionBulkPrice, - AddPricePriceNewSubscriptionThresholdTotalAmountPrice, - AddPricePriceNewSubscriptionTieredPackagePrice, - AddPricePriceNewSubscriptionTieredWithMinimumPrice, - AddPricePriceNewSubscriptionUnitWithPercentPrice, - AddPricePriceNewSubscriptionPackageWithAllocationPrice, - AddPricePriceNewSubscriptionTierWithProrationPrice, - AddPricePriceNewSubscriptionUnitWithProrationPrice, - AddPricePriceNewSubscriptionGroupedAllocationPrice, - AddPricePriceNewSubscriptionGroupedWithProratedMinimumPrice, - AddPricePriceNewSubscriptionBulkWithProrationPrice, - AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice, - AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice, - AddPricePriceNewSubscriptionCumulativeGroupedBulkPrice, - AddPricePriceNewSubscriptionMaxGroupTieredPackagePrice, - AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPrice, - AddPricePriceNewSubscriptionMatrixWithDisplayNamePrice, - AddPricePriceNewSubscriptionGroupedTieredPackagePrice, -] +class AddPricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue( + TypedDict, total=False +): + dimension_values: Required[List[Optional[str]]] + """One or two matrix keys to filter usage to this Matrix value by. + For example, ["region", "tier"] could be used to filter cloud usage by a cloud + region and an instance tier. + """ + + unit_amount: Required[str] + """Unit price for the specified dimension_values""" + + +class AddPricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfig(TypedDict, total=False): + allocation: Required[float] + """Allocation to be used to calculate the price""" + + default_unit_amount: Required[str] + """Default per unit rate for any usage not bucketed into a specified matrix_value""" + + dimensions: Required[List[Optional[str]]] + """One or two event property values to evaluate matrix groups by""" + + matrix_values: Required[ + Iterable[AddPricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue] + ] + """Matrix values for specified matrix grouping keys""" + + +class AddPricePriceNewSubscriptionMatrixWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewSubscriptionMatrixWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewSubscriptionMatrixWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewSubscriptionMatrixWithAllocationPrice(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.""" + + matrix_with_allocation_config: Required[ + AddPricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfig + ] + + model_type: Required[Literal["matrix_with_allocation"]] + + 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[ + AddPricePriceNewSubscriptionMatrixWithAllocationPriceBillingCycleConfiguration + ] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionMatrixWithAllocationPriceDimensionalPriceConfiguration + ] + """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[ + AddPricePriceNewSubscriptionMatrixWithAllocationPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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 AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewSubscriptionTieredPackageWithMinimumPrice(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_package_with_minimum"]] + + name: Required[str] + """The name of the price.""" + + tiered_package_with_minimum_config: Required[Dict[str, object]] + + 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[ + AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceBillingCycleConfiguration + ] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceDimensionalPriceConfiguration + ] + """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[ + AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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 AddPricePriceNewSubscriptionGroupedTieredPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewSubscriptionGroupedTieredPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewSubscriptionGroupedTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewSubscriptionGroupedTieredPrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_tiered"]] + + 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[AddPricePriceNewSubscriptionGroupedTieredPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionGroupedTieredPriceDimensionalPriceConfiguration + ] + """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[AddPricePriceNewSubscriptionGroupedTieredPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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[ + AddPricePriceNewSubscriptionUnitPrice, + AddPricePriceNewSubscriptionPackagePrice, + AddPricePriceNewSubscriptionMatrixPrice, + AddPricePriceNewSubscriptionTieredPrice, + AddPricePriceNewSubscriptionTieredBpsPrice, + AddPricePriceNewSubscriptionBpsPrice, + AddPricePriceNewSubscriptionBulkBpsPrice, + AddPricePriceNewSubscriptionBulkPrice, + AddPricePriceNewSubscriptionThresholdTotalAmountPrice, + AddPricePriceNewSubscriptionTieredPackagePrice, + AddPricePriceNewSubscriptionTieredWithMinimumPrice, + AddPricePriceNewSubscriptionUnitWithPercentPrice, + AddPricePriceNewSubscriptionPackageWithAllocationPrice, + AddPricePriceNewSubscriptionTierWithProrationPrice, + AddPricePriceNewSubscriptionUnitWithProrationPrice, + AddPricePriceNewSubscriptionGroupedAllocationPrice, + AddPricePriceNewSubscriptionGroupedWithProratedMinimumPrice, + AddPricePriceNewSubscriptionBulkWithProrationPrice, + AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice, + AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice, + AddPricePriceNewSubscriptionCumulativeGroupedBulkPrice, + AddPricePriceNewSubscriptionMaxGroupTieredPackagePrice, + AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPrice, + AddPricePriceNewSubscriptionMatrixWithDisplayNamePrice, + AddPricePriceNewSubscriptionGroupedTieredPackagePrice, + AddPricePriceNewSubscriptionMatrixWithAllocationPrice, + AddPricePriceNewSubscriptionTieredPackageWithMinimumPrice, + AddPricePriceNewSubscriptionGroupedTieredPrice, +] + + +class AddPrice(TypedDict, total=False): + allocation_price: Optional[AddPriceAllocationPrice] + """The definition of a new allocation price to create and add to the subscription.""" + + discounts: Optional[Iterable[AddPriceDiscount]] + """[DEPRECATED] Use add_adjustments instead. + + The subscription's discounts for this price. + """ + + end_date: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")] + """The end date of the price interval. + + This is the date that the price will stop billing on the subscription. If null, + billing will end when the phase or subscription ends. + """ + + external_price_id: Optional[str] + """The external price id of the price to add to the subscription.""" + + maximum_amount: Optional[str] + """[DEPRECATED] Use add_adjustments instead. + + The subscription's maximum amount for this price. + """ + + minimum_amount: Optional[str] + """[DEPRECATED] Use add_adjustments instead. + + The subscription's minimum amount for this price. + """ + + plan_phase_order: Optional[int] + """The phase to add this price to.""" + + price: Optional[AddPricePrice] + """The definition of a new price to create and add to the subscription.""" + + price_id: Optional[str] + """The id of the price to add to the subscription.""" + + start_date: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")] + """The start date of the price interval. + + This is the date that the price will start billing on the subscription. If null, + billing will start when the phase or subscription starts. + """ + + +class BillingCycleAnchorConfiguration(TypedDict, total=False): + day: Required[int] + """The day of the month on which the billing cycle is anchored. + + If the maximum number of days in a month is greater than this value, the last + day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April + means the billing period begins on the 30th. + """ + + month: Optional[int] + """The month on which the billing cycle is anchored (e.g. + + a quarterly price anchored in February would have cycles starting February, May, + August, and November). + """ + + year: Optional[int] + """The year on which the billing cycle is anchored (e.g. + + a 2 year billing cycle anchored on 2021 would have cycles starting on 2021, + 2023, 2025, etc.). + """ + + +class RemoveAdjustment(TypedDict, total=False): + adjustment_id: Required[str] + """The id of the adjustment to remove on the subscription.""" + + +class RemovePrice(TypedDict, total=False): + external_price_id: Optional[str] + """The external price id of the price to remove on the subscription.""" + + price_id: Optional[str] + """The id of the price to remove on the subscription.""" + + +class ReplaceAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False): + adjustment_type: Required[Literal["percentage_discount"]] -class AddPrice(TypedDict, total=False): - allocation_price: Optional[AddPriceAllocationPrice] - """The definition of a new allocation price to create and add to the subscription.""" + percentage_discount: Required[float] - discounts: Optional[Iterable[AddPriceDiscount]] - """[DEPRECATED] Use add_adjustments instead. + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" - The subscription's discounts for this price. + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. """ - end_date: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")] - """The end date of the price interval. - This is the date that the price will stop billing on the subscription. If null, - billing will end when the phase or subscription ends. +class ReplaceAdjustmentAdjustmentNewUsageDiscount(TypedDict, total=False): + adjustment_type: Required[Literal["usage_discount"]] + + usage_discount: Required[float] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +class ReplaceAdjustmentAdjustmentNewAmountDiscount(TypedDict, total=False): + adjustment_type: Required[Literal["amount_discount"]] + + amount_discount: Required[str] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +class ReplaceAdjustmentAdjustmentNewMinimum(TypedDict, total=False): + adjustment_type: Required[Literal["minimum"]] + + item_id: Required[str] + """The item ID that revenue from this minimum will be attributed to.""" + + minimum_amount: Required[str] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +class ReplaceAdjustmentAdjustmentNewMaximum(TypedDict, total=False): + adjustment_type: Required[Literal["maximum"]] + + maximum_amount: Required[str] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +ReplaceAdjustmentAdjustment: TypeAlias = Union[ + ReplaceAdjustmentAdjustmentNewPercentageDiscount, + ReplaceAdjustmentAdjustmentNewUsageDiscount, + ReplaceAdjustmentAdjustmentNewAmountDiscount, + ReplaceAdjustmentAdjustmentNewMinimum, + ReplaceAdjustmentAdjustmentNewMaximum, +] + + +class ReplaceAdjustment(TypedDict, total=False): + adjustment: Required[ReplaceAdjustmentAdjustment] + """The definition of a new adjustment to create and add to the subscription.""" + + replaces_adjustment_id: Required[str] + """The id of the adjustment on the plan to replace in the subscription.""" + + +class ReplacePriceAllocationPriceCustomExpiration(TypedDict, total=False): + duration: Required[int] + + duration_unit: Required[Literal["day", "month"]] + + +class ReplacePriceAllocationPrice(TypedDict, total=False): + amount: Required[str] + """An amount of the currency to allocate to the customer at the specified cadence.""" + + cadence: Required[Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]] + """The cadence at which to allocate the amount to the customer.""" + + currency: Required[str] + """ + An ISO 4217 currency string or a custom pricing unit identifier in which to bill + this price. + """ + + custom_expiration: Optional[ReplacePriceAllocationPriceCustomExpiration] + """The custom expiration for the allocation.""" + + expires_at_end_of_cadence: Optional[bool] + """ + Whether the allocated amount should expire at the end of the cadence or roll + over to the next period. Set to null if using custom_expiration. + """ + + +class ReplacePriceDiscount(TypedDict, total=False): + discount_type: Required[Literal["percentage", "usage", "amount"]] + + amount_discount: Optional[str] + """Only available if discount_type is `amount`.""" + + percentage_discount: Optional[float] + """Only available if discount_type is `percentage`. + + This is a number between 0 and 1. + """ + + usage_discount: Optional[float] + """Only available if discount_type is `usage`. + + Number of usage units that this discount is for + """ + + +class ReplacePricePriceNewSubscriptionUnitPriceUnitConfig(TypedDict, total=False): + unit_amount: Required[str] + """Rate per unit of usage""" + + +class ReplacePricePriceNewSubscriptionUnitPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewSubscriptionUnitPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewSubscriptionUnitPrice(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["unit"]] + + name: Required[str] + """The name of the price.""" + + unit_config: Required[ReplacePricePriceNewSubscriptionUnitPriceUnitConfig] + + 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[ReplacePricePriceNewSubscriptionUnitPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. """ + dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionUnitPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] - """The external price id of the price to add to the subscription.""" + """An alias for the price.""" - maximum_amount: Optional[str] - """[DEPRECATED] Use add_adjustments instead. + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ - The subscription's maximum amount for this price. + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. """ - minimum_amount: Optional[str] - """[DEPRECATED] Use add_adjustments instead. + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. - The subscription's minimum amount for this price. + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. """ - plan_phase_order: Optional[int] - """The phase to add this price to.""" + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ - price: Optional[AddPricePrice] - """The definition of a new price to create and add to the subscription.""" - price_id: Optional[str] - """The id of the price to add to the subscription.""" +class ReplacePricePriceNewSubscriptionPackagePricePackageConfig(TypedDict, total=False): + package_amount: Required[str] + """A currency amount to rate usage by""" - start_date: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")] - """The start date of the price interval. + package_size: Required[int] + """An integer amount to represent package size. - This is the date that the price will start billing on the subscription. If null, - billing will start when the phase or subscription starts. + For example, 1000 here would divide usage by 1000 before multiplying by + package_amount in rating """ -class BillingCycleAnchorConfiguration(TypedDict, total=False): - day: Required[int] - """The day of the month on which the billing cycle is anchored. +class ReplacePricePriceNewSubscriptionPackagePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + - If the maximum number of days in a month is greater than this value, the last - day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April - means the billing period begins on the 30th. +class ReplacePricePriceNewSubscriptionPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group """ - month: Optional[int] - """The month on which the billing cycle is anchored (e.g. + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" - a quarterly price anchored in February would have cycles starting February, May, - August, and November). - """ + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" - year: Optional[int] - """The year on which the billing cycle is anchored (e.g. - a 2 year billing cycle anchored on 2021 would have cycles starting on 2021, - 2023, 2025, etc.). - """ +class ReplacePricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" -class RemoveAdjustment(TypedDict, total=False): - adjustment_id: Required[str] - """The id of the adjustment to remove on the subscription.""" +class ReplacePricePriceNewSubscriptionPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" -class RemovePrice(TypedDict, total=False): - external_price_id: Optional[str] - """The external price id of the price to remove on the subscription.""" + item_id: Required[str] + """The id of the item the price will be associated with.""" - price_id: Optional[str] - """The id of the price to remove on the subscription.""" + model_type: Required[Literal["package"]] + name: Required[str] + """The name of the price.""" -class ReplaceAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False): - adjustment_type: Required[Literal["percentage_discount"]] + package_config: Required[ReplacePricePriceNewSubscriptionPackagePricePackageConfig] - applies_to_price_ids: Required[List[str]] - """The set of price IDs to which this adjustment applies.""" + billable_metric_id: Optional[str] + """The id of the billable metric for the price. - percentage_discount: Required[float] + Only needed if the price is usage-based. + """ - is_invoice_level: bool - """When false, this adjustment will be applied to a single price. + 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. + """ - Otherwise, it will be applied at the invoice level, possibly to multiple prices. + billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionPackagePriceBillingCycleConfiguration] + """ + 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.""" -class ReplaceAdjustmentAdjustmentNewUsageDiscount(TypedDict, total=False): - adjustment_type: Required[Literal["usage_discount"]] + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ - applies_to_price_ids: Required[List[str]] - """The set of price IDs to which this adjustment applies.""" + dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionPackagePriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" - usage_discount: Required[float] + external_price_id: Optional[str] + """An alias for the price.""" - is_invoice_level: bool - """When false, this adjustment will be applied to a single price. + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ - Otherwise, it will be applied at the invoice level, possibly to multiple prices. + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. """ + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. -class ReplaceAdjustmentAdjustmentNewAmountDiscount(TypedDict, total=False): - adjustment_type: Required[Literal["amount_discount"]] + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ - amount_discount: Required[str] + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ - applies_to_price_ids: Required[List[str]] - """The set of price IDs to which this adjustment applies.""" - is_invoice_level: bool - """When false, this adjustment will be applied to a single price. +class ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfigMatrixValue(TypedDict, total=False): + dimension_values: Required[List[Optional[str]]] + """One or two matrix keys to filter usage to this Matrix value by. - Otherwise, it will be applied at the invoice level, possibly to multiple prices. + For example, ["region", "tier"] could be used to filter cloud usage by a cloud + region and an instance tier. """ + unit_amount: Required[str] + """Unit price for the specified dimension_values""" -class ReplaceAdjustmentAdjustmentNewMinimum(TypedDict, total=False): - adjustment_type: Required[Literal["minimum"]] - applies_to_price_ids: Required[List[str]] - """The set of price IDs to which this adjustment applies.""" +class ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfig(TypedDict, total=False): + default_unit_amount: Required[str] + """Default per unit rate for any usage not bucketed into a specified matrix_value""" - item_id: Required[str] - """The item ID that revenue from this minimum will be attributed to.""" + dimensions: Required[List[Optional[str]]] + """One or two event property values to evaluate matrix groups by""" - minimum_amount: Required[str] + matrix_values: Required[Iterable[ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfigMatrixValue]] + """Matrix values for specified matrix grouping keys""" - is_invoice_level: bool - """When false, this adjustment will be applied to a single price. - Otherwise, it will be applied at the invoice level, possibly to multiple prices. +class ReplacePricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewSubscriptionMatrixPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group """ + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" -class ReplaceAdjustmentAdjustmentNewMaximum(TypedDict, total=False): - adjustment_type: Required[Literal["maximum"]] + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" - applies_to_price_ids: Required[List[str]] - """The set of price IDs to which this adjustment applies.""" - maximum_amount: Required[str] +class ReplacePricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" - is_invoice_level: bool - """When false, this adjustment will be applied to a single price. + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" - Otherwise, it will be applied at the invoice level, possibly to multiple prices. - """ +class ReplacePricePriceNewSubscriptionMatrixPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" -ReplaceAdjustmentAdjustment: TypeAlias = Union[ - ReplaceAdjustmentAdjustmentNewPercentageDiscount, - ReplaceAdjustmentAdjustmentNewUsageDiscount, - ReplaceAdjustmentAdjustmentNewAmountDiscount, - ReplaceAdjustmentAdjustmentNewMinimum, - ReplaceAdjustmentAdjustmentNewMaximum, -] + item_id: Required[str] + """The id of the item the price will be associated with.""" + matrix_config: Required[ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfig] -class ReplaceAdjustment(TypedDict, total=False): - adjustment: Required[ReplaceAdjustmentAdjustment] - """The definition of a new adjustment to create and add to the subscription.""" + model_type: Required[Literal["matrix"]] - replaces_adjustment_id: Required[str] - """The id of the adjustment on the plan to replace in the subscription.""" + name: Required[str] + """The name of the price.""" + billable_metric_id: Optional[str] + """The id of the billable metric for the price. -class ReplacePriceAllocationPrice(TypedDict, total=False): - amount: Required[str] - """An amount of the currency to allocate to the customer at the specified cadence.""" + Only needed if the price is usage-based. + """ - cadence: Required[Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]] - """The cadence at which to allocate the amount to the customer.""" + 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. + """ - currency: Required[str] + billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration] """ - An ISO 4217 currency string or a custom pricing unit identifier in which to bill - this price. + For custom cadence: specifies the duration of the billing period in days or + months. """ - expires_at_end_of_cadence: Required[bool] + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + currency: Optional[str] """ - Whether the allocated amount should expire at the end of the cadence or roll - over to the next period. + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. """ + dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionMatrixPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" -class ReplacePriceDiscount(TypedDict, total=False): - discount_type: Required[Literal["percentage", "usage", "amount"]] + external_price_id: Optional[str] + """An alias for the price.""" - amount_discount: Optional[str] - """Only available if discount_type is `amount`.""" + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ - percentage_discount: Optional[float] - """Only available if discount_type is `percentage`. + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" - This is a number between 0 and 1. + invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. """ - usage_discount: Optional[float] - """Only available if discount_type is `usage`. + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. - Number of usage units that this discount is for + 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 ReplacePricePriceNewSubscriptionTieredPriceTieredConfigTier(TypedDict, total=False): + first_unit: Required[float] + """Exclusive tier starting value""" -class ReplacePricePriceNewSubscriptionUnitPriceUnitConfig(TypedDict, total=False): unit_amount: Required[str] - """Rate per unit of usage""" + """Amount per unit""" + last_unit: Optional[float] + """Inclusive tier ending value. If null, this is treated as the last tier""" -class ReplacePricePriceNewSubscriptionUnitPriceBillingCycleConfiguration(TypedDict, total=False): + +class ReplacePricePriceNewSubscriptionTieredPriceTieredConfig(TypedDict, total=False): + tiers: Required[Iterable[ReplacePricePriceNewSubscriptionTieredPriceTieredConfigTier]] + """Tiers for rating based on total usage quantities into the specified tier""" + + +class ReplacePricePriceNewSubscriptionTieredPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3177,7 +4486,21 @@ class ReplacePricePriceNewSubscriptionUnitPriceBillingCycleConfiguration(TypedDi """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTieredPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3185,19 +4508,19 @@ class ReplacePricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration(Typed """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionUnitPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTieredPrice(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["unit"]] + model_type: Required[Literal["tiered"]] name: Required[str] """The name of the price.""" - unit_config: Required[ReplacePricePriceNewSubscriptionUnitPriceUnitConfig] + tiered_config: Required[ReplacePricePriceNewSubscriptionTieredPriceTieredConfig] billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -3211,7 +4534,7 @@ class ReplacePricePriceNewSubscriptionUnitPrice(TypedDict, total=False): this is true, and in-arrears if this is false. """ - billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionUnitPriceBillingCycleConfiguration] + billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredPriceBillingCycleConfiguration] """ For custom cadence: specifies the duration of the billing period in days or months. @@ -3226,6 +4549,9 @@ class ReplacePricePriceNewSubscriptionUnitPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionTieredPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -3238,7 +4564,7 @@ class ReplacePricePriceNewSubscriptionUnitPrice(TypedDict, total=False): invoice_grouping_key: Optional[str] """The property used to group this price on an invoice""" - invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration] + invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration] """Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle. @@ -3258,19 +4584,29 @@ class ReplacePricePriceNewSubscriptionUnitPrice(TypedDict, total=False): """ -class ReplacePricePriceNewSubscriptionPackagePricePackageConfig(TypedDict, total=False): - package_amount: Required[str] - """A currency amount to rate usage by""" +class ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfigTier(TypedDict, total=False): + bps: Required[float] + """Per-event basis point rate""" - package_size: Required[int] - """An integer amount to represent package size. + minimum_amount: Required[str] + """Exclusive tier starting value""" - For example, 1000 here would divide usage by 1000 before multiplying by - package_amount in rating + maximum_amount: Optional[str] + """Inclusive tier ending value""" + + per_unit_maximum: Optional[str] + """Per unit maximum to charge""" + + +class ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfig(TypedDict, total=False): + tiers: Required[Iterable[ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfigTier]] + """ + Tiers for a Graduated BPS pricing model, where usage is bucketed into specified + tiers """ -class ReplacePricePriceNewSubscriptionPackagePriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3278,7 +4614,21 @@ class ReplacePricePriceNewSubscriptionPackagePriceBillingCycleConfiguration(Type """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTieredBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3286,19 +4636,19 @@ class ReplacePricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration(Ty """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionPackagePrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTieredBpsPrice(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["package"]] + model_type: Required[Literal["tiered_bps"]] name: Required[str] """The name of the price.""" - package_config: Required[ReplacePricePriceNewSubscriptionPackagePricePackageConfig] + tiered_bps_config: Required[ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfig] billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -3312,7 +4662,7 @@ class ReplacePricePriceNewSubscriptionPackagePrice(TypedDict, total=False): this is true, and in-arrears if this is false. """ - billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionPackagePriceBillingCycleConfiguration] + billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration] """ For custom cadence: specifies the duration of the billing period in days or months. @@ -3327,6 +4677,11 @@ class ReplacePricePriceNewSubscriptionPackagePrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionTieredBpsPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -3339,7 +4694,7 @@ class ReplacePricePriceNewSubscriptionPackagePrice(TypedDict, total=False): invoice_grouping_key: Optional[str] """The property used to group this price on an invoice""" - invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration] + invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration] """Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle. @@ -3359,30 +4714,15 @@ class ReplacePricePriceNewSubscriptionPackagePrice(TypedDict, total=False): """ -class ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfigMatrixValue(TypedDict, total=False): - dimension_values: Required[List[Optional[str]]] - """One or two matrix keys to filter usage to this Matrix value by. - - For example, ["region", "tier"] could be used to filter cloud usage by a cloud - region and an instance tier. - """ - - unit_amount: Required[str] - """Unit price for the specified dimension_values""" - - -class ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfig(TypedDict, total=False): - default_unit_amount: Required[str] - """Default per unit rate for any usage not bucketed into a specified matrix_value""" - - dimensions: Required[List[Optional[str]]] - """One or two event property values to evaluate matrix groups by""" +class ReplacePricePriceNewSubscriptionBpsPriceBpsConfig(TypedDict, total=False): + bps: Required[float] + """Basis point take rate per event""" - matrix_values: Required[Iterable[ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfigMatrixValue]] - """Matrix values for specified matrix grouping keys""" + per_unit_maximum: Optional[str] + """Optional currency amount maximum to cap spend per event""" -class ReplacePricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionBpsPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3390,7 +4730,21 @@ class ReplacePricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration(Typed """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3398,16 +4752,16 @@ class ReplacePricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration(Typ """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionMatrixPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionBpsPrice(TypedDict, total=False): + bps_config: Required[ReplacePricePriceNewSubscriptionBpsPriceBpsConfig] + 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.""" - matrix_config: Required[ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfig] - - model_type: Required[Literal["matrix"]] + model_type: Required[Literal["bps"]] name: Required[str] """The name of the price.""" @@ -3424,7 +4778,7 @@ class ReplacePricePriceNewSubscriptionMatrixPrice(TypedDict, total=False): this is true, and in-arrears if this is false. """ - billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration] + billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBpsPriceBillingCycleConfiguration] """ For custom cadence: specifies the duration of the billing period in days or months. @@ -3439,6 +4793,9 @@ class ReplacePricePriceNewSubscriptionMatrixPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionBpsPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -3451,7 +4808,7 @@ class ReplacePricePriceNewSubscriptionMatrixPrice(TypedDict, total=False): invoice_grouping_key: Optional[str] """The property used to group this price on an invoice""" - invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration] + invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration] """Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle. @@ -3471,23 +4828,26 @@ class ReplacePricePriceNewSubscriptionMatrixPrice(TypedDict, total=False): """ -class ReplacePricePriceNewSubscriptionTieredPriceTieredConfigTier(TypedDict, total=False): - first_unit: Required[float] - """Exclusive tier starting value""" +class ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfigTier(TypedDict, total=False): + bps: Required[float] + """Basis points to rate on""" - unit_amount: Required[str] - """Amount per unit""" + maximum_amount: Optional[str] + """Upper bound for tier""" - last_unit: Optional[float] - """Inclusive tier ending value. If null, this is treated as the last tier""" + per_unit_maximum: Optional[str] + """The maximum amount to charge for any one event""" -class ReplacePricePriceNewSubscriptionTieredPriceTieredConfig(TypedDict, total=False): - tiers: Required[Iterable[ReplacePricePriceNewSubscriptionTieredPriceTieredConfigTier]] - """Tiers for rating based on total usage quantities into the specified tier""" +class ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfig(TypedDict, total=False): + tiers: Required[Iterable[ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfigTier]] + """ + Tiers for a bulk BPS pricing model where all usage is aggregated to a single + tier based on total volume + """ -class ReplacePricePriceNewSubscriptionTieredPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3495,7 +4855,21 @@ class ReplacePricePriceNewSubscriptionTieredPriceBillingCycleConfiguration(Typed """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionBulkBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3503,20 +4877,20 @@ class ReplacePricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration(Typ """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionTieredPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionBulkBpsPrice(TypedDict, total=False): + bulk_bps_config: Required[ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfig] + 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"]] + model_type: Required[Literal["bulk_bps"]] name: Required[str] """The name of the price.""" - tiered_config: Required[ReplacePricePriceNewSubscriptionTieredPriceTieredConfig] - billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -3529,7 +4903,7 @@ class ReplacePricePriceNewSubscriptionTieredPrice(TypedDict, total=False): this is true, and in-arrears if this is false. """ - billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredPriceBillingCycleConfiguration] + billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration] """ For custom cadence: specifies the duration of the billing period in days or months. @@ -3544,6 +4918,9 @@ class ReplacePricePriceNewSubscriptionTieredPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionBulkBpsPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -3556,7 +4933,7 @@ class ReplacePricePriceNewSubscriptionTieredPrice(TypedDict, total=False): invoice_grouping_key: Optional[str] """The property used to group this price on an invoice""" - invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration] + invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration] """Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle. @@ -3576,29 +4953,20 @@ class ReplacePricePriceNewSubscriptionTieredPrice(TypedDict, total=False): """ -class ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfigTier(TypedDict, total=False): - bps: Required[float] - """Per-event basis point rate""" - - minimum_amount: Required[str] - """Exclusive tier starting value""" - - maximum_amount: Optional[str] - """Inclusive tier ending value""" +class ReplacePricePriceNewSubscriptionBulkPriceBulkConfigTier(TypedDict, total=False): + unit_amount: Required[str] + """Amount per unit""" - per_unit_maximum: Optional[str] - """Per unit maximum to charge""" + maximum_units: Optional[float] + """Upper bound for this tier""" -class ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfig(TypedDict, total=False): - tiers: Required[Iterable[ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfigTier]] - """ - Tiers for a Graduated BPS pricing model, where usage is bucketed into specified - tiers - """ +class ReplacePricePriceNewSubscriptionBulkPriceBulkConfig(TypedDict, total=False): + tiers: Required[Iterable[ReplacePricePriceNewSubscriptionBulkPriceBulkConfigTier]] + """Bulk tiers for rating based on total usage volume""" -class ReplacePricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionBulkPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3606,7 +4974,21 @@ class ReplacePricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration(Ty """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionBulkPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3614,20 +4996,20 @@ class ReplacePricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration( """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionTieredBpsPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionBulkPrice(TypedDict, total=False): + bulk_config: Required[ReplacePricePriceNewSubscriptionBulkPriceBulkConfig] + 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_bps"]] + model_type: Required[Literal["bulk"]] name: Required[str] """The name of the price.""" - tiered_bps_config: Required[ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfig] - billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -3640,7 +5022,7 @@ class ReplacePricePriceNewSubscriptionTieredBpsPrice(TypedDict, total=False): this is true, and in-arrears if this is false. """ - billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration] + billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBulkPriceBillingCycleConfiguration] """ For custom cadence: specifies the duration of the billing period in days or months. @@ -3655,6 +5037,9 @@ class ReplacePricePriceNewSubscriptionTieredBpsPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionBulkPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -3667,7 +5052,7 @@ class ReplacePricePriceNewSubscriptionTieredBpsPrice(TypedDict, total=False): invoice_grouping_key: Optional[str] """The property used to group this price on an invoice""" - invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration] + invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration] """Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle. @@ -3687,15 +5072,7 @@ class ReplacePricePriceNewSubscriptionTieredBpsPrice(TypedDict, total=False): """ -class ReplacePricePriceNewSubscriptionBpsPriceBpsConfig(TypedDict, total=False): - bps: Required[float] - """Basis point take rate per event""" - - per_unit_maximum: Optional[str] - """Optional currency amount maximum to cap spend per event""" - - -class ReplacePricePriceNewSubscriptionBpsPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3703,7 +5080,21 @@ class ReplacePricePriceNewSubscriptionBpsPriceBillingCycleConfiguration(TypedDic """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3711,20 +5102,20 @@ class ReplacePricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration(TypedD """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionBpsPrice(TypedDict, total=False): - bps_config: Required[ReplacePricePriceNewSubscriptionBpsPriceBpsConfig] - +class ReplacePricePriceNewSubscriptionThresholdTotalAmountPrice(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["bps"]] + model_type: Required[Literal["threshold_total_amount"]] name: Required[str] """The name of the price.""" + threshold_total_amount_config: Required[Dict[str, object]] + billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -3737,7 +5128,9 @@ class ReplacePricePriceNewSubscriptionBpsPrice(TypedDict, total=False): this is true, and in-arrears if this is false. """ - billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBpsPriceBillingCycleConfiguration] + billing_cycle_configuration: Optional[ + ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfiguration + ] """ For custom cadence: specifies the duration of the billing period in days or months. @@ -3752,6 +5145,11 @@ class ReplacePricePriceNewSubscriptionBpsPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -3764,7 +5162,9 @@ class ReplacePricePriceNewSubscriptionBpsPrice(TypedDict, total=False): invoice_grouping_key: Optional[str] """The property used to group this price on an invoice""" - invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration] + invoicing_cycle_configuration: Optional[ + ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration + ] """Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle. @@ -3779,31 +5179,12 @@ class ReplacePricePriceNewSubscriptionBpsPrice(TypedDict, total=False): reference_id: Optional[str] """ - A transient ID that can be used to reference this price when adding adjustments - in the same API call. - """ - - -class ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfigTier(TypedDict, total=False): - bps: Required[float] - """Basis points to rate on""" - - maximum_amount: Optional[str] - """Upper bound for tier""" - - per_unit_maximum: Optional[str] - """The maximum amount to charge for any one event""" - - -class ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfig(TypedDict, total=False): - tiers: Required[Iterable[ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfigTier]] - """ - Tiers for a bulk BPS pricing model where all usage is aggregated to a single - tier based on total volume - """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ -class ReplacePricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3811,7 +5192,21 @@ class ReplacePricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration(Type """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3819,20 +5214,20 @@ class ReplacePricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration(Ty """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionBulkBpsPrice(TypedDict, total=False): - bulk_bps_config: Required[ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfig] - +class ReplacePricePriceNewSubscriptionTieredPackagePrice(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_bps"]] + model_type: Required[Literal["tiered_package"]] name: Required[str] """The name of the price.""" + tiered_package_config: Required[Dict[str, object]] + billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -3845,7 +5240,7 @@ class ReplacePricePriceNewSubscriptionBulkBpsPrice(TypedDict, total=False): this is true, and in-arrears if this is false. """ - billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration] + billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration] """ For custom cadence: specifies the duration of the billing period in days or months. @@ -3860,6 +5255,11 @@ class ReplacePricePriceNewSubscriptionBulkBpsPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionTieredPackagePriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -3872,7 +5272,9 @@ class ReplacePricePriceNewSubscriptionBulkBpsPrice(TypedDict, total=False): invoice_grouping_key: Optional[str] """The property used to group this price on an invoice""" - invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration] + invoicing_cycle_configuration: Optional[ + ReplacePricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration + ] """Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle. @@ -3892,20 +5294,7 @@ class ReplacePricePriceNewSubscriptionBulkBpsPrice(TypedDict, total=False): """ -class ReplacePricePriceNewSubscriptionBulkPriceBulkConfigTier(TypedDict, total=False): - unit_amount: Required[str] - """Amount per unit""" - - maximum_units: Optional[float] - """Upper bound for this tier""" - - -class ReplacePricePriceNewSubscriptionBulkPriceBulkConfig(TypedDict, total=False): - tiers: Required[Iterable[ReplacePricePriceNewSubscriptionBulkPriceBulkConfigTier]] - """Bulk tiers for rating based on total usage volume""" - - -class ReplacePricePriceNewSubscriptionBulkPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3913,7 +5302,21 @@ class ReplacePricePriceNewSubscriptionBulkPriceBillingCycleConfiguration(TypedDi """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTieredWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3921,20 +5324,20 @@ class ReplacePricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration(Typed """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionBulkPrice(TypedDict, total=False): - bulk_config: Required[ReplacePricePriceNewSubscriptionBulkPriceBulkConfig] - +class ReplacePricePriceNewSubscriptionTieredWithMinimumPrice(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"]] + model_type: Required[Literal["tiered_with_minimum"]] name: Required[str] """The name of the price.""" + tiered_with_minimum_config: Required[Dict[str, object]] + billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -3947,7 +5350,9 @@ class ReplacePricePriceNewSubscriptionBulkPrice(TypedDict, total=False): this is true, and in-arrears if this is false. """ - billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBulkPriceBillingCycleConfiguration] + billing_cycle_configuration: Optional[ + ReplacePricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguration + ] """ For custom cadence: specifies the duration of the billing period in days or months. @@ -3962,6 +5367,11 @@ class ReplacePricePriceNewSubscriptionBulkPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionTieredWithMinimumPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -3974,7 +5384,9 @@ class ReplacePricePriceNewSubscriptionBulkPrice(TypedDict, total=False): invoice_grouping_key: Optional[str] """The property used to group this price on an invoice""" - invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration] + invoicing_cycle_configuration: Optional[ + ReplacePricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration + ] """Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle. @@ -3994,7 +5406,7 @@ class ReplacePricePriceNewSubscriptionBulkPrice(TypedDict, total=False): """ -class ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4002,7 +5414,21 @@ class ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfi """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionUnitWithPercentPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4010,19 +5436,19 @@ class ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleCon """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionThresholdTotalAmountPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionUnitWithPercentPrice(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["threshold_total_amount"]] + model_type: Required[Literal["unit_with_percent"]] name: Required[str] """The name of the price.""" - threshold_total_amount_config: Required[Dict[str, object]] + unit_with_percent_config: Required[Dict[str, object]] billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -4036,9 +5462,7 @@ class ReplacePricePriceNewSubscriptionThresholdTotalAmountPrice(TypedDict, total this is true, and in-arrears if this is false. """ - billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfiguration - ] + billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration] """ For custom cadence: specifies the duration of the billing period in days or months. @@ -4053,6 +5477,11 @@ class ReplacePricePriceNewSubscriptionThresholdTotalAmountPrice(TypedDict, total price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionUnitWithPercentPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -4066,7 +5495,7 @@ class ReplacePricePriceNewSubscriptionThresholdTotalAmountPrice(TypedDict, total """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -4087,7 +5516,7 @@ class ReplacePricePriceNewSubscriptionThresholdTotalAmountPrice(TypedDict, total """ -class ReplacePricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4095,7 +5524,21 @@ class ReplacePricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguratio """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionPackageWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4103,19 +5546,19 @@ class ReplacePricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfigurat """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionTieredPackagePrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionPackageWithAllocationPrice(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_package"]] + model_type: Required[Literal["package_with_allocation"]] name: Required[str] """The name of the price.""" - tiered_package_config: Required[Dict[str, object]] + package_with_allocation_config: Required[Dict[str, object]] billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -4129,7 +5572,9 @@ class ReplacePricePriceNewSubscriptionTieredPackagePrice(TypedDict, total=False) this is true, and in-arrears if this is false. """ - billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration] + billing_cycle_configuration: Optional[ + ReplacePricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfiguration + ] """ For custom cadence: specifies the duration of the billing period in days or months. @@ -4144,6 +5589,11 @@ class ReplacePricePriceNewSubscriptionTieredPackagePrice(TypedDict, total=False) price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionPackageWithAllocationPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -4157,7 +5607,7 @@ class ReplacePricePriceNewSubscriptionTieredPackagePrice(TypedDict, total=False) """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -4178,7 +5628,7 @@ class ReplacePricePriceNewSubscriptionTieredPackagePrice(TypedDict, total=False) """ -class ReplacePricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4186,7 +5636,21 @@ class ReplacePricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfigur """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTierWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4194,19 +5658,19 @@ class ReplacePricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfig """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionTieredWithMinimumPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTierWithProrationPrice(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_minimum"]] + model_type: Required[Literal["tiered_with_proration"]] name: Required[str] """The name of the price.""" - tiered_with_minimum_config: Required[Dict[str, object]] + tiered_with_proration_config: Required[Dict[str, object]] billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -4221,7 +5685,7 @@ class ReplacePricePriceNewSubscriptionTieredWithMinimumPrice(TypedDict, total=Fa """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -4237,6 +5701,11 @@ class ReplacePricePriceNewSubscriptionTieredWithMinimumPrice(TypedDict, total=Fa price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionTierWithProrationPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -4250,7 +5719,7 @@ class ReplacePricePriceNewSubscriptionTieredWithMinimumPrice(TypedDict, total=Fa """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -4271,7 +5740,7 @@ class ReplacePricePriceNewSubscriptionTieredWithMinimumPrice(TypedDict, total=Fa """ -class ReplacePricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4279,7 +5748,21 @@ class ReplacePricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfigurat """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionUnitWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4287,19 +5770,19 @@ class ReplacePricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfigur """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionUnitWithPercentPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionUnitWithProrationPrice(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["unit_with_percent"]] + model_type: Required[Literal["unit_with_proration"]] name: Required[str] """The name of the price.""" - unit_with_percent_config: Required[Dict[str, object]] + unit_with_proration_config: Required[Dict[str, object]] billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -4313,7 +5796,9 @@ class ReplacePricePriceNewSubscriptionUnitWithPercentPrice(TypedDict, total=Fals this is true, and in-arrears if this is false. """ - billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration] + billing_cycle_configuration: Optional[ + ReplacePricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguration + ] """ For custom cadence: specifies the duration of the billing period in days or months. @@ -4328,6 +5813,11 @@ class ReplacePricePriceNewSubscriptionUnitWithPercentPrice(TypedDict, total=Fals price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionUnitWithProrationPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -4341,7 +5831,7 @@ class ReplacePricePriceNewSubscriptionUnitWithPercentPrice(TypedDict, total=Fals """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -4362,7 +5852,7 @@ class ReplacePricePriceNewSubscriptionUnitWithPercentPrice(TypedDict, total=Fals """ -class ReplacePricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4370,7 +5860,21 @@ class ReplacePricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConf """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4378,20 +5882,20 @@ class ReplacePricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleCo """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionPackageWithAllocationPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedAllocationPrice(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[Dict[str, object]] + item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["package_with_allocation"]] + model_type: Required[Literal["grouped_allocation"]] name: Required[str] """The name of the price.""" - package_with_allocation_config: Required[Dict[str, object]] - billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -4405,7 +5909,7 @@ class ReplacePricePriceNewSubscriptionPackageWithAllocationPrice(TypedDict, tota """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -4421,6 +5925,11 @@ class ReplacePricePriceNewSubscriptionPackageWithAllocationPrice(TypedDict, tota price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionGroupedAllocationPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -4434,7 +5943,7 @@ class ReplacePricePriceNewSubscriptionPackageWithAllocationPrice(TypedDict, tota """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -4455,7 +5964,7 @@ class ReplacePricePriceNewSubscriptionPackageWithAllocationPrice(TypedDict, tota """ -class ReplacePricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4463,7 +5972,25 @@ class ReplacePricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfigur """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceDimensionalPriceConfiguration( + TypedDict, total=False +): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration( + TypedDict, total=False +): duration: Required[int] """The duration of the billing period.""" @@ -4471,20 +5998,20 @@ class ReplacePricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfig """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionTierWithProrationPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPrice(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[Dict[str, object]] + item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["tiered_with_proration"]] + model_type: Required[Literal["grouped_with_prorated_minimum"]] name: Required[str] """The name of the price.""" - tiered_with_proration_config: Required[Dict[str, object]] - billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -4498,7 +6025,7 @@ class ReplacePricePriceNewSubscriptionTierWithProrationPrice(TypedDict, total=Fa """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -4514,6 +6041,11 @@ class ReplacePricePriceNewSubscriptionTierWithProrationPrice(TypedDict, total=Fa price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -4527,7 +6059,7 @@ class ReplacePricePriceNewSubscriptionTierWithProrationPrice(TypedDict, total=Fa """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -4548,7 +6080,7 @@ class ReplacePricePriceNewSubscriptionTierWithProrationPrice(TypedDict, total=Fa """ -class ReplacePricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4556,7 +6088,21 @@ class ReplacePricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfigur """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionBulkWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4564,20 +6110,20 @@ class ReplacePricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfig """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionUnitWithProrationPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionBulkWithProrationPrice(TypedDict, total=False): + bulk_with_proration_config: Required[Dict[str, object]] + 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["unit_with_proration"]] + model_type: Required[Literal["bulk_with_proration"]] name: Required[str] """The name of the price.""" - unit_with_proration_config: Required[Dict[str, object]] - billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -4591,7 +6137,7 @@ class ReplacePricePriceNewSubscriptionUnitWithProrationPrice(TypedDict, total=Fa """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -4607,6 +6153,11 @@ class ReplacePricePriceNewSubscriptionUnitWithProrationPrice(TypedDict, total=Fa price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionBulkWithProrationPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -4620,7 +6171,7 @@ class ReplacePricePriceNewSubscriptionUnitWithProrationPrice(TypedDict, total=Fa """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -4641,15 +6192,35 @@ class ReplacePricePriceNewSubscriptionUnitWithProrationPrice(TypedDict, total=Fa """ -class ReplacePricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguration(TypedDict, total=False): - duration: Required[int] - """The duration of the billing period.""" - - duration_unit: Required[Literal["day", "month"]] - """The unit of billing period duration.""" +class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycleConfiguration( + TypedDict, total=False +): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration( + TypedDict, total=False +): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" -class ReplacePricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration( + TypedDict, total=False +): duration: Required[int] """The duration of the billing period.""" @@ -4657,20 +6228,20 @@ class ReplacePricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfig """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionGroupedAllocationPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice(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[Dict[str, object]] - item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["grouped_allocation"]] + model_type: Required[Literal["scalable_matrix_with_unit_pricing"]] name: Required[str] """The name of the price.""" + scalable_matrix_with_unit_pricing_config: Required[Dict[str, object]] + billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -4684,7 +6255,7 @@ class ReplacePricePriceNewSubscriptionGroupedAllocationPrice(TypedDict, total=Fa """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -4700,6 +6271,11 @@ class ReplacePricePriceNewSubscriptionGroupedAllocationPrice(TypedDict, total=Fa price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -4713,7 +6289,7 @@ class ReplacePricePriceNewSubscriptionGroupedAllocationPrice(TypedDict, total=Fa """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -4734,7 +6310,9 @@ class ReplacePricePriceNewSubscriptionGroupedAllocationPrice(TypedDict, total=Fa """ -class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCycleConfiguration( + TypedDict, total=False +): duration: Required[int] """The duration of the billing period.""" @@ -4742,7 +6320,23 @@ class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycl """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration( +class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration( + TypedDict, total=False +): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration( TypedDict, total=False ): duration: Required[int] @@ -4752,20 +6346,20 @@ class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCy """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice(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[Dict[str, object]] - item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["grouped_with_prorated_minimum"]] + model_type: Required[Literal["scalable_matrix_with_tiered_pricing"]] name: Required[str] """The name of the price.""" + scalable_matrix_with_tiered_pricing_config: Required[Dict[str, object]] + billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -4779,7 +6373,7 @@ class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPrice(TypedDict, """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -4795,6 +6389,11 @@ class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPrice(TypedDict, price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -4808,7 +6407,7 @@ class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPrice(TypedDict, """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -4829,7 +6428,7 @@ class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPrice(TypedDict, """ -class ReplacePricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4837,7 +6436,21 @@ class ReplacePricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfigur """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4845,16 +6458,16 @@ class ReplacePricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfig """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionBulkWithProrationPrice(TypedDict, total=False): - bulk_with_proration_config: Required[Dict[str, object]] - +class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPrice(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[Dict[str, object]] + item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["bulk_with_proration"]] + model_type: Required[Literal["cumulative_grouped_bulk"]] name: Required[str] """The name of the price.""" @@ -4872,7 +6485,7 @@ class ReplacePricePriceNewSubscriptionBulkWithProrationPrice(TypedDict, total=Fa """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -4888,6 +6501,11 @@ class ReplacePricePriceNewSubscriptionBulkWithProrationPrice(TypedDict, total=Fa price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -4901,7 +6519,7 @@ class ReplacePricePriceNewSubscriptionBulkWithProrationPrice(TypedDict, total=Fa """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -4922,9 +6540,7 @@ class ReplacePricePriceNewSubscriptionBulkWithProrationPrice(TypedDict, total=Fa """ -class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycleConfiguration( - TypedDict, total=False -): +class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4932,9 +6548,21 @@ class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingC """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration( - TypedDict, total=False -): +class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4942,20 +6570,20 @@ class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicin """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePrice(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["scalable_matrix_with_unit_pricing"]] + max_group_tiered_package_config: Required[Dict[str, object]] + + model_type: Required[Literal["max_group_tiered_package"]] name: Required[str] """The name of the price.""" - scalable_matrix_with_unit_pricing_config: Required[Dict[str, object]] - billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -4969,7 +6597,7 @@ class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice(TypedDi """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -4985,6 +6613,11 @@ class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice(TypedDi price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -4998,7 +6631,7 @@ class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice(TypedDi """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -5019,9 +6652,7 @@ class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice(TypedDi """ -class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCycleConfiguration( - TypedDict, total=False -): +class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -5029,9 +6660,23 @@ class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillin """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration( +class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration( TypedDict, total=False ): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -5039,20 +6684,20 @@ class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoic """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPrice(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[Dict[str, object]] + item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["scalable_matrix_with_tiered_pricing"]] + model_type: Required[Literal["grouped_with_metered_minimum"]] name: Required[str] """The name of the price.""" - scalable_matrix_with_tiered_pricing_config: Required[Dict[str, object]] - billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -5066,7 +6711,7 @@ class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice(Typed """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -5082,6 +6727,11 @@ class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice(Typed price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -5095,7 +6745,7 @@ class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice(Typed """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -5116,7 +6766,7 @@ class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice(Typed """ -class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -5124,7 +6774,21 @@ class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConf """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -5132,16 +6796,16 @@ class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleCo """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePrice(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[Dict[str, object]] - item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["cumulative_grouped_bulk"]] + matrix_with_display_name_config: Required[Dict[str, object]] + + model_type: Required[Literal["matrix_with_display_name"]] name: Required[str] """The name of the price.""" @@ -5159,7 +6823,7 @@ class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPrice(TypedDict, tota """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -5175,6 +6839,11 @@ class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPrice(TypedDict, tota price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -5188,7 +6857,7 @@ class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPrice(TypedDict, tota """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -5209,7 +6878,7 @@ class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPrice(TypedDict, tota """ -class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -5217,7 +6886,21 @@ class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConf """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -5225,16 +6908,16 @@ class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleCo """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedTieredPackagePrice(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[Dict[str, object]] + item_id: Required[str] """The id of the item the price will be associated with.""" - max_group_tiered_package_config: Required[Dict[str, object]] - - model_type: Required[Literal["max_group_tiered_package"]] + model_type: Required[Literal["grouped_tiered_package"]] name: Required[str] """The name of the price.""" @@ -5252,7 +6935,7 @@ class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePrice(TypedDict, tota """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -5268,6 +6951,11 @@ class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePrice(TypedDict, tota price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -5281,7 +6969,7 @@ class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePrice(TypedDict, tota """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -5302,7 +6990,37 @@ class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePrice(TypedDict, tota """ -class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue( + TypedDict, total=False +): + dimension_values: Required[List[Optional[str]]] + """One or two matrix keys to filter usage to this Matrix value by. + + For example, ["region", "tier"] could be used to filter cloud usage by a cloud + region and an instance tier. + """ + + unit_amount: Required[str] + """Unit price for the specified dimension_values""" + + +class ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfig(TypedDict, total=False): + allocation: Required[float] + """Allocation to be used to calculate the price""" + + default_unit_amount: Required[str] + """Default per unit rate for any usage not bucketed into a specified matrix_value""" + + dimensions: Required[List[Optional[str]]] + """One or two event property values to evaluate matrix groups by""" + + matrix_values: Required[ + Iterable[ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue] + ] + """Matrix values for specified matrix grouping keys""" + + +class ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -5310,7 +7028,21 @@ class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycle """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -5318,16 +7050,18 @@ class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCyc """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionMatrixWithAllocationPrice(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[Dict[str, object]] - item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["grouped_with_metered_minimum"]] + matrix_with_allocation_config: Required[ + ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfig + ] + + model_type: Required[Literal["matrix_with_allocation"]] name: Required[str] """The name of the price.""" @@ -5345,7 +7079,7 @@ class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPrice(TypedDict, """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -5361,6 +7095,11 @@ class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPrice(TypedDict, price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -5374,7 +7113,7 @@ class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPrice(TypedDict, """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -5395,7 +7134,7 @@ class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPrice(TypedDict, """ -class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -5403,7 +7142,23 @@ class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConf """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceDimensionalPriceConfiguration( + TypedDict, total=False +): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -5411,20 +7166,20 @@ class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleCo """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPrice(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.""" - matrix_with_display_name_config: Required[Dict[str, object]] - - model_type: Required[Literal["matrix_with_display_name"]] + model_type: Required[Literal["tiered_package_with_minimum"]] name: Required[str] """The name of the price.""" + tiered_package_with_minimum_config: Required[Dict[str, object]] + billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -5438,7 +7193,7 @@ class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePrice(TypedDict, tota """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -5454,6 +7209,11 @@ class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePrice(TypedDict, tota price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -5467,7 +7227,7 @@ class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePrice(TypedDict, tota """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -5488,7 +7248,7 @@ class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePrice(TypedDict, tota """ -class ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedTieredPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -5496,7 +7256,21 @@ class ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfi """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedTieredPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionGroupedTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -5504,16 +7278,16 @@ class ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleCon """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionGroupedTieredPackagePrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedTieredPrice(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[Dict[str, object]] + grouped_tiered_config: Required[Dict[str, object]] item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["grouped_tiered_package"]] + model_type: Required[Literal["grouped_tiered"]] name: Required[str] """The name of the price.""" @@ -5530,9 +7304,7 @@ class ReplacePricePriceNewSubscriptionGroupedTieredPackagePrice(TypedDict, total this is true, and in-arrears if this is false. """ - billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfiguration - ] + billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionGroupedTieredPriceBillingCycleConfiguration] """ For custom cadence: specifies the duration of the billing period in days or months. @@ -5547,6 +7319,11 @@ class ReplacePricePriceNewSubscriptionGroupedTieredPackagePrice(TypedDict, total price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionGroupedTieredPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -5560,7 +7337,7 @@ class ReplacePricePriceNewSubscriptionGroupedTieredPackagePrice(TypedDict, total """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionGroupedTieredPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -5607,6 +7384,9 @@ class ReplacePricePriceNewSubscriptionGroupedTieredPackagePrice(TypedDict, total ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPrice, ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePrice, ReplacePricePriceNewSubscriptionGroupedTieredPackagePrice, + ReplacePricePriceNewSubscriptionMatrixWithAllocationPrice, + ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPrice, + ReplacePricePriceNewSubscriptionGroupedTieredPrice, ] diff --git a/src/orb/types/subscription_create_response.py b/src/orb/types/subscription_create_response.py index 485dae87..1746a98a 100644 --- a/src/orb/types/subscription_create_response.py +++ b/src/orb/types/subscription_create_response.py @@ -17,18 +17,28 @@ "AdjustmentInterval", "AdjustmentIntervalAdjustment", "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter", "BillingCycleAnchorConfiguration", "DiscountInterval", "DiscountIntervalAmountDiscountInterval", + "DiscountIntervalAmountDiscountIntervalFilter", "DiscountIntervalPercentageDiscountInterval", + "DiscountIntervalPercentageDiscountIntervalFilter", "DiscountIntervalUsageDiscountInterval", + "DiscountIntervalUsageDiscountIntervalFilter", "FixedFeeQuantitySchedule", "MaximumInterval", + "MaximumIntervalFilter", "MinimumInterval", + "MinimumIntervalFilter", "PendingSubscriptionChange", "PriceInterval", "PriceIntervalFixedFeeQuantityTransition", @@ -38,6 +48,17 @@ ] +class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): id: str @@ -46,6 +67,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -65,6 +89,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): """ +class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): id: str @@ -79,6 +114,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -92,6 +130,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel): id: str @@ -100,6 +149,9 @@ class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseMode applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -119,6 +171,17 @@ class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseMode """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): id: str @@ -127,6 +190,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -149,6 +215,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel): id: str @@ -157,6 +234,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -227,13 +307,21 @@ class BillingCycleAnchorConfiguration(BaseModel): """ +class DiscountIntervalAmountDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class DiscountIntervalAmountDiscountInterval(BaseModel): amount_discount: str """Only available if discount_type is `amount`.""" - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" - applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -242,14 +330,25 @@ class DiscountIntervalAmountDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalAmountDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" -class DiscountIntervalPercentageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class DiscountIntervalPercentageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + values: List[str] + """The IDs or values that match this filter.""" + + +class DiscountIntervalPercentageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -258,6 +357,9 @@ class DiscountIntervalPercentageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalPercentageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + percentage_discount: float """ Only available if discount_type is `percentage`.This is a number between 0 @@ -268,10 +370,18 @@ class DiscountIntervalPercentageDiscountInterval(BaseModel): """The start date of the discount interval.""" -class DiscountIntervalUsageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class DiscountIntervalUsageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class DiscountIntervalUsageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -280,6 +390,9 @@ class DiscountIntervalUsageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalUsageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" @@ -310,16 +423,27 @@ class FixedFeeQuantitySchedule(BaseModel): start_date: datetime -class MaximumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this maximum interval applies to.""" +class MaximumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class MaximumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this maximum interval applies to.""" end_date: Optional[datetime] = None """The end date of the maximum interval.""" + filters: List[MaximumIntervalFilter] + """The filters that determine which prices this maximum interval applies to.""" + maximum_amount: str """ The maximum amount to charge in a given billing period for the price intervals @@ -330,16 +454,27 @@ class MaximumInterval(BaseModel): """The start date of the maximum interval.""" -class MinimumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this minimum interval applies to.""" +class MinimumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class MinimumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this minimum interval applies to.""" end_date: Optional[datetime] = None """The end date of the minimum interval.""" + filters: List[MinimumIntervalFilter] + """The filters that determine which prices this minimum interval applies to.""" + minimum_amount: str """ The minimum amount to charge in a given billing period for the price intervals @@ -551,6 +686,9 @@ class SubscriptionCreateResponse(BaseModel): minimum_intervals: List[MinimumInterval] """The minimum intervals for this subscription sorted by the start_date.""" + name: str + """The name of the subscription.""" + net_terms: int """ Determines the difference between the invoice issue date for subscription @@ -562,7 +700,7 @@ class SubscriptionCreateResponse(BaseModel): pending_subscription_change: Optional[PendingSubscriptionChange] = None """A pending subscription change if one exists on this subscription.""" - plan: Plan + plan: Optional[Plan] = None """ 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 diff --git a/src/orb/types/subscription_fetch_schedule_response.py b/src/orb/types/subscription_fetch_schedule_response.py index 38a3999c..02227db6 100644 --- a/src/orb/types/subscription_fetch_schedule_response.py +++ b/src/orb/types/subscription_fetch_schedule_response.py @@ -26,6 +26,6 @@ class SubscriptionFetchScheduleResponse(BaseModel): end_date: Optional[datetime] = None - plan: Plan + plan: Optional[Plan] = None start_date: datetime diff --git a/src/orb/types/subscription_price_intervals_params.py b/src/orb/types/subscription_price_intervals_params.py index b2b29880..90b09781 100644 --- a/src/orb/types/subscription_price_intervals_params.py +++ b/src/orb/types/subscription_price_intervals_params.py @@ -13,6 +13,7 @@ "SubscriptionPriceIntervalsParams", "Add", "AddAllocationPrice", + "AddAllocationPriceCustomExpiration", "AddDiscount", "AddDiscountAmountDiscountCreationParams", "AddDiscountPercentageDiscountCreationParams", @@ -22,101 +23,129 @@ "AddPriceNewFloatingUnitPrice", "AddPriceNewFloatingUnitPriceUnitConfig", "AddPriceNewFloatingUnitPriceBillingCycleConfiguration", + "AddPriceNewFloatingUnitPriceDimensionalPriceConfiguration", "AddPriceNewFloatingUnitPriceInvoicingCycleConfiguration", "AddPriceNewFloatingPackagePrice", "AddPriceNewFloatingPackagePricePackageConfig", "AddPriceNewFloatingPackagePriceBillingCycleConfiguration", + "AddPriceNewFloatingPackagePriceDimensionalPriceConfiguration", "AddPriceNewFloatingPackagePriceInvoicingCycleConfiguration", "AddPriceNewFloatingMatrixPrice", "AddPriceNewFloatingMatrixPriceMatrixConfig", "AddPriceNewFloatingMatrixPriceMatrixConfigMatrixValue", "AddPriceNewFloatingMatrixPriceBillingCycleConfiguration", + "AddPriceNewFloatingMatrixPriceDimensionalPriceConfiguration", "AddPriceNewFloatingMatrixPriceInvoicingCycleConfiguration", "AddPriceNewFloatingMatrixWithAllocationPrice", "AddPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig", "AddPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue", "AddPriceNewFloatingMatrixWithAllocationPriceBillingCycleConfiguration", + "AddPriceNewFloatingMatrixWithAllocationPriceDimensionalPriceConfiguration", "AddPriceNewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration", "AddPriceNewFloatingTieredPrice", "AddPriceNewFloatingTieredPriceTieredConfig", "AddPriceNewFloatingTieredPriceTieredConfigTier", "AddPriceNewFloatingTieredPriceBillingCycleConfiguration", + "AddPriceNewFloatingTieredPriceDimensionalPriceConfiguration", "AddPriceNewFloatingTieredPriceInvoicingCycleConfiguration", "AddPriceNewFloatingTieredBpsPrice", "AddPriceNewFloatingTieredBpsPriceTieredBpsConfig", "AddPriceNewFloatingTieredBpsPriceTieredBpsConfigTier", "AddPriceNewFloatingTieredBpsPriceBillingCycleConfiguration", + "AddPriceNewFloatingTieredBpsPriceDimensionalPriceConfiguration", "AddPriceNewFloatingTieredBpsPriceInvoicingCycleConfiguration", "AddPriceNewFloatingBpsPrice", "AddPriceNewFloatingBpsPriceBpsConfig", "AddPriceNewFloatingBpsPriceBillingCycleConfiguration", + "AddPriceNewFloatingBpsPriceDimensionalPriceConfiguration", "AddPriceNewFloatingBpsPriceInvoicingCycleConfiguration", "AddPriceNewFloatingBulkBpsPrice", "AddPriceNewFloatingBulkBpsPriceBulkBpsConfig", "AddPriceNewFloatingBulkBpsPriceBulkBpsConfigTier", "AddPriceNewFloatingBulkBpsPriceBillingCycleConfiguration", + "AddPriceNewFloatingBulkBpsPriceDimensionalPriceConfiguration", "AddPriceNewFloatingBulkBpsPriceInvoicingCycleConfiguration", "AddPriceNewFloatingBulkPrice", "AddPriceNewFloatingBulkPriceBulkConfig", "AddPriceNewFloatingBulkPriceBulkConfigTier", "AddPriceNewFloatingBulkPriceBillingCycleConfiguration", + "AddPriceNewFloatingBulkPriceDimensionalPriceConfiguration", "AddPriceNewFloatingBulkPriceInvoicingCycleConfiguration", "AddPriceNewFloatingThresholdTotalAmountPrice", "AddPriceNewFloatingThresholdTotalAmountPriceBillingCycleConfiguration", + "AddPriceNewFloatingThresholdTotalAmountPriceDimensionalPriceConfiguration", "AddPriceNewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration", "AddPriceNewFloatingTieredPackagePrice", "AddPriceNewFloatingTieredPackagePriceBillingCycleConfiguration", + "AddPriceNewFloatingTieredPackagePriceDimensionalPriceConfiguration", "AddPriceNewFloatingTieredPackagePriceInvoicingCycleConfiguration", "AddPriceNewFloatingGroupedTieredPrice", "AddPriceNewFloatingGroupedTieredPriceBillingCycleConfiguration", + "AddPriceNewFloatingGroupedTieredPriceDimensionalPriceConfiguration", "AddPriceNewFloatingGroupedTieredPriceInvoicingCycleConfiguration", "AddPriceNewFloatingMaxGroupTieredPackagePrice", "AddPriceNewFloatingMaxGroupTieredPackagePriceBillingCycleConfiguration", + "AddPriceNewFloatingMaxGroupTieredPackagePriceDimensionalPriceConfiguration", "AddPriceNewFloatingMaxGroupTieredPackagePriceInvoicingCycleConfiguration", "AddPriceNewFloatingTieredWithMinimumPrice", "AddPriceNewFloatingTieredWithMinimumPriceBillingCycleConfiguration", + "AddPriceNewFloatingTieredWithMinimumPriceDimensionalPriceConfiguration", "AddPriceNewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration", "AddPriceNewFloatingPackageWithAllocationPrice", "AddPriceNewFloatingPackageWithAllocationPriceBillingCycleConfiguration", + "AddPriceNewFloatingPackageWithAllocationPriceDimensionalPriceConfiguration", "AddPriceNewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration", "AddPriceNewFloatingTieredPackageWithMinimumPrice", "AddPriceNewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration", + "AddPriceNewFloatingTieredPackageWithMinimumPriceDimensionalPriceConfiguration", "AddPriceNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration", "AddPriceNewFloatingUnitWithPercentPrice", "AddPriceNewFloatingUnitWithPercentPriceBillingCycleConfiguration", + "AddPriceNewFloatingUnitWithPercentPriceDimensionalPriceConfiguration", "AddPriceNewFloatingUnitWithPercentPriceInvoicingCycleConfiguration", "AddPriceNewFloatingTieredWithProrationPrice", "AddPriceNewFloatingTieredWithProrationPriceBillingCycleConfiguration", + "AddPriceNewFloatingTieredWithProrationPriceDimensionalPriceConfiguration", "AddPriceNewFloatingTieredWithProrationPriceInvoicingCycleConfiguration", "AddPriceNewFloatingUnitWithProrationPrice", "AddPriceNewFloatingUnitWithProrationPriceBillingCycleConfiguration", + "AddPriceNewFloatingUnitWithProrationPriceDimensionalPriceConfiguration", "AddPriceNewFloatingUnitWithProrationPriceInvoicingCycleConfiguration", "AddPriceNewFloatingGroupedAllocationPrice", "AddPriceNewFloatingGroupedAllocationPriceBillingCycleConfiguration", + "AddPriceNewFloatingGroupedAllocationPriceDimensionalPriceConfiguration", "AddPriceNewFloatingGroupedAllocationPriceInvoicingCycleConfiguration", "AddPriceNewFloatingGroupedWithProratedMinimumPrice", "AddPriceNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration", + "AddPriceNewFloatingGroupedWithProratedMinimumPriceDimensionalPriceConfiguration", "AddPriceNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration", "AddPriceNewFloatingGroupedWithMeteredMinimumPrice", "AddPriceNewFloatingGroupedWithMeteredMinimumPriceBillingCycleConfiguration", + "AddPriceNewFloatingGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration", "AddPriceNewFloatingGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration", "AddPriceNewFloatingMatrixWithDisplayNamePrice", "AddPriceNewFloatingMatrixWithDisplayNamePriceBillingCycleConfiguration", + "AddPriceNewFloatingMatrixWithDisplayNamePriceDimensionalPriceConfiguration", "AddPriceNewFloatingMatrixWithDisplayNamePriceInvoicingCycleConfiguration", "AddPriceNewFloatingBulkWithProrationPrice", "AddPriceNewFloatingBulkWithProrationPriceBillingCycleConfiguration", + "AddPriceNewFloatingBulkWithProrationPriceDimensionalPriceConfiguration", "AddPriceNewFloatingBulkWithProrationPriceInvoicingCycleConfiguration", "AddPriceNewFloatingGroupedTieredPackagePrice", "AddPriceNewFloatingGroupedTieredPackagePriceBillingCycleConfiguration", + "AddPriceNewFloatingGroupedTieredPackagePriceDimensionalPriceConfiguration", "AddPriceNewFloatingGroupedTieredPackagePriceInvoicingCycleConfiguration", "AddPriceNewFloatingScalableMatrixWithUnitPricingPrice", "AddPriceNewFloatingScalableMatrixWithUnitPricingPriceBillingCycleConfiguration", + "AddPriceNewFloatingScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration", "AddPriceNewFloatingScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration", "AddPriceNewFloatingScalableMatrixWithTieredPricingPrice", "AddPriceNewFloatingScalableMatrixWithTieredPricingPriceBillingCycleConfiguration", + "AddPriceNewFloatingScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration", "AddPriceNewFloatingScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration", "AddPriceNewFloatingCumulativeGroupedBulkPrice", "AddPriceNewFloatingCumulativeGroupedBulkPriceBillingCycleConfiguration", + "AddPriceNewFloatingCumulativeGroupedBulkPriceDimensionalPriceConfiguration", "AddPriceNewFloatingCumulativeGroupedBulkPriceInvoicingCycleConfiguration", "AddAdjustment", "AddAdjustmentAdjustment", @@ -152,6 +181,12 @@ class SubscriptionPriceIntervalsParams(TypedDict, total=False): """A list of adjustments to edit on the subscription.""" +class AddAllocationPriceCustomExpiration(TypedDict, total=False): + duration: Required[int] + + duration_unit: Required[Literal["day", "month"]] + + class AddAllocationPrice(TypedDict, total=False): amount: Required[str] """An amount of the currency to allocate to the customer at the specified cadence.""" @@ -165,10 +200,13 @@ class AddAllocationPrice(TypedDict, total=False): this price. """ - expires_at_end_of_cadence: Required[bool] + custom_expiration: Optional[AddAllocationPriceCustomExpiration] + """The custom expiration for the allocation.""" + + expires_at_end_of_cadence: Optional[bool] """ Whether the allocated amount should expire at the end of the cadence or roll - over to the next period. + over to the next period. Set to null if using custom_expiration. """ @@ -227,6 +265,20 @@ class AddPriceNewFloatingUnitPriceBillingCycleConfiguration(TypedDict, total=Fal """The unit of billing period duration.""" +class AddPriceNewFloatingUnitPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingUnitPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -273,6 +325,9 @@ class AddPriceNewFloatingUnitPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[AddPriceNewFloatingUnitPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -319,6 +374,20 @@ class AddPriceNewFloatingPackagePriceBillingCycleConfiguration(TypedDict, total= """The unit of billing period duration.""" +class AddPriceNewFloatingPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -365,6 +434,9 @@ class AddPriceNewFloatingPackagePrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[AddPriceNewFloatingPackagePriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -422,6 +494,20 @@ class AddPriceNewFloatingMatrixPriceBillingCycleConfiguration(TypedDict, total=F """The unit of billing period duration.""" +class AddPriceNewFloatingMatrixPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -468,6 +554,9 @@ class AddPriceNewFloatingMatrixPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[AddPriceNewFloatingMatrixPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -528,6 +617,20 @@ class AddPriceNewFloatingMatrixWithAllocationPriceBillingCycleConfiguration(Type """The unit of billing period duration.""" +class AddPriceNewFloatingMatrixWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -574,6 +677,9 @@ class AddPriceNewFloatingMatrixWithAllocationPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[AddPriceNewFloatingMatrixWithAllocationPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -624,6 +730,20 @@ class AddPriceNewFloatingTieredPriceBillingCycleConfiguration(TypedDict, total=F """The unit of billing period duration.""" +class AddPriceNewFloatingTieredPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -670,6 +790,9 @@ class AddPriceNewFloatingTieredPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[AddPriceNewFloatingTieredPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -726,6 +849,20 @@ class AddPriceNewFloatingTieredBpsPriceBillingCycleConfiguration(TypedDict, tota """The unit of billing period duration.""" +class AddPriceNewFloatingTieredBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -772,6 +909,9 @@ class AddPriceNewFloatingTieredBpsPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[AddPriceNewFloatingTieredBpsPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -814,6 +954,20 @@ class AddPriceNewFloatingBpsPriceBillingCycleConfiguration(TypedDict, total=Fals """The unit of billing period duration.""" +class AddPriceNewFloatingBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -860,6 +1014,9 @@ class AddPriceNewFloatingBpsPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[AddPriceNewFloatingBpsPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -913,6 +1070,20 @@ class AddPriceNewFloatingBulkBpsPriceBillingCycleConfiguration(TypedDict, total= """The unit of billing period duration.""" +class AddPriceNewFloatingBulkBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -959,6 +1130,9 @@ class AddPriceNewFloatingBulkBpsPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[AddPriceNewFloatingBulkBpsPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1006,6 +1180,20 @@ class AddPriceNewFloatingBulkPriceBillingCycleConfiguration(TypedDict, total=Fal """The unit of billing period duration.""" +class AddPriceNewFloatingBulkPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1052,6 +1240,9 @@ class AddPriceNewFloatingBulkPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[AddPriceNewFloatingBulkPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1086,6 +1277,20 @@ class AddPriceNewFloatingThresholdTotalAmountPriceBillingCycleConfiguration(Type """The unit of billing period duration.""" +class AddPriceNewFloatingThresholdTotalAmountPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1132,6 +1337,9 @@ class AddPriceNewFloatingThresholdTotalAmountPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[AddPriceNewFloatingThresholdTotalAmountPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1166,6 +1374,20 @@ class AddPriceNewFloatingTieredPackagePriceBillingCycleConfiguration(TypedDict, """The unit of billing period duration.""" +class AddPriceNewFloatingTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1212,6 +1434,9 @@ class AddPriceNewFloatingTieredPackagePrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[AddPriceNewFloatingTieredPackagePriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1246,6 +1471,20 @@ class AddPriceNewFloatingGroupedTieredPriceBillingCycleConfiguration(TypedDict, """The unit of billing period duration.""" +class AddPriceNewFloatingGroupedTieredPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingGroupedTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1292,6 +1531,9 @@ class AddPriceNewFloatingGroupedTieredPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[AddPriceNewFloatingGroupedTieredPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1326,6 +1568,20 @@ class AddPriceNewFloatingMaxGroupTieredPackagePriceBillingCycleConfiguration(Typ """The unit of billing period duration.""" +class AddPriceNewFloatingMaxGroupTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1372,6 +1628,11 @@ class AddPriceNewFloatingMaxGroupTieredPackagePrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[ + AddPriceNewFloatingMaxGroupTieredPackagePriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1406,6 +1667,20 @@ class AddPriceNewFloatingTieredWithMinimumPriceBillingCycleConfiguration(TypedDi """The unit of billing period duration.""" +class AddPriceNewFloatingTieredWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1452,6 +1727,9 @@ class AddPriceNewFloatingTieredWithMinimumPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[AddPriceNewFloatingTieredWithMinimumPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1486,6 +1764,20 @@ class AddPriceNewFloatingPackageWithAllocationPriceBillingCycleConfiguration(Typ """The unit of billing period duration.""" +class AddPriceNewFloatingPackageWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1532,6 +1824,11 @@ class AddPriceNewFloatingPackageWithAllocationPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[ + AddPriceNewFloatingPackageWithAllocationPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1566,6 +1863,20 @@ class AddPriceNewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration( """The unit of billing period duration.""" +class AddPriceNewFloatingTieredPackageWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1612,6 +1923,11 @@ class AddPriceNewFloatingTieredPackageWithMinimumPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[ + AddPriceNewFloatingTieredPackageWithMinimumPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1646,6 +1962,20 @@ class AddPriceNewFloatingUnitWithPercentPriceBillingCycleConfiguration(TypedDict """The unit of billing period duration.""" +class AddPriceNewFloatingUnitWithPercentPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1692,6 +2022,9 @@ class AddPriceNewFloatingUnitWithPercentPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[AddPriceNewFloatingUnitWithPercentPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1726,6 +2059,20 @@ class AddPriceNewFloatingTieredWithProrationPriceBillingCycleConfiguration(Typed """The unit of billing period duration.""" +class AddPriceNewFloatingTieredWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingTieredWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1772,6 +2119,9 @@ class AddPriceNewFloatingTieredWithProrationPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[AddPriceNewFloatingTieredWithProrationPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1806,6 +2156,20 @@ class AddPriceNewFloatingUnitWithProrationPriceBillingCycleConfiguration(TypedDi """The unit of billing period duration.""" +class AddPriceNewFloatingUnitWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1852,6 +2216,9 @@ class AddPriceNewFloatingUnitWithProrationPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[AddPriceNewFloatingUnitWithProrationPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1886,6 +2253,20 @@ class AddPriceNewFloatingGroupedAllocationPriceBillingCycleConfiguration(TypedDi """The unit of billing period duration.""" +class AddPriceNewFloatingGroupedAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1932,6 +2313,9 @@ class AddPriceNewFloatingGroupedAllocationPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[AddPriceNewFloatingGroupedAllocationPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1966,6 +2350,20 @@ class AddPriceNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguratio """The unit of billing period duration.""" +class AddPriceNewFloatingGroupedWithProratedMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2012,6 +2410,11 @@ class AddPriceNewFloatingGroupedWithProratedMinimumPrice(TypedDict, total=False) conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[ + AddPriceNewFloatingGroupedWithProratedMinimumPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2048,6 +2451,20 @@ class AddPriceNewFloatingGroupedWithMeteredMinimumPriceBillingCycleConfiguration """The unit of billing period duration.""" +class AddPriceNewFloatingGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2094,6 +2511,11 @@ class AddPriceNewFloatingGroupedWithMeteredMinimumPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[ + AddPriceNewFloatingGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2130,6 +2552,20 @@ class AddPriceNewFloatingMatrixWithDisplayNamePriceBillingCycleConfiguration(Typ """The unit of billing period duration.""" +class AddPriceNewFloatingMatrixWithDisplayNamePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2176,6 +2612,11 @@ class AddPriceNewFloatingMatrixWithDisplayNamePrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[ + AddPriceNewFloatingMatrixWithDisplayNamePriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2210,6 +2651,20 @@ class AddPriceNewFloatingBulkWithProrationPriceBillingCycleConfiguration(TypedDi """The unit of billing period duration.""" +class AddPriceNewFloatingBulkWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2256,6 +2711,9 @@ class AddPriceNewFloatingBulkWithProrationPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[AddPriceNewFloatingBulkWithProrationPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2290,6 +2748,20 @@ class AddPriceNewFloatingGroupedTieredPackagePriceBillingCycleConfiguration(Type """The unit of billing period duration.""" +class AddPriceNewFloatingGroupedTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2336,6 +2808,9 @@ class AddPriceNewFloatingGroupedTieredPackagePrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[AddPriceNewFloatingGroupedTieredPackagePriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2370,6 +2845,20 @@ class AddPriceNewFloatingScalableMatrixWithUnitPricingPriceBillingCycleConfigura """The unit of billing period duration.""" +class AddPriceNewFloatingScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2418,6 +2907,11 @@ class AddPriceNewFloatingScalableMatrixWithUnitPricingPrice(TypedDict, total=Fal conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[ + AddPriceNewFloatingScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2454,6 +2948,20 @@ class AddPriceNewFloatingScalableMatrixWithTieredPricingPriceBillingCycleConfigu """The unit of billing period duration.""" +class AddPriceNewFloatingScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2502,6 +3010,11 @@ class AddPriceNewFloatingScalableMatrixWithTieredPricingPrice(TypedDict, total=F conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[ + AddPriceNewFloatingScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2538,6 +3051,20 @@ class AddPriceNewFloatingCumulativeGroupedBulkPriceBillingCycleConfiguration(Typ """The unit of billing period duration.""" +class AddPriceNewFloatingCumulativeGroupedBulkPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPriceNewFloatingCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2584,6 +3111,11 @@ class AddPriceNewFloatingCumulativeGroupedBulkPrice(TypedDict, total=False): conversion_rate: Optional[float] """The per unit conversion rate of the price currency to the invoicing currency.""" + dimensional_price_configuration: Optional[ + AddPriceNewFloatingCumulativeGroupedBulkPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2709,11 +3241,11 @@ class Add(TypedDict, total=False): class AddAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False): adjustment_type: Required[Literal["percentage_discount"]] - applies_to_price_ids: Required[List[str]] - """The set of price IDs to which this adjustment applies.""" - percentage_discount: Required[float] + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + is_invoice_level: bool """When false, this adjustment will be applied to a single price. @@ -2724,11 +3256,11 @@ class AddAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False): class AddAdjustmentAdjustmentNewUsageDiscount(TypedDict, total=False): adjustment_type: Required[Literal["usage_discount"]] - applies_to_price_ids: Required[List[str]] - """The set of price IDs to which this adjustment applies.""" - usage_discount: Required[float] + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + is_invoice_level: bool """When false, this adjustment will be applied to a single price. @@ -2741,7 +3273,7 @@ class AddAdjustmentAdjustmentNewAmountDiscount(TypedDict, total=False): amount_discount: Required[str] - applies_to_price_ids: Required[List[str]] + applies_to_price_ids: Optional[List[str]] """The set of price IDs to which this adjustment applies.""" is_invoice_level: bool @@ -2754,14 +3286,14 @@ class AddAdjustmentAdjustmentNewAmountDiscount(TypedDict, total=False): class AddAdjustmentAdjustmentNewMinimum(TypedDict, total=False): adjustment_type: Required[Literal["minimum"]] - applies_to_price_ids: Required[List[str]] - """The set of price IDs to which this adjustment applies.""" - item_id: Required[str] """The item ID that revenue from this minimum will be attributed to.""" minimum_amount: Required[str] + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + is_invoice_level: bool """When false, this adjustment will be applied to a single price. @@ -2772,11 +3304,11 @@ class AddAdjustmentAdjustmentNewMinimum(TypedDict, total=False): class AddAdjustmentAdjustmentNewMaximum(TypedDict, total=False): adjustment_type: Required[Literal["maximum"]] - applies_to_price_ids: Required[List[str]] - """The set of price IDs to which this adjustment applies.""" - maximum_amount: Required[str] + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + is_invoice_level: bool """When false, this adjustment will be applied to a single price. diff --git a/src/orb/types/subscription_price_intervals_response.py b/src/orb/types/subscription_price_intervals_response.py index 0cea78b4..cb5fbe8f 100644 --- a/src/orb/types/subscription_price_intervals_response.py +++ b/src/orb/types/subscription_price_intervals_response.py @@ -17,18 +17,28 @@ "AdjustmentInterval", "AdjustmentIntervalAdjustment", "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter", "BillingCycleAnchorConfiguration", "DiscountInterval", "DiscountIntervalAmountDiscountInterval", + "DiscountIntervalAmountDiscountIntervalFilter", "DiscountIntervalPercentageDiscountInterval", + "DiscountIntervalPercentageDiscountIntervalFilter", "DiscountIntervalUsageDiscountInterval", + "DiscountIntervalUsageDiscountIntervalFilter", "FixedFeeQuantitySchedule", "MaximumInterval", + "MaximumIntervalFilter", "MinimumInterval", + "MinimumIntervalFilter", "PendingSubscriptionChange", "PriceInterval", "PriceIntervalFixedFeeQuantityTransition", @@ -38,6 +48,17 @@ ] +class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): id: str @@ -46,6 +67,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -65,6 +89,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): """ +class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): id: str @@ -79,6 +114,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -92,6 +130,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel): id: str @@ -100,6 +149,9 @@ class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseMode applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -119,6 +171,17 @@ class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseMode """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): id: str @@ -127,6 +190,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -149,6 +215,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel): id: str @@ -157,6 +234,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -227,13 +307,21 @@ class BillingCycleAnchorConfiguration(BaseModel): """ +class DiscountIntervalAmountDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class DiscountIntervalAmountDiscountInterval(BaseModel): amount_discount: str """Only available if discount_type is `amount`.""" - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" - applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -242,14 +330,25 @@ class DiscountIntervalAmountDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalAmountDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" -class DiscountIntervalPercentageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class DiscountIntervalPercentageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + values: List[str] + """The IDs or values that match this filter.""" + + +class DiscountIntervalPercentageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -258,6 +357,9 @@ class DiscountIntervalPercentageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalPercentageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + percentage_discount: float """ Only available if discount_type is `percentage`.This is a number between 0 @@ -268,10 +370,18 @@ class DiscountIntervalPercentageDiscountInterval(BaseModel): """The start date of the discount interval.""" -class DiscountIntervalUsageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class DiscountIntervalUsageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class DiscountIntervalUsageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -280,6 +390,9 @@ class DiscountIntervalUsageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalUsageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" @@ -310,16 +423,27 @@ class FixedFeeQuantitySchedule(BaseModel): start_date: datetime -class MaximumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this maximum interval applies to.""" +class MaximumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class MaximumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this maximum interval applies to.""" end_date: Optional[datetime] = None """The end date of the maximum interval.""" + filters: List[MaximumIntervalFilter] + """The filters that determine which prices this maximum interval applies to.""" + maximum_amount: str """ The maximum amount to charge in a given billing period for the price intervals @@ -330,16 +454,27 @@ class MaximumInterval(BaseModel): """The start date of the maximum interval.""" -class MinimumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this minimum interval applies to.""" +class MinimumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class MinimumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this minimum interval applies to.""" end_date: Optional[datetime] = None """The end date of the minimum interval.""" + filters: List[MinimumIntervalFilter] + """The filters that determine which prices this minimum interval applies to.""" + minimum_amount: str """ The minimum amount to charge in a given billing period for the price intervals @@ -551,6 +686,9 @@ class SubscriptionPriceIntervalsResponse(BaseModel): minimum_intervals: List[MinimumInterval] """The minimum intervals for this subscription sorted by the start_date.""" + name: str + """The name of the subscription.""" + net_terms: int """ Determines the difference between the invoice issue date for subscription @@ -562,7 +700,7 @@ class SubscriptionPriceIntervalsResponse(BaseModel): pending_subscription_change: Optional[PendingSubscriptionChange] = None """A pending subscription change if one exists on this subscription.""" - plan: Plan + plan: Optional[Plan] = None """ 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 diff --git a/src/orb/types/subscription_schedule_plan_change_params.py b/src/orb/types/subscription_schedule_plan_change_params.py index ef1afbc4..aff9676c 100644 --- a/src/orb/types/subscription_schedule_plan_change_params.py +++ b/src/orb/types/subscription_schedule_plan_change_params.py @@ -19,96 +19,136 @@ "AddAdjustmentAdjustmentNewMaximum", "AddPrice", "AddPriceAllocationPrice", + "AddPriceAllocationPriceCustomExpiration", "AddPriceDiscount", "AddPricePrice", "AddPricePriceNewSubscriptionUnitPrice", "AddPricePriceNewSubscriptionUnitPriceUnitConfig", "AddPricePriceNewSubscriptionUnitPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionUnitPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionPackagePrice", "AddPricePriceNewSubscriptionPackagePricePackageConfig", "AddPricePriceNewSubscriptionPackagePriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionPackagePriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionMatrixPrice", "AddPricePriceNewSubscriptionMatrixPriceMatrixConfig", "AddPricePriceNewSubscriptionMatrixPriceMatrixConfigMatrixValue", "AddPricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionMatrixPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionTieredPrice", "AddPricePriceNewSubscriptionTieredPriceTieredConfig", "AddPricePriceNewSubscriptionTieredPriceTieredConfigTier", "AddPricePriceNewSubscriptionTieredPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionTieredPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionTieredBpsPrice", "AddPricePriceNewSubscriptionTieredBpsPriceTieredBpsConfig", "AddPricePriceNewSubscriptionTieredBpsPriceTieredBpsConfigTier", "AddPricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionTieredBpsPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionBpsPrice", "AddPricePriceNewSubscriptionBpsPriceBpsConfig", "AddPricePriceNewSubscriptionBpsPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionBpsPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionBulkBpsPrice", "AddPricePriceNewSubscriptionBulkBpsPriceBulkBpsConfig", "AddPricePriceNewSubscriptionBulkBpsPriceBulkBpsConfigTier", "AddPricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionBulkBpsPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionBulkPrice", "AddPricePriceNewSubscriptionBulkPriceBulkConfig", "AddPricePriceNewSubscriptionBulkPriceBulkConfigTier", "AddPricePriceNewSubscriptionBulkPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionBulkPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionThresholdTotalAmountPrice", "AddPricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionThresholdTotalAmountPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionTieredPackagePrice", "AddPricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionTieredPackagePriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionTieredWithMinimumPrice", "AddPricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionTieredWithMinimumPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionUnitWithPercentPrice", "AddPricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionUnitWithPercentPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionPackageWithAllocationPrice", "AddPricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionPackageWithAllocationPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionTierWithProrationPrice", "AddPricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionTierWithProrationPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionUnitWithProrationPrice", "AddPricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionUnitWithProrationPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionGroupedAllocationPrice", "AddPricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionGroupedAllocationPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionGroupedWithProratedMinimumPrice", "AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionBulkWithProrationPrice", "AddPricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionBulkWithProrationPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice", "AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice", "AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionCumulativeGroupedBulkPrice", "AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionMaxGroupTieredPackagePrice", "AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPrice", "AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionMatrixWithDisplayNamePrice", "AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration", "AddPricePriceNewSubscriptionGroupedTieredPackagePrice", "AddPricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionGroupedTieredPackagePriceDimensionalPriceConfiguration", "AddPricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration", + "AddPricePriceNewSubscriptionMatrixWithAllocationPrice", + "AddPricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfig", + "AddPricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue", + "AddPricePriceNewSubscriptionMatrixWithAllocationPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionMatrixWithAllocationPriceDimensionalPriceConfiguration", + "AddPricePriceNewSubscriptionMatrixWithAllocationPriceInvoicingCycleConfiguration", + "AddPricePriceNewSubscriptionTieredPackageWithMinimumPrice", + "AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceDimensionalPriceConfiguration", + "AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceInvoicingCycleConfiguration", + "AddPricePriceNewSubscriptionGroupedTieredPrice", + "AddPricePriceNewSubscriptionGroupedTieredPriceBillingCycleConfiguration", + "AddPricePriceNewSubscriptionGroupedTieredPriceDimensionalPriceConfiguration", + "AddPricePriceNewSubscriptionGroupedTieredPriceInvoicingCycleConfiguration", "BillingCycleAnchorConfiguration", "RemoveAdjustment", "RemovePrice", @@ -121,96 +161,136 @@ "ReplaceAdjustmentAdjustmentNewMaximum", "ReplacePrice", "ReplacePriceAllocationPrice", + "ReplacePriceAllocationPriceCustomExpiration", "ReplacePriceDiscount", "ReplacePricePrice", "ReplacePricePriceNewSubscriptionUnitPrice", "ReplacePricePriceNewSubscriptionUnitPriceUnitConfig", "ReplacePricePriceNewSubscriptionUnitPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionUnitPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionPackagePrice", "ReplacePricePriceNewSubscriptionPackagePricePackageConfig", "ReplacePricePriceNewSubscriptionPackagePriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionPackagePriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionMatrixPrice", "ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfig", "ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfigMatrixValue", "ReplacePricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionMatrixPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionTieredPrice", "ReplacePricePriceNewSubscriptionTieredPriceTieredConfig", "ReplacePricePriceNewSubscriptionTieredPriceTieredConfigTier", "ReplacePricePriceNewSubscriptionTieredPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionTieredPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionTieredBpsPrice", "ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfig", "ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfigTier", "ReplacePricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionTieredBpsPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionBpsPrice", "ReplacePricePriceNewSubscriptionBpsPriceBpsConfig", "ReplacePricePriceNewSubscriptionBpsPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionBpsPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionBulkBpsPrice", "ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfig", "ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfigTier", "ReplacePricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionBulkBpsPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionBulkPrice", "ReplacePricePriceNewSubscriptionBulkPriceBulkConfig", "ReplacePricePriceNewSubscriptionBulkPriceBulkConfigTier", "ReplacePricePriceNewSubscriptionBulkPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionBulkPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionThresholdTotalAmountPrice", "ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionTieredPackagePrice", "ReplacePricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionTieredPackagePriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionTieredWithMinimumPrice", "ReplacePricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionTieredWithMinimumPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionUnitWithPercentPrice", "ReplacePricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionUnitWithPercentPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionPackageWithAllocationPrice", "ReplacePricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionPackageWithAllocationPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionTierWithProrationPrice", "ReplacePricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionTierWithProrationPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionUnitWithProrationPrice", "ReplacePricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionUnitWithProrationPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionGroupedAllocationPrice", "ReplacePricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionGroupedAllocationPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPrice", "ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionBulkWithProrationPrice", "ReplacePricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionBulkWithProrationPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice", "ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice", "ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPrice", "ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePrice", "ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPrice", "ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePrice", "ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration", "ReplacePricePriceNewSubscriptionGroupedTieredPackagePrice", "ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceDimensionalPriceConfiguration", "ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration", + "ReplacePricePriceNewSubscriptionMatrixWithAllocationPrice", + "ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfig", + "ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue", + "ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPrice", + "ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceInvoicingCycleConfiguration", + "ReplacePricePriceNewSubscriptionGroupedTieredPrice", + "ReplacePricePriceNewSubscriptionGroupedTieredPriceBillingCycleConfiguration", + "ReplacePricePriceNewSubscriptionGroupedTieredPriceDimensionalPriceConfiguration", + "ReplacePricePriceNewSubscriptionGroupedTieredPriceInvoicingCycleConfiguration", ] @@ -374,11 +454,11 @@ class SubscriptionSchedulePlanChangeParams(TypedDict, total=False): class AddAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False): adjustment_type: Required[Literal["percentage_discount"]] - applies_to_price_ids: Required[List[str]] - """The set of price IDs to which this adjustment applies.""" - percentage_discount: Required[float] + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + is_invoice_level: bool """When false, this adjustment will be applied to a single price. @@ -389,11 +469,11 @@ class AddAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False): class AddAdjustmentAdjustmentNewUsageDiscount(TypedDict, total=False): adjustment_type: Required[Literal["usage_discount"]] - applies_to_price_ids: Required[List[str]] - """The set of price IDs to which this adjustment applies.""" - usage_discount: Required[float] + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + is_invoice_level: bool """When false, this adjustment will be applied to a single price. @@ -406,7 +486,7 @@ class AddAdjustmentAdjustmentNewAmountDiscount(TypedDict, total=False): amount_discount: Required[str] - applies_to_price_ids: Required[List[str]] + applies_to_price_ids: Optional[List[str]] """The set of price IDs to which this adjustment applies.""" is_invoice_level: bool @@ -419,14 +499,14 @@ class AddAdjustmentAdjustmentNewAmountDiscount(TypedDict, total=False): class AddAdjustmentAdjustmentNewMinimum(TypedDict, total=False): adjustment_type: Required[Literal["minimum"]] - applies_to_price_ids: Required[List[str]] - """The set of price IDs to which this adjustment applies.""" - item_id: Required[str] """The item ID that revenue from this minimum will be attributed to.""" minimum_amount: Required[str] + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + is_invoice_level: bool """When false, this adjustment will be applied to a single price. @@ -437,11 +517,11 @@ class AddAdjustmentAdjustmentNewMinimum(TypedDict, total=False): class AddAdjustmentAdjustmentNewMaximum(TypedDict, total=False): adjustment_type: Required[Literal["maximum"]] - applies_to_price_ids: Required[List[str]] - """The set of price IDs to which this adjustment applies.""" - maximum_amount: Required[str] + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + is_invoice_level: bool """When false, this adjustment will be applied to a single price. @@ -481,6 +561,12 @@ class AddAdjustment(TypedDict, total=False): """ +class AddPriceAllocationPriceCustomExpiration(TypedDict, total=False): + duration: Required[int] + + duration_unit: Required[Literal["day", "month"]] + + class AddPriceAllocationPrice(TypedDict, total=False): amount: Required[str] """An amount of the currency to allocate to the customer at the specified cadence.""" @@ -494,10 +580,13 @@ class AddPriceAllocationPrice(TypedDict, total=False): this price. """ - expires_at_end_of_cadence: Required[bool] + custom_expiration: Optional[AddPriceAllocationPriceCustomExpiration] + """The custom expiration for the allocation.""" + + expires_at_end_of_cadence: Optional[bool] """ Whether the allocated amount should expire at the end of the cadence or roll - over to the next period. + over to the next period. Set to null if using custom_expiration. """ @@ -533,6 +622,20 @@ class AddPricePriceNewSubscriptionUnitPriceBillingCycleConfiguration(TypedDict, """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionUnitPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -582,6 +685,9 @@ class AddPricePriceNewSubscriptionUnitPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionUnitPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -634,6 +740,20 @@ class AddPricePriceNewSubscriptionPackagePriceBillingCycleConfiguration(TypedDic """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -683,6 +803,9 @@ class AddPricePriceNewSubscriptionPackagePrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionPackagePriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -746,6 +869,20 @@ class AddPricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration(TypedDict """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionMatrixPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -795,6 +932,9 @@ class AddPricePriceNewSubscriptionMatrixPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionMatrixPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -851,6 +991,20 @@ class AddPricePriceNewSubscriptionTieredPriceBillingCycleConfiguration(TypedDict """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionTieredPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -900,6 +1054,9 @@ class AddPricePriceNewSubscriptionTieredPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionTieredPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -962,6 +1119,20 @@ class AddPricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration(TypedD """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionTieredBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1011,6 +1182,9 @@ class AddPricePriceNewSubscriptionTieredBpsPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionTieredBpsPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1059,6 +1233,20 @@ class AddPricePriceNewSubscriptionBpsPriceBillingCycleConfiguration(TypedDict, t """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1108,6 +1296,9 @@ class AddPricePriceNewSubscriptionBpsPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionBpsPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1167,6 +1358,20 @@ class AddPricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration(TypedDic """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionBulkBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1216,6 +1421,9 @@ class AddPricePriceNewSubscriptionBulkBpsPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionBulkBpsPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1269,6 +1477,20 @@ class AddPricePriceNewSubscriptionBulkPriceBillingCycleConfiguration(TypedDict, """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionBulkPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1318,6 +1540,9 @@ class AddPricePriceNewSubscriptionBulkPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionBulkPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1358,6 +1583,20 @@ class AddPricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfigura """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionThresholdTotalAmountPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1409,6 +1648,11 @@ class AddPricePriceNewSubscriptionThresholdTotalAmountPrice(TypedDict, total=Fal price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionThresholdTotalAmountPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1451,6 +1695,20 @@ class AddPricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration(Ty """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1500,6 +1758,11 @@ class AddPricePriceNewSubscriptionTieredPackagePrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionTieredPackagePriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1540,6 +1803,20 @@ class AddPricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguratio """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionTieredWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1589,6 +1866,11 @@ class AddPricePriceNewSubscriptionTieredWithMinimumPrice(TypedDict, total=False) price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionTieredWithMinimumPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1631,6 +1913,20 @@ class AddPricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration( """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionUnitWithPercentPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1680,6 +1976,11 @@ class AddPricePriceNewSubscriptionUnitWithPercentPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionUnitWithPercentPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1720,6 +2021,20 @@ class AddPricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfigur """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionPackageWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1771,6 +2086,11 @@ class AddPricePriceNewSubscriptionPackageWithAllocationPrice(TypedDict, total=Fa price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionPackageWithAllocationPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1813,6 +2133,20 @@ class AddPricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguratio """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionTierWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1862,6 +2196,11 @@ class AddPricePriceNewSubscriptionTierWithProrationPrice(TypedDict, total=False) price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionTierWithProrationPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1904,6 +2243,20 @@ class AddPricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguratio """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionUnitWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -1953,6 +2306,11 @@ class AddPricePriceNewSubscriptionUnitWithProrationPrice(TypedDict, total=False) price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionUnitWithProrationPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -1995,6 +2353,20 @@ class AddPricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguratio """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionGroupedAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2044,6 +2416,11 @@ class AddPricePriceNewSubscriptionGroupedAllocationPrice(TypedDict, total=False) price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionGroupedAllocationPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2086,6 +2463,20 @@ class AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleCon """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2137,6 +2528,11 @@ class AddPricePriceNewSubscriptionGroupedWithProratedMinimumPrice(TypedDict, tot price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2179,6 +2575,20 @@ class AddPricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguratio """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionBulkWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2228,6 +2638,11 @@ class AddPricePriceNewSubscriptionBulkWithProrationPrice(TypedDict, total=False) price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionBulkWithProrationPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2270,6 +2685,22 @@ class AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycle """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration( + TypedDict, total=False +): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2321,6 +2752,11 @@ class AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice(TypedDict, price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2363,6 +2799,22 @@ class AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCyc """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration( + TypedDict, total=False +): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration( TypedDict, total=False ): @@ -2416,6 +2868,11 @@ class AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice(TypedDict price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2458,6 +2915,20 @@ class AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfigur """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2509,6 +2980,11 @@ class AddPricePriceNewSubscriptionCumulativeGroupedBulkPrice(TypedDict, total=Fa price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2551,6 +3027,20 @@ class AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfigur """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2602,6 +3092,11 @@ class AddPricePriceNewSubscriptionMaxGroupTieredPackagePrice(TypedDict, total=Fa price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2644,6 +3139,20 @@ class AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConf """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2695,6 +3204,11 @@ class AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPrice(TypedDict, tota price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2737,6 +3251,20 @@ class AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfigur """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2788,6 +3316,11 @@ class AddPricePriceNewSubscriptionMatrixWithDisplayNamePrice(TypedDict, total=Fa price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2830,6 +3363,20 @@ class AddPricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfigura """The unit of billing period duration.""" +class AddPricePriceNewSubscriptionGroupedTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + class AddPricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -2881,6 +3428,11 @@ class AddPricePriceNewSubscriptionGroupedTieredPackagePrice(TypedDict, total=Fal price is billed. """ + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionGroupedTieredPackagePriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -2915,261 +3467,1006 @@ class AddPricePriceNewSubscriptionGroupedTieredPackagePrice(TypedDict, total=Fal """ -AddPricePrice: TypeAlias = Union[ - AddPricePriceNewSubscriptionUnitPrice, - AddPricePriceNewSubscriptionPackagePrice, - AddPricePriceNewSubscriptionMatrixPrice, - AddPricePriceNewSubscriptionTieredPrice, - AddPricePriceNewSubscriptionTieredBpsPrice, - AddPricePriceNewSubscriptionBpsPrice, - AddPricePriceNewSubscriptionBulkBpsPrice, - AddPricePriceNewSubscriptionBulkPrice, - AddPricePriceNewSubscriptionThresholdTotalAmountPrice, - AddPricePriceNewSubscriptionTieredPackagePrice, - AddPricePriceNewSubscriptionTieredWithMinimumPrice, - AddPricePriceNewSubscriptionUnitWithPercentPrice, - AddPricePriceNewSubscriptionPackageWithAllocationPrice, - AddPricePriceNewSubscriptionTierWithProrationPrice, - AddPricePriceNewSubscriptionUnitWithProrationPrice, - AddPricePriceNewSubscriptionGroupedAllocationPrice, - AddPricePriceNewSubscriptionGroupedWithProratedMinimumPrice, - AddPricePriceNewSubscriptionBulkWithProrationPrice, - AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice, - AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice, - AddPricePriceNewSubscriptionCumulativeGroupedBulkPrice, - AddPricePriceNewSubscriptionMaxGroupTieredPackagePrice, - AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPrice, - AddPricePriceNewSubscriptionMatrixWithDisplayNamePrice, - AddPricePriceNewSubscriptionGroupedTieredPackagePrice, -] - +class AddPricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue( + TypedDict, total=False +): + dimension_values: Required[List[Optional[str]]] + """One or two matrix keys to filter usage to this Matrix value by. -class AddPrice(TypedDict, total=False): - allocation_price: Optional[AddPriceAllocationPrice] - """The definition of a new allocation price to create and add to the subscription.""" + For example, ["region", "tier"] could be used to filter cloud usage by a cloud + region and an instance tier. + """ + + unit_amount: Required[str] + """Unit price for the specified dimension_values""" + + +class AddPricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfig(TypedDict, total=False): + allocation: Required[float] + """Allocation to be used to calculate the price""" + + default_unit_amount: Required[str] + """Default per unit rate for any usage not bucketed into a specified matrix_value""" + + dimensions: Required[List[Optional[str]]] + """One or two event property values to evaluate matrix groups by""" + + matrix_values: Required[ + Iterable[AddPricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue] + ] + """Matrix values for specified matrix grouping keys""" + + +class AddPricePriceNewSubscriptionMatrixWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewSubscriptionMatrixWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewSubscriptionMatrixWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewSubscriptionMatrixWithAllocationPrice(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.""" + + matrix_with_allocation_config: Required[ + AddPricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfig + ] + + model_type: Required[Literal["matrix_with_allocation"]] + + 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[ + AddPricePriceNewSubscriptionMatrixWithAllocationPriceBillingCycleConfiguration + ] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionMatrixWithAllocationPriceDimensionalPriceConfiguration + ] + """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[ + AddPricePriceNewSubscriptionMatrixWithAllocationPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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 AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewSubscriptionTieredPackageWithMinimumPrice(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_package_with_minimum"]] + + name: Required[str] + """The name of the price.""" + + tiered_package_with_minimum_config: Required[Dict[str, object]] + + 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[ + AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceBillingCycleConfiguration + ] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceDimensionalPriceConfiguration + ] + """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[ + AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceInvoicingCycleConfiguration + ] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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 AddPricePriceNewSubscriptionGroupedTieredPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewSubscriptionGroupedTieredPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class AddPricePriceNewSubscriptionGroupedTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class AddPricePriceNewSubscriptionGroupedTieredPrice(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[Dict[str, object]] + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["grouped_tiered"]] + + 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[AddPricePriceNewSubscriptionGroupedTieredPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[ + AddPricePriceNewSubscriptionGroupedTieredPriceDimensionalPriceConfiguration + ] + """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[AddPricePriceNewSubscriptionGroupedTieredPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + 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[ + AddPricePriceNewSubscriptionUnitPrice, + AddPricePriceNewSubscriptionPackagePrice, + AddPricePriceNewSubscriptionMatrixPrice, + AddPricePriceNewSubscriptionTieredPrice, + AddPricePriceNewSubscriptionTieredBpsPrice, + AddPricePriceNewSubscriptionBpsPrice, + AddPricePriceNewSubscriptionBulkBpsPrice, + AddPricePriceNewSubscriptionBulkPrice, + AddPricePriceNewSubscriptionThresholdTotalAmountPrice, + AddPricePriceNewSubscriptionTieredPackagePrice, + AddPricePriceNewSubscriptionTieredWithMinimumPrice, + AddPricePriceNewSubscriptionUnitWithPercentPrice, + AddPricePriceNewSubscriptionPackageWithAllocationPrice, + AddPricePriceNewSubscriptionTierWithProrationPrice, + AddPricePriceNewSubscriptionUnitWithProrationPrice, + AddPricePriceNewSubscriptionGroupedAllocationPrice, + AddPricePriceNewSubscriptionGroupedWithProratedMinimumPrice, + AddPricePriceNewSubscriptionBulkWithProrationPrice, + AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice, + AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice, + AddPricePriceNewSubscriptionCumulativeGroupedBulkPrice, + AddPricePriceNewSubscriptionMaxGroupTieredPackagePrice, + AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPrice, + AddPricePriceNewSubscriptionMatrixWithDisplayNamePrice, + AddPricePriceNewSubscriptionGroupedTieredPackagePrice, + AddPricePriceNewSubscriptionMatrixWithAllocationPrice, + AddPricePriceNewSubscriptionTieredPackageWithMinimumPrice, + AddPricePriceNewSubscriptionGroupedTieredPrice, +] + + +class AddPrice(TypedDict, total=False): + allocation_price: Optional[AddPriceAllocationPrice] + """The definition of a new allocation price to create and add to the subscription.""" discounts: Optional[Iterable[AddPriceDiscount]] """[DEPRECATED] Use add_adjustments instead. - The subscription's discounts for this price. + The subscription's discounts for this price. + """ + + end_date: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")] + """The end date of the price interval. + + This is the date that the price will stop billing on the subscription. If null, + billing will end when the phase or subscription ends. + """ + + external_price_id: Optional[str] + """The external price id of the price to add to the subscription.""" + + maximum_amount: Optional[str] + """[DEPRECATED] Use add_adjustments instead. + + The subscription's maximum amount for this price. + """ + + minimum_amount: Optional[str] + """[DEPRECATED] Use add_adjustments instead. + + The subscription's minimum amount for this price. + """ + + plan_phase_order: Optional[int] + """The phase to add this price to.""" + + price: Optional[AddPricePrice] + """The definition of a new price to create and add to the subscription.""" + + price_id: Optional[str] + """The id of the price to add to the subscription.""" + + start_date: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")] + """The start date of the price interval. + + This is the date that the price will start billing on the subscription. If null, + billing will start when the phase or subscription starts. + """ + + +class BillingCycleAnchorConfiguration(TypedDict, total=False): + day: Required[int] + """The day of the month on which the billing cycle is anchored. + + If the maximum number of days in a month is greater than this value, the last + day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April + means the billing period begins on the 30th. + """ + + month: Optional[int] + """The month on which the billing cycle is anchored (e.g. + + a quarterly price anchored in February would have cycles starting February, May, + August, and November). + """ + + year: Optional[int] + """The year on which the billing cycle is anchored (e.g. + + a 2 year billing cycle anchored on 2021 would have cycles starting on 2021, + 2023, 2025, etc.). + """ + + +class RemoveAdjustment(TypedDict, total=False): + adjustment_id: Required[str] + """The id of the adjustment to remove on the subscription.""" + + +class RemovePrice(TypedDict, total=False): + external_price_id: Optional[str] + """The external price id of the price to remove on the subscription.""" + + price_id: Optional[str] + """The id of the price to remove on the subscription.""" + + +class ReplaceAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False): + adjustment_type: Required[Literal["percentage_discount"]] + + percentage_discount: Required[float] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. """ - end_date: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")] - """The end date of the price interval. - This is the date that the price will stop billing on the subscription. If null, - billing will end when the phase or subscription ends. +class ReplaceAdjustmentAdjustmentNewUsageDiscount(TypedDict, total=False): + adjustment_type: Required[Literal["usage_discount"]] + + usage_discount: Required[float] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +class ReplaceAdjustmentAdjustmentNewAmountDiscount(TypedDict, total=False): + adjustment_type: Required[Literal["amount_discount"]] + + amount_discount: Required[str] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +class ReplaceAdjustmentAdjustmentNewMinimum(TypedDict, total=False): + adjustment_type: Required[Literal["minimum"]] + + item_id: Required[str] + """The item ID that revenue from this minimum will be attributed to.""" + + minimum_amount: Required[str] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +class ReplaceAdjustmentAdjustmentNewMaximum(TypedDict, total=False): + adjustment_type: Required[Literal["maximum"]] + + maximum_amount: Required[str] + + applies_to_price_ids: Optional[List[str]] + """The set of price IDs to which this adjustment applies.""" + + is_invoice_level: bool + """When false, this adjustment will be applied to a single price. + + Otherwise, it will be applied at the invoice level, possibly to multiple prices. + """ + + +ReplaceAdjustmentAdjustment: TypeAlias = Union[ + ReplaceAdjustmentAdjustmentNewPercentageDiscount, + ReplaceAdjustmentAdjustmentNewUsageDiscount, + ReplaceAdjustmentAdjustmentNewAmountDiscount, + ReplaceAdjustmentAdjustmentNewMinimum, + ReplaceAdjustmentAdjustmentNewMaximum, +] + + +class ReplaceAdjustment(TypedDict, total=False): + adjustment: Required[ReplaceAdjustmentAdjustment] + """The definition of a new adjustment to create and add to the subscription.""" + + replaces_adjustment_id: Required[str] + """The id of the adjustment on the plan to replace in the subscription.""" + + +class ReplacePriceAllocationPriceCustomExpiration(TypedDict, total=False): + duration: Required[int] + + duration_unit: Required[Literal["day", "month"]] + + +class ReplacePriceAllocationPrice(TypedDict, total=False): + amount: Required[str] + """An amount of the currency to allocate to the customer at the specified cadence.""" + + cadence: Required[Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]] + """The cadence at which to allocate the amount to the customer.""" + + currency: Required[str] + """ + An ISO 4217 currency string or a custom pricing unit identifier in which to bill + this price. + """ + + custom_expiration: Optional[ReplacePriceAllocationPriceCustomExpiration] + """The custom expiration for the allocation.""" + + expires_at_end_of_cadence: Optional[bool] + """ + Whether the allocated amount should expire at the end of the cadence or roll + over to the next period. Set to null if using custom_expiration. + """ + + +class ReplacePriceDiscount(TypedDict, total=False): + discount_type: Required[Literal["percentage", "usage", "amount"]] + + amount_discount: Optional[str] + """Only available if discount_type is `amount`.""" + + percentage_discount: Optional[float] + """Only available if discount_type is `percentage`. + + This is a number between 0 and 1. + """ + + usage_discount: Optional[float] + """Only available if discount_type is `usage`. + + Number of usage units that this discount is for + """ + + +class ReplacePricePriceNewSubscriptionUnitPriceUnitConfig(TypedDict, total=False): + unit_amount: Required[str] + """Rate per unit of usage""" + + +class ReplacePricePriceNewSubscriptionUnitPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewSubscriptionUnitPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewSubscriptionUnitPrice(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["unit"]] + + name: Required[str] + """The name of the price.""" + + unit_config: Required[ReplacePricePriceNewSubscriptionUnitPriceUnitConfig] + + 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[ReplacePricePriceNewSubscriptionUnitPriceBillingCycleConfiguration] + """ + 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.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. """ + dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionUnitPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] - """The external price id of the price to add to the subscription.""" + """An alias for the price.""" - maximum_amount: Optional[str] - """[DEPRECATED] Use add_adjustments instead. + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ - The subscription's maximum amount for this price. + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. """ - minimum_amount: Optional[str] - """[DEPRECATED] Use add_adjustments instead. + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. - The subscription's minimum amount for this price. + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. """ - plan_phase_order: Optional[int] - """The phase to add this price to.""" + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ - price: Optional[AddPricePrice] - """The definition of a new price to create and add to the subscription.""" - price_id: Optional[str] - """The id of the price to add to the subscription.""" +class ReplacePricePriceNewSubscriptionPackagePricePackageConfig(TypedDict, total=False): + package_amount: Required[str] + """A currency amount to rate usage by""" - start_date: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")] - """The start date of the price interval. + package_size: Required[int] + """An integer amount to represent package size. - This is the date that the price will start billing on the subscription. If null, - billing will start when the phase or subscription starts. + For example, 1000 here would divide usage by 1000 before multiplying by + package_amount in rating """ -class BillingCycleAnchorConfiguration(TypedDict, total=False): - day: Required[int] - """The day of the month on which the billing cycle is anchored. +class ReplacePricePriceNewSubscriptionPackagePriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + - If the maximum number of days in a month is greater than this value, the last - day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April - means the billing period begins on the 30th. +class ReplacePricePriceNewSubscriptionPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group """ - month: Optional[int] - """The month on which the billing cycle is anchored (e.g. + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" - a quarterly price anchored in February would have cycles starting February, May, - August, and November). - """ + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" - year: Optional[int] - """The year on which the billing cycle is anchored (e.g. - a 2 year billing cycle anchored on 2021 would have cycles starting on 2021, - 2023, 2025, etc.). - """ +class ReplacePricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" -class RemoveAdjustment(TypedDict, total=False): - adjustment_id: Required[str] - """The id of the adjustment to remove on the subscription.""" +class ReplacePricePriceNewSubscriptionPackagePrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" -class RemovePrice(TypedDict, total=False): - external_price_id: Optional[str] - """The external price id of the price to remove on the subscription.""" + item_id: Required[str] + """The id of the item the price will be associated with.""" - price_id: Optional[str] - """The id of the price to remove on the subscription.""" + model_type: Required[Literal["package"]] + name: Required[str] + """The name of the price.""" -class ReplaceAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False): - adjustment_type: Required[Literal["percentage_discount"]] + package_config: Required[ReplacePricePriceNewSubscriptionPackagePricePackageConfig] - applies_to_price_ids: Required[List[str]] - """The set of price IDs to which this adjustment applies.""" + billable_metric_id: Optional[str] + """The id of the billable metric for the price. - percentage_discount: Required[float] + Only needed if the price is usage-based. + """ - is_invoice_level: bool - """When false, this adjustment will be applied to a single price. + 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. + """ - Otherwise, it will be applied at the invoice level, possibly to multiple prices. + billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionPackagePriceBillingCycleConfiguration] + """ + 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.""" -class ReplaceAdjustmentAdjustmentNewUsageDiscount(TypedDict, total=False): - adjustment_type: Required[Literal["usage_discount"]] + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ - applies_to_price_ids: Required[List[str]] - """The set of price IDs to which this adjustment applies.""" + dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionPackagePriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" - usage_discount: Required[float] + external_price_id: Optional[str] + """An alias for the price.""" - is_invoice_level: bool - """When false, this adjustment will be applied to a single price. + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ - Otherwise, it will be applied at the invoice level, possibly to multiple prices. + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. """ + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. -class ReplaceAdjustmentAdjustmentNewAmountDiscount(TypedDict, total=False): - adjustment_type: Required[Literal["amount_discount"]] + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ - amount_discount: Required[str] + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ - applies_to_price_ids: Required[List[str]] - """The set of price IDs to which this adjustment applies.""" - is_invoice_level: bool - """When false, this adjustment will be applied to a single price. +class ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfigMatrixValue(TypedDict, total=False): + dimension_values: Required[List[Optional[str]]] + """One or two matrix keys to filter usage to this Matrix value by. - Otherwise, it will be applied at the invoice level, possibly to multiple prices. + For example, ["region", "tier"] could be used to filter cloud usage by a cloud + region and an instance tier. """ + unit_amount: Required[str] + """Unit price for the specified dimension_values""" -class ReplaceAdjustmentAdjustmentNewMinimum(TypedDict, total=False): - adjustment_type: Required[Literal["minimum"]] - applies_to_price_ids: Required[List[str]] - """The set of price IDs to which this adjustment applies.""" +class ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfig(TypedDict, total=False): + default_unit_amount: Required[str] + """Default per unit rate for any usage not bucketed into a specified matrix_value""" - item_id: Required[str] - """The item ID that revenue from this minimum will be attributed to.""" + dimensions: Required[List[Optional[str]]] + """One or two event property values to evaluate matrix groups by""" - minimum_amount: Required[str] + matrix_values: Required[Iterable[ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfigMatrixValue]] + """Matrix values for specified matrix grouping keys""" - is_invoice_level: bool - """When false, this adjustment will be applied to a single price. - Otherwise, it will be applied at the invoice level, possibly to multiple prices. +class ReplacePricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewSubscriptionMatrixPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group """ + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" -class ReplaceAdjustmentAdjustmentNewMaximum(TypedDict, total=False): - adjustment_type: Required[Literal["maximum"]] + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" - applies_to_price_ids: Required[List[str]] - """The set of price IDs to which this adjustment applies.""" - maximum_amount: Required[str] +class ReplacePricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False): + duration: Required[int] + """The duration of the billing period.""" - is_invoice_level: bool - """When false, this adjustment will be applied to a single price. + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" - Otherwise, it will be applied at the invoice level, possibly to multiple prices. - """ +class ReplacePricePriceNewSubscriptionMatrixPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" -ReplaceAdjustmentAdjustment: TypeAlias = Union[ - ReplaceAdjustmentAdjustmentNewPercentageDiscount, - ReplaceAdjustmentAdjustmentNewUsageDiscount, - ReplaceAdjustmentAdjustmentNewAmountDiscount, - ReplaceAdjustmentAdjustmentNewMinimum, - ReplaceAdjustmentAdjustmentNewMaximum, -] + item_id: Required[str] + """The id of the item the price will be associated with.""" + matrix_config: Required[ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfig] -class ReplaceAdjustment(TypedDict, total=False): - adjustment: Required[ReplaceAdjustmentAdjustment] - """The definition of a new adjustment to create and add to the subscription.""" + model_type: Required[Literal["matrix"]] - replaces_adjustment_id: Required[str] - """The id of the adjustment on the plan to replace in the subscription.""" + name: Required[str] + """The name of the price.""" + billable_metric_id: Optional[str] + """The id of the billable metric for the price. -class ReplacePriceAllocationPrice(TypedDict, total=False): - amount: Required[str] - """An amount of the currency to allocate to the customer at the specified cadence.""" + Only needed if the price is usage-based. + """ - cadence: Required[Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]] - """The cadence at which to allocate the amount to the customer.""" + 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. + """ - currency: Required[str] + billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration] """ - An ISO 4217 currency string or a custom pricing unit identifier in which to bill - this price. + For custom cadence: specifies the duration of the billing period in days or + months. """ - expires_at_end_of_cadence: Required[bool] + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + currency: Optional[str] """ - Whether the allocated amount should expire at the end of the cadence or roll - over to the next period. + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. """ + dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionMatrixPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" -class ReplacePriceDiscount(TypedDict, total=False): - discount_type: Required[Literal["percentage", "usage", "amount"]] + external_price_id: Optional[str] + """An alias for the price.""" - amount_discount: Optional[str] - """Only available if discount_type is `amount`.""" + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ - percentage_discount: Optional[float] - """Only available if discount_type is `percentage`. + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" - This is a number between 0 and 1. + invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. """ - usage_discount: Optional[float] - """Only available if discount_type is `usage`. + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. - Number of usage units that this discount is for + 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 ReplacePricePriceNewSubscriptionTieredPriceTieredConfigTier(TypedDict, total=False): + first_unit: Required[float] + """Exclusive tier starting value""" -class ReplacePricePriceNewSubscriptionUnitPriceUnitConfig(TypedDict, total=False): unit_amount: Required[str] - """Rate per unit of usage""" + """Amount per unit""" + last_unit: Optional[float] + """Inclusive tier ending value. If null, this is treated as the last tier""" -class ReplacePricePriceNewSubscriptionUnitPriceBillingCycleConfiguration(TypedDict, total=False): + +class ReplacePricePriceNewSubscriptionTieredPriceTieredConfig(TypedDict, total=False): + tiers: Required[Iterable[ReplacePricePriceNewSubscriptionTieredPriceTieredConfigTier]] + """Tiers for rating based on total usage quantities into the specified tier""" + + +class ReplacePricePriceNewSubscriptionTieredPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3177,7 +4474,21 @@ class ReplacePricePriceNewSubscriptionUnitPriceBillingCycleConfiguration(TypedDi """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTieredPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3185,19 +4496,19 @@ class ReplacePricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration(Typed """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionUnitPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTieredPrice(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["unit"]] + model_type: Required[Literal["tiered"]] name: Required[str] """The name of the price.""" - unit_config: Required[ReplacePricePriceNewSubscriptionUnitPriceUnitConfig] + tiered_config: Required[ReplacePricePriceNewSubscriptionTieredPriceTieredConfig] billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -3211,7 +4522,7 @@ class ReplacePricePriceNewSubscriptionUnitPrice(TypedDict, total=False): this is true, and in-arrears if this is false. """ - billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionUnitPriceBillingCycleConfiguration] + billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredPriceBillingCycleConfiguration] """ For custom cadence: specifies the duration of the billing period in days or months. @@ -3226,6 +4537,9 @@ class ReplacePricePriceNewSubscriptionUnitPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionTieredPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -3238,7 +4552,7 @@ class ReplacePricePriceNewSubscriptionUnitPrice(TypedDict, total=False): invoice_grouping_key: Optional[str] """The property used to group this price on an invoice""" - invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration] + invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration] """Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle. @@ -3258,19 +4572,29 @@ class ReplacePricePriceNewSubscriptionUnitPrice(TypedDict, total=False): """ -class ReplacePricePriceNewSubscriptionPackagePricePackageConfig(TypedDict, total=False): - package_amount: Required[str] - """A currency amount to rate usage by""" +class ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfigTier(TypedDict, total=False): + bps: Required[float] + """Per-event basis point rate""" - package_size: Required[int] - """An integer amount to represent package size. + minimum_amount: Required[str] + """Exclusive tier starting value""" - For example, 1000 here would divide usage by 1000 before multiplying by - package_amount in rating + maximum_amount: Optional[str] + """Inclusive tier ending value""" + + per_unit_maximum: Optional[str] + """Per unit maximum to charge""" + + +class ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfig(TypedDict, total=False): + tiers: Required[Iterable[ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfigTier]] + """ + Tiers for a Graduated BPS pricing model, where usage is bucketed into specified + tiers """ -class ReplacePricePriceNewSubscriptionPackagePriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3278,7 +4602,21 @@ class ReplacePricePriceNewSubscriptionPackagePriceBillingCycleConfiguration(Type """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTieredBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3286,19 +4624,19 @@ class ReplacePricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration(Ty """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionPackagePrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTieredBpsPrice(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["package"]] + model_type: Required[Literal["tiered_bps"]] name: Required[str] """The name of the price.""" - package_config: Required[ReplacePricePriceNewSubscriptionPackagePricePackageConfig] + tiered_bps_config: Required[ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfig] billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -3312,7 +4650,7 @@ class ReplacePricePriceNewSubscriptionPackagePrice(TypedDict, total=False): this is true, and in-arrears if this is false. """ - billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionPackagePriceBillingCycleConfiguration] + billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration] """ For custom cadence: specifies the duration of the billing period in days or months. @@ -3327,6 +4665,11 @@ class ReplacePricePriceNewSubscriptionPackagePrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionTieredBpsPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -3339,7 +4682,7 @@ class ReplacePricePriceNewSubscriptionPackagePrice(TypedDict, total=False): invoice_grouping_key: Optional[str] """The property used to group this price on an invoice""" - invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration] + invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration] """Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle. @@ -3359,30 +4702,15 @@ class ReplacePricePriceNewSubscriptionPackagePrice(TypedDict, total=False): """ -class ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfigMatrixValue(TypedDict, total=False): - dimension_values: Required[List[Optional[str]]] - """One or two matrix keys to filter usage to this Matrix value by. - - For example, ["region", "tier"] could be used to filter cloud usage by a cloud - region and an instance tier. - """ - - unit_amount: Required[str] - """Unit price for the specified dimension_values""" - - -class ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfig(TypedDict, total=False): - default_unit_amount: Required[str] - """Default per unit rate for any usage not bucketed into a specified matrix_value""" - - dimensions: Required[List[Optional[str]]] - """One or two event property values to evaluate matrix groups by""" +class ReplacePricePriceNewSubscriptionBpsPriceBpsConfig(TypedDict, total=False): + bps: Required[float] + """Basis point take rate per event""" - matrix_values: Required[Iterable[ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfigMatrixValue]] - """Matrix values for specified matrix grouping keys""" + per_unit_maximum: Optional[str] + """Optional currency amount maximum to cap spend per event""" -class ReplacePricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionBpsPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3390,7 +4718,21 @@ class ReplacePricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration(Typed """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3398,16 +4740,16 @@ class ReplacePricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration(Typ """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionMatrixPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionBpsPrice(TypedDict, total=False): + bps_config: Required[ReplacePricePriceNewSubscriptionBpsPriceBpsConfig] + 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.""" - matrix_config: Required[ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfig] - - model_type: Required[Literal["matrix"]] + model_type: Required[Literal["bps"]] name: Required[str] """The name of the price.""" @@ -3424,7 +4766,7 @@ class ReplacePricePriceNewSubscriptionMatrixPrice(TypedDict, total=False): this is true, and in-arrears if this is false. """ - billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration] + billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBpsPriceBillingCycleConfiguration] """ For custom cadence: specifies the duration of the billing period in days or months. @@ -3439,6 +4781,9 @@ class ReplacePricePriceNewSubscriptionMatrixPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionBpsPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -3451,7 +4796,7 @@ class ReplacePricePriceNewSubscriptionMatrixPrice(TypedDict, total=False): invoice_grouping_key: Optional[str] """The property used to group this price on an invoice""" - invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration] + invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration] """Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle. @@ -3471,23 +4816,26 @@ class ReplacePricePriceNewSubscriptionMatrixPrice(TypedDict, total=False): """ -class ReplacePricePriceNewSubscriptionTieredPriceTieredConfigTier(TypedDict, total=False): - first_unit: Required[float] - """Exclusive tier starting value""" +class ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfigTier(TypedDict, total=False): + bps: Required[float] + """Basis points to rate on""" - unit_amount: Required[str] - """Amount per unit""" + maximum_amount: Optional[str] + """Upper bound for tier""" - last_unit: Optional[float] - """Inclusive tier ending value. If null, this is treated as the last tier""" + per_unit_maximum: Optional[str] + """The maximum amount to charge for any one event""" -class ReplacePricePriceNewSubscriptionTieredPriceTieredConfig(TypedDict, total=False): - tiers: Required[Iterable[ReplacePricePriceNewSubscriptionTieredPriceTieredConfigTier]] - """Tiers for rating based on total usage quantities into the specified tier""" +class ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfig(TypedDict, total=False): + tiers: Required[Iterable[ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfigTier]] + """ + Tiers for a bulk BPS pricing model where all usage is aggregated to a single + tier based on total volume + """ -class ReplacePricePriceNewSubscriptionTieredPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3495,7 +4843,21 @@ class ReplacePricePriceNewSubscriptionTieredPriceBillingCycleConfiguration(Typed """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionBulkBpsPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3503,20 +4865,20 @@ class ReplacePricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration(Typ """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionTieredPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionBulkBpsPrice(TypedDict, total=False): + bulk_bps_config: Required[ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfig] + 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"]] + model_type: Required[Literal["bulk_bps"]] name: Required[str] """The name of the price.""" - tiered_config: Required[ReplacePricePriceNewSubscriptionTieredPriceTieredConfig] - billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -3529,7 +4891,7 @@ class ReplacePricePriceNewSubscriptionTieredPrice(TypedDict, total=False): this is true, and in-arrears if this is false. """ - billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredPriceBillingCycleConfiguration] + billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration] """ For custom cadence: specifies the duration of the billing period in days or months. @@ -3544,6 +4906,9 @@ class ReplacePricePriceNewSubscriptionTieredPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionBulkBpsPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -3556,7 +4921,7 @@ class ReplacePricePriceNewSubscriptionTieredPrice(TypedDict, total=False): invoice_grouping_key: Optional[str] """The property used to group this price on an invoice""" - invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration] + invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration] """Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle. @@ -3576,29 +4941,20 @@ class ReplacePricePriceNewSubscriptionTieredPrice(TypedDict, total=False): """ -class ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfigTier(TypedDict, total=False): - bps: Required[float] - """Per-event basis point rate""" - - minimum_amount: Required[str] - """Exclusive tier starting value""" - - maximum_amount: Optional[str] - """Inclusive tier ending value""" +class ReplacePricePriceNewSubscriptionBulkPriceBulkConfigTier(TypedDict, total=False): + unit_amount: Required[str] + """Amount per unit""" - per_unit_maximum: Optional[str] - """Per unit maximum to charge""" + maximum_units: Optional[float] + """Upper bound for this tier""" -class ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfig(TypedDict, total=False): - tiers: Required[Iterable[ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfigTier]] - """ - Tiers for a Graduated BPS pricing model, where usage is bucketed into specified - tiers - """ +class ReplacePricePriceNewSubscriptionBulkPriceBulkConfig(TypedDict, total=False): + tiers: Required[Iterable[ReplacePricePriceNewSubscriptionBulkPriceBulkConfigTier]] + """Bulk tiers for rating based on total usage volume""" -class ReplacePricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionBulkPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3606,7 +4962,21 @@ class ReplacePricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration(Ty """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionBulkPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3614,20 +4984,20 @@ class ReplacePricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration( """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionTieredBpsPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionBulkPrice(TypedDict, total=False): + bulk_config: Required[ReplacePricePriceNewSubscriptionBulkPriceBulkConfig] + 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_bps"]] + model_type: Required[Literal["bulk"]] name: Required[str] """The name of the price.""" - tiered_bps_config: Required[ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfig] - billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -3640,7 +5010,7 @@ class ReplacePricePriceNewSubscriptionTieredBpsPrice(TypedDict, total=False): this is true, and in-arrears if this is false. """ - billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration] + billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBulkPriceBillingCycleConfiguration] """ For custom cadence: specifies the duration of the billing period in days or months. @@ -3655,6 +5025,9 @@ class ReplacePricePriceNewSubscriptionTieredBpsPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionBulkPriceDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -3667,7 +5040,7 @@ class ReplacePricePriceNewSubscriptionTieredBpsPrice(TypedDict, total=False): invoice_grouping_key: Optional[str] """The property used to group this price on an invoice""" - invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration] + invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration] """Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle. @@ -3687,15 +5060,7 @@ class ReplacePricePriceNewSubscriptionTieredBpsPrice(TypedDict, total=False): """ -class ReplacePricePriceNewSubscriptionBpsPriceBpsConfig(TypedDict, total=False): - bps: Required[float] - """Basis point take rate per event""" - - per_unit_maximum: Optional[str] - """Optional currency amount maximum to cap spend per event""" - - -class ReplacePricePriceNewSubscriptionBpsPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3703,7 +5068,21 @@ class ReplacePricePriceNewSubscriptionBpsPriceBillingCycleConfiguration(TypedDic """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3711,20 +5090,20 @@ class ReplacePricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration(TypedD """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionBpsPrice(TypedDict, total=False): - bps_config: Required[ReplacePricePriceNewSubscriptionBpsPriceBpsConfig] - +class ReplacePricePriceNewSubscriptionThresholdTotalAmountPrice(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["bps"]] + model_type: Required[Literal["threshold_total_amount"]] name: Required[str] """The name of the price.""" + threshold_total_amount_config: Required[Dict[str, object]] + billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -3737,7 +5116,9 @@ class ReplacePricePriceNewSubscriptionBpsPrice(TypedDict, total=False): this is true, and in-arrears if this is false. """ - billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBpsPriceBillingCycleConfiguration] + billing_cycle_configuration: Optional[ + ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfiguration + ] """ For custom cadence: specifies the duration of the billing period in days or months. @@ -3752,6 +5133,11 @@ class ReplacePricePriceNewSubscriptionBpsPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -3764,7 +5150,9 @@ class ReplacePricePriceNewSubscriptionBpsPrice(TypedDict, total=False): invoice_grouping_key: Optional[str] """The property used to group this price on an invoice""" - invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration] + invoicing_cycle_configuration: Optional[ + ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration + ] """Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle. @@ -3779,31 +5167,12 @@ class ReplacePricePriceNewSubscriptionBpsPrice(TypedDict, total=False): reference_id: Optional[str] """ - A transient ID that can be used to reference this price when adding adjustments - in the same API call. - """ - - -class ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfigTier(TypedDict, total=False): - bps: Required[float] - """Basis points to rate on""" - - maximum_amount: Optional[str] - """Upper bound for tier""" - - per_unit_maximum: Optional[str] - """The maximum amount to charge for any one event""" - - -class ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfig(TypedDict, total=False): - tiers: Required[Iterable[ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfigTier]] - """ - Tiers for a bulk BPS pricing model where all usage is aggregated to a single - tier based on total volume - """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ -class ReplacePricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3811,7 +5180,21 @@ class ReplacePricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration(Type """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3819,20 +5202,20 @@ class ReplacePricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration(Ty """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionBulkBpsPrice(TypedDict, total=False): - bulk_bps_config: Required[ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfig] - +class ReplacePricePriceNewSubscriptionTieredPackagePrice(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_bps"]] + model_type: Required[Literal["tiered_package"]] name: Required[str] """The name of the price.""" + tiered_package_config: Required[Dict[str, object]] + billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -3845,7 +5228,7 @@ class ReplacePricePriceNewSubscriptionBulkBpsPrice(TypedDict, total=False): this is true, and in-arrears if this is false. """ - billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration] + billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration] """ For custom cadence: specifies the duration of the billing period in days or months. @@ -3860,6 +5243,11 @@ class ReplacePricePriceNewSubscriptionBulkBpsPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionTieredPackagePriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -3872,7 +5260,9 @@ class ReplacePricePriceNewSubscriptionBulkBpsPrice(TypedDict, total=False): invoice_grouping_key: Optional[str] """The property used to group this price on an invoice""" - invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration] + invoicing_cycle_configuration: Optional[ + ReplacePricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration + ] """Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle. @@ -3892,20 +5282,7 @@ class ReplacePricePriceNewSubscriptionBulkBpsPrice(TypedDict, total=False): """ -class ReplacePricePriceNewSubscriptionBulkPriceBulkConfigTier(TypedDict, total=False): - unit_amount: Required[str] - """Amount per unit""" - - maximum_units: Optional[float] - """Upper bound for this tier""" - - -class ReplacePricePriceNewSubscriptionBulkPriceBulkConfig(TypedDict, total=False): - tiers: Required[Iterable[ReplacePricePriceNewSubscriptionBulkPriceBulkConfigTier]] - """Bulk tiers for rating based on total usage volume""" - - -class ReplacePricePriceNewSubscriptionBulkPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3913,7 +5290,21 @@ class ReplacePricePriceNewSubscriptionBulkPriceBillingCycleConfiguration(TypedDi """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTieredWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -3921,20 +5312,20 @@ class ReplacePricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration(Typed """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionBulkPrice(TypedDict, total=False): - bulk_config: Required[ReplacePricePriceNewSubscriptionBulkPriceBulkConfig] - +class ReplacePricePriceNewSubscriptionTieredWithMinimumPrice(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"]] + model_type: Required[Literal["tiered_with_minimum"]] name: Required[str] """The name of the price.""" + tiered_with_minimum_config: Required[Dict[str, object]] + billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -3947,7 +5338,9 @@ class ReplacePricePriceNewSubscriptionBulkPrice(TypedDict, total=False): this is true, and in-arrears if this is false. """ - billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBulkPriceBillingCycleConfiguration] + billing_cycle_configuration: Optional[ + ReplacePricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguration + ] """ For custom cadence: specifies the duration of the billing period in days or months. @@ -3962,6 +5355,11 @@ class ReplacePricePriceNewSubscriptionBulkPrice(TypedDict, total=False): price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionTieredWithMinimumPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -3974,7 +5372,9 @@ class ReplacePricePriceNewSubscriptionBulkPrice(TypedDict, total=False): invoice_grouping_key: Optional[str] """The property used to group this price on an invoice""" - invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration] + invoicing_cycle_configuration: Optional[ + ReplacePricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration + ] """Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle. @@ -3994,7 +5394,7 @@ class ReplacePricePriceNewSubscriptionBulkPrice(TypedDict, total=False): """ -class ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4002,7 +5402,21 @@ class ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfi """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionUnitWithPercentPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4010,19 +5424,19 @@ class ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleCon """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionThresholdTotalAmountPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionUnitWithPercentPrice(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["threshold_total_amount"]] + model_type: Required[Literal["unit_with_percent"]] name: Required[str] """The name of the price.""" - threshold_total_amount_config: Required[Dict[str, object]] + unit_with_percent_config: Required[Dict[str, object]] billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -4036,9 +5450,7 @@ class ReplacePricePriceNewSubscriptionThresholdTotalAmountPrice(TypedDict, total this is true, and in-arrears if this is false. """ - billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfiguration - ] + billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration] """ For custom cadence: specifies the duration of the billing period in days or months. @@ -4053,6 +5465,11 @@ class ReplacePricePriceNewSubscriptionThresholdTotalAmountPrice(TypedDict, total price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionUnitWithPercentPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -4066,7 +5483,7 @@ class ReplacePricePriceNewSubscriptionThresholdTotalAmountPrice(TypedDict, total """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -4087,7 +5504,7 @@ class ReplacePricePriceNewSubscriptionThresholdTotalAmountPrice(TypedDict, total """ -class ReplacePricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4095,7 +5512,21 @@ class ReplacePricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguratio """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionPackageWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4103,19 +5534,19 @@ class ReplacePricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfigurat """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionTieredPackagePrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionPackageWithAllocationPrice(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_package"]] + model_type: Required[Literal["package_with_allocation"]] name: Required[str] """The name of the price.""" - tiered_package_config: Required[Dict[str, object]] + package_with_allocation_config: Required[Dict[str, object]] billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -4129,7 +5560,9 @@ class ReplacePricePriceNewSubscriptionTieredPackagePrice(TypedDict, total=False) this is true, and in-arrears if this is false. """ - billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration] + billing_cycle_configuration: Optional[ + ReplacePricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfiguration + ] """ For custom cadence: specifies the duration of the billing period in days or months. @@ -4144,6 +5577,11 @@ class ReplacePricePriceNewSubscriptionTieredPackagePrice(TypedDict, total=False) price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionPackageWithAllocationPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -4157,7 +5595,7 @@ class ReplacePricePriceNewSubscriptionTieredPackagePrice(TypedDict, total=False) """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -4178,7 +5616,7 @@ class ReplacePricePriceNewSubscriptionTieredPackagePrice(TypedDict, total=False) """ -class ReplacePricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4186,7 +5624,21 @@ class ReplacePricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfigur """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTierWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4194,19 +5646,19 @@ class ReplacePricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfig """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionTieredWithMinimumPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTierWithProrationPrice(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_minimum"]] + model_type: Required[Literal["tiered_with_proration"]] name: Required[str] """The name of the price.""" - tiered_with_minimum_config: Required[Dict[str, object]] + tiered_with_proration_config: Required[Dict[str, object]] billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -4221,7 +5673,7 @@ class ReplacePricePriceNewSubscriptionTieredWithMinimumPrice(TypedDict, total=Fa """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -4237,6 +5689,11 @@ class ReplacePricePriceNewSubscriptionTieredWithMinimumPrice(TypedDict, total=Fa price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionTierWithProrationPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -4250,7 +5707,7 @@ class ReplacePricePriceNewSubscriptionTieredWithMinimumPrice(TypedDict, total=Fa """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -4271,7 +5728,7 @@ class ReplacePricePriceNewSubscriptionTieredWithMinimumPrice(TypedDict, total=Fa """ -class ReplacePricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4279,7 +5736,21 @@ class ReplacePricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfigurat """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionUnitWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4287,19 +5758,19 @@ class ReplacePricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfigur """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionUnitWithPercentPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionUnitWithProrationPrice(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["unit_with_percent"]] + model_type: Required[Literal["unit_with_proration"]] name: Required[str] """The name of the price.""" - unit_with_percent_config: Required[Dict[str, object]] + unit_with_proration_config: Required[Dict[str, object]] billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -4313,7 +5784,9 @@ class ReplacePricePriceNewSubscriptionUnitWithPercentPrice(TypedDict, total=Fals this is true, and in-arrears if this is false. """ - billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration] + billing_cycle_configuration: Optional[ + ReplacePricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguration + ] """ For custom cadence: specifies the duration of the billing period in days or months. @@ -4328,6 +5801,11 @@ class ReplacePricePriceNewSubscriptionUnitWithPercentPrice(TypedDict, total=Fals price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionUnitWithProrationPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -4341,7 +5819,7 @@ class ReplacePricePriceNewSubscriptionUnitWithPercentPrice(TypedDict, total=Fals """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -4362,7 +5840,7 @@ class ReplacePricePriceNewSubscriptionUnitWithPercentPrice(TypedDict, total=Fals """ -class ReplacePricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4370,7 +5848,21 @@ class ReplacePricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConf """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4378,20 +5870,20 @@ class ReplacePricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleCo """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionPackageWithAllocationPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedAllocationPrice(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[Dict[str, object]] + item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["package_with_allocation"]] + model_type: Required[Literal["grouped_allocation"]] name: Required[str] """The name of the price.""" - package_with_allocation_config: Required[Dict[str, object]] - billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -4405,7 +5897,7 @@ class ReplacePricePriceNewSubscriptionPackageWithAllocationPrice(TypedDict, tota """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -4421,6 +5913,11 @@ class ReplacePricePriceNewSubscriptionPackageWithAllocationPrice(TypedDict, tota price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionGroupedAllocationPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -4434,7 +5931,7 @@ class ReplacePricePriceNewSubscriptionPackageWithAllocationPrice(TypedDict, tota """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -4455,7 +5952,7 @@ class ReplacePricePriceNewSubscriptionPackageWithAllocationPrice(TypedDict, tota """ -class ReplacePricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4463,7 +5960,25 @@ class ReplacePricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfigur """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceDimensionalPriceConfiguration( + TypedDict, total=False +): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration( + TypedDict, total=False +): duration: Required[int] """The duration of the billing period.""" @@ -4471,20 +5986,20 @@ class ReplacePricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfig """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionTierWithProrationPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPrice(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[Dict[str, object]] + item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["tiered_with_proration"]] + model_type: Required[Literal["grouped_with_prorated_minimum"]] name: Required[str] """The name of the price.""" - tiered_with_proration_config: Required[Dict[str, object]] - billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -4498,7 +6013,7 @@ class ReplacePricePriceNewSubscriptionTierWithProrationPrice(TypedDict, total=Fa """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -4514,6 +6029,11 @@ class ReplacePricePriceNewSubscriptionTierWithProrationPrice(TypedDict, total=Fa price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -4527,7 +6047,7 @@ class ReplacePricePriceNewSubscriptionTierWithProrationPrice(TypedDict, total=Fa """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -4548,7 +6068,7 @@ class ReplacePricePriceNewSubscriptionTierWithProrationPrice(TypedDict, total=Fa """ -class ReplacePricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4556,7 +6076,21 @@ class ReplacePricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfigur """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionBulkWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4564,20 +6098,20 @@ class ReplacePricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfig """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionUnitWithProrationPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionBulkWithProrationPrice(TypedDict, total=False): + bulk_with_proration_config: Required[Dict[str, object]] + 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["unit_with_proration"]] + model_type: Required[Literal["bulk_with_proration"]] name: Required[str] """The name of the price.""" - unit_with_proration_config: Required[Dict[str, object]] - billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -4591,7 +6125,7 @@ class ReplacePricePriceNewSubscriptionUnitWithProrationPrice(TypedDict, total=Fa """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -4607,6 +6141,11 @@ class ReplacePricePriceNewSubscriptionUnitWithProrationPrice(TypedDict, total=Fa price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionBulkWithProrationPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -4620,7 +6159,7 @@ class ReplacePricePriceNewSubscriptionUnitWithProrationPrice(TypedDict, total=Fa """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -4641,15 +6180,35 @@ class ReplacePricePriceNewSubscriptionUnitWithProrationPrice(TypedDict, total=Fa """ -class ReplacePricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguration(TypedDict, total=False): - duration: Required[int] - """The duration of the billing period.""" - - duration_unit: Required[Literal["day", "month"]] - """The unit of billing period duration.""" +class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycleConfiguration( + TypedDict, total=False +): + duration: Required[int] + """The duration of the billing period.""" + + duration_unit: Required[Literal["day", "month"]] + """The unit of billing period duration.""" + + +class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration( + TypedDict, total=False +): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" -class ReplacePricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration( + TypedDict, total=False +): duration: Required[int] """The duration of the billing period.""" @@ -4657,20 +6216,20 @@ class ReplacePricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfig """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionGroupedAllocationPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice(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[Dict[str, object]] - item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["grouped_allocation"]] + model_type: Required[Literal["scalable_matrix_with_unit_pricing"]] name: Required[str] """The name of the price.""" + scalable_matrix_with_unit_pricing_config: Required[Dict[str, object]] + billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -4684,7 +6243,7 @@ class ReplacePricePriceNewSubscriptionGroupedAllocationPrice(TypedDict, total=Fa """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -4700,6 +6259,11 @@ class ReplacePricePriceNewSubscriptionGroupedAllocationPrice(TypedDict, total=Fa price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -4713,7 +6277,7 @@ class ReplacePricePriceNewSubscriptionGroupedAllocationPrice(TypedDict, total=Fa """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -4734,7 +6298,9 @@ class ReplacePricePriceNewSubscriptionGroupedAllocationPrice(TypedDict, total=Fa """ -class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCycleConfiguration( + TypedDict, total=False +): duration: Required[int] """The duration of the billing period.""" @@ -4742,7 +6308,23 @@ class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycl """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration( +class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration( + TypedDict, total=False +): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration( TypedDict, total=False ): duration: Required[int] @@ -4752,20 +6334,20 @@ class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCy """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice(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[Dict[str, object]] - item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["grouped_with_prorated_minimum"]] + model_type: Required[Literal["scalable_matrix_with_tiered_pricing"]] name: Required[str] """The name of the price.""" + scalable_matrix_with_tiered_pricing_config: Required[Dict[str, object]] + billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -4779,7 +6361,7 @@ class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPrice(TypedDict, """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -4795,6 +6377,11 @@ class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPrice(TypedDict, price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -4808,7 +6395,7 @@ class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPrice(TypedDict, """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -4829,7 +6416,7 @@ class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPrice(TypedDict, """ -class ReplacePricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4837,7 +6424,21 @@ class ReplacePricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfigur """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4845,16 +6446,16 @@ class ReplacePricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfig """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionBulkWithProrationPrice(TypedDict, total=False): - bulk_with_proration_config: Required[Dict[str, object]] - +class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPrice(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[Dict[str, object]] + item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["bulk_with_proration"]] + model_type: Required[Literal["cumulative_grouped_bulk"]] name: Required[str] """The name of the price.""" @@ -4872,7 +6473,7 @@ class ReplacePricePriceNewSubscriptionBulkWithProrationPrice(TypedDict, total=Fa """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -4888,6 +6489,11 @@ class ReplacePricePriceNewSubscriptionBulkWithProrationPrice(TypedDict, total=Fa price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -4901,7 +6507,7 @@ class ReplacePricePriceNewSubscriptionBulkWithProrationPrice(TypedDict, total=Fa """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -4922,9 +6528,7 @@ class ReplacePricePriceNewSubscriptionBulkWithProrationPrice(TypedDict, total=Fa """ -class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycleConfiguration( - TypedDict, total=False -): +class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4932,9 +6536,21 @@ class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingC """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration( - TypedDict, total=False -): +class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -4942,20 +6558,20 @@ class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicin """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePrice(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["scalable_matrix_with_unit_pricing"]] + max_group_tiered_package_config: Required[Dict[str, object]] + + model_type: Required[Literal["max_group_tiered_package"]] name: Required[str] """The name of the price.""" - scalable_matrix_with_unit_pricing_config: Required[Dict[str, object]] - billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -4969,7 +6585,7 @@ class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice(TypedDi """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -4985,6 +6601,11 @@ class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice(TypedDi price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -4998,7 +6619,7 @@ class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice(TypedDi """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -5019,9 +6640,7 @@ class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice(TypedDi """ -class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCycleConfiguration( - TypedDict, total=False -): +class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -5029,9 +6648,23 @@ class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillin """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration( +class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration( TypedDict, total=False ): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -5039,20 +6672,20 @@ class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoic """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPrice(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[Dict[str, object]] + item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["scalable_matrix_with_tiered_pricing"]] + model_type: Required[Literal["grouped_with_metered_minimum"]] name: Required[str] """The name of the price.""" - scalable_matrix_with_tiered_pricing_config: Required[Dict[str, object]] - billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -5066,7 +6699,7 @@ class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice(Typed """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -5082,6 +6715,11 @@ class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice(Typed price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -5095,7 +6733,7 @@ class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice(Typed """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -5116,7 +6754,7 @@ class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice(Typed """ -class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -5124,7 +6762,21 @@ class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConf """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -5132,16 +6784,16 @@ class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleCo """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePrice(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[Dict[str, object]] - item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["cumulative_grouped_bulk"]] + matrix_with_display_name_config: Required[Dict[str, object]] + + model_type: Required[Literal["matrix_with_display_name"]] name: Required[str] """The name of the price.""" @@ -5159,7 +6811,7 @@ class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPrice(TypedDict, tota """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -5175,6 +6827,11 @@ class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPrice(TypedDict, tota price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -5188,7 +6845,7 @@ class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPrice(TypedDict, tota """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -5209,7 +6866,7 @@ class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPrice(TypedDict, tota """ -class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -5217,7 +6874,21 @@ class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConf """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -5225,16 +6896,16 @@ class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleCo """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedTieredPackagePrice(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[Dict[str, object]] + item_id: Required[str] """The id of the item the price will be associated with.""" - max_group_tiered_package_config: Required[Dict[str, object]] - - model_type: Required[Literal["max_group_tiered_package"]] + model_type: Required[Literal["grouped_tiered_package"]] name: Required[str] """The name of the price.""" @@ -5252,7 +6923,7 @@ class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePrice(TypedDict, tota """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -5268,6 +6939,11 @@ class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePrice(TypedDict, tota price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -5281,7 +6957,7 @@ class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePrice(TypedDict, tota """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -5302,7 +6978,37 @@ class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePrice(TypedDict, tota """ -class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue( + TypedDict, total=False +): + dimension_values: Required[List[Optional[str]]] + """One or two matrix keys to filter usage to this Matrix value by. + + For example, ["region", "tier"] could be used to filter cloud usage by a cloud + region and an instance tier. + """ + + unit_amount: Required[str] + """Unit price for the specified dimension_values""" + + +class ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfig(TypedDict, total=False): + allocation: Required[float] + """Allocation to be used to calculate the price""" + + default_unit_amount: Required[str] + """Default per unit rate for any usage not bucketed into a specified matrix_value""" + + dimensions: Required[List[Optional[str]]] + """One or two event property values to evaluate matrix groups by""" + + matrix_values: Required[ + Iterable[ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue] + ] + """Matrix values for specified matrix grouping keys""" + + +class ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -5310,7 +7016,21 @@ class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycle """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -5318,16 +7038,18 @@ class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCyc """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionMatrixWithAllocationPrice(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[Dict[str, object]] - item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["grouped_with_metered_minimum"]] + matrix_with_allocation_config: Required[ + ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfig + ] + + model_type: Required[Literal["matrix_with_allocation"]] name: Required[str] """The name of the price.""" @@ -5345,7 +7067,7 @@ class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPrice(TypedDict, """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -5361,6 +7083,11 @@ class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPrice(TypedDict, price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -5374,7 +7101,7 @@ class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPrice(TypedDict, """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -5395,7 +7122,7 @@ class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPrice(TypedDict, """ -class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -5403,7 +7130,23 @@ class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConf """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceDimensionalPriceConfiguration( + TypedDict, total=False +): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -5411,20 +7154,20 @@ class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleCo """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPrice(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.""" - matrix_with_display_name_config: Required[Dict[str, object]] - - model_type: Required[Literal["matrix_with_display_name"]] + model_type: Required[Literal["tiered_package_with_minimum"]] name: Required[str] """The name of the price.""" + tiered_package_with_minimum_config: Required[Dict[str, object]] + billable_metric_id: Optional[str] """The id of the billable metric for the price. @@ -5438,7 +7181,7 @@ class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePrice(TypedDict, tota """ billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfiguration + ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceBillingCycleConfiguration ] """ For custom cadence: specifies the duration of the billing period in days or @@ -5454,6 +7197,11 @@ class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePrice(TypedDict, tota price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -5467,7 +7215,7 @@ class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePrice(TypedDict, tota """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -5488,7 +7236,7 @@ class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePrice(TypedDict, tota """ -class ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedTieredPriceBillingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -5496,7 +7244,21 @@ class ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfi """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedTieredPriceDimensionalPriceConfiguration(TypedDict, total=False): + dimension_values: Required[List[str]] + """ + The list of dimension values matching (in order) the dimensions of the price + group + """ + + dimensional_price_group_id: Optional[str] + """The id of the dimensional price group to include this price in""" + + external_dimensional_price_group_id: Optional[str] + """The external id of the dimensional price group to include this price in""" + + +class ReplacePricePriceNewSubscriptionGroupedTieredPriceInvoicingCycleConfiguration(TypedDict, total=False): duration: Required[int] """The duration of the billing period.""" @@ -5504,16 +7266,16 @@ class ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleCon """The unit of billing period duration.""" -class ReplacePricePriceNewSubscriptionGroupedTieredPackagePrice(TypedDict, total=False): +class ReplacePricePriceNewSubscriptionGroupedTieredPrice(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[Dict[str, object]] + grouped_tiered_config: Required[Dict[str, object]] item_id: Required[str] """The id of the item the price will be associated with.""" - model_type: Required[Literal["grouped_tiered_package"]] + model_type: Required[Literal["grouped_tiered"]] name: Required[str] """The name of the price.""" @@ -5530,9 +7292,7 @@ class ReplacePricePriceNewSubscriptionGroupedTieredPackagePrice(TypedDict, total this is true, and in-arrears if this is false. """ - billing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfiguration - ] + billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionGroupedTieredPriceBillingCycleConfiguration] """ For custom cadence: specifies the duration of the billing period in days or months. @@ -5547,6 +7307,11 @@ class ReplacePricePriceNewSubscriptionGroupedTieredPackagePrice(TypedDict, total price is billed. """ + dimensional_price_configuration: Optional[ + ReplacePricePriceNewSubscriptionGroupedTieredPriceDimensionalPriceConfiguration + ] + """For dimensional price: specifies a price group and dimension values""" + external_price_id: Optional[str] """An alias for the price.""" @@ -5560,7 +7325,7 @@ class ReplacePricePriceNewSubscriptionGroupedTieredPackagePrice(TypedDict, total """The property used to group this price on an invoice""" invoicing_cycle_configuration: Optional[ - ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration + ReplacePricePriceNewSubscriptionGroupedTieredPriceInvoicingCycleConfiguration ] """Within each billing cycle, specifies the cadence at which invoices are produced. @@ -5607,6 +7372,9 @@ class ReplacePricePriceNewSubscriptionGroupedTieredPackagePrice(TypedDict, total ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPrice, ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePrice, ReplacePricePriceNewSubscriptionGroupedTieredPackagePrice, + ReplacePricePriceNewSubscriptionMatrixWithAllocationPrice, + ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPrice, + ReplacePricePriceNewSubscriptionGroupedTieredPrice, ] diff --git a/src/orb/types/subscription_schedule_plan_change_response.py b/src/orb/types/subscription_schedule_plan_change_response.py index 5bcadf14..0d870e1b 100644 --- a/src/orb/types/subscription_schedule_plan_change_response.py +++ b/src/orb/types/subscription_schedule_plan_change_response.py @@ -17,18 +17,28 @@ "AdjustmentInterval", "AdjustmentIntervalAdjustment", "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter", "BillingCycleAnchorConfiguration", "DiscountInterval", "DiscountIntervalAmountDiscountInterval", + "DiscountIntervalAmountDiscountIntervalFilter", "DiscountIntervalPercentageDiscountInterval", + "DiscountIntervalPercentageDiscountIntervalFilter", "DiscountIntervalUsageDiscountInterval", + "DiscountIntervalUsageDiscountIntervalFilter", "FixedFeeQuantitySchedule", "MaximumInterval", + "MaximumIntervalFilter", "MinimumInterval", + "MinimumIntervalFilter", "PendingSubscriptionChange", "PriceInterval", "PriceIntervalFixedFeeQuantityTransition", @@ -38,6 +48,17 @@ ] +class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): id: str @@ -46,6 +67,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -65,6 +89,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): """ +class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): id: str @@ -79,6 +114,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -92,6 +130,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel): id: str @@ -100,6 +149,9 @@ class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseMode applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -119,6 +171,17 @@ class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseMode """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): id: str @@ -127,6 +190,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -149,6 +215,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel): id: str @@ -157,6 +234,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -227,13 +307,21 @@ class BillingCycleAnchorConfiguration(BaseModel): """ +class DiscountIntervalAmountDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class DiscountIntervalAmountDiscountInterval(BaseModel): amount_discount: str """Only available if discount_type is `amount`.""" - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" - applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -242,14 +330,25 @@ class DiscountIntervalAmountDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalAmountDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" -class DiscountIntervalPercentageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class DiscountIntervalPercentageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + values: List[str] + """The IDs or values that match this filter.""" + + +class DiscountIntervalPercentageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -258,6 +357,9 @@ class DiscountIntervalPercentageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalPercentageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + percentage_discount: float """ Only available if discount_type is `percentage`.This is a number between 0 @@ -268,10 +370,18 @@ class DiscountIntervalPercentageDiscountInterval(BaseModel): """The start date of the discount interval.""" -class DiscountIntervalUsageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class DiscountIntervalUsageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class DiscountIntervalUsageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -280,6 +390,9 @@ class DiscountIntervalUsageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalUsageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" @@ -310,16 +423,27 @@ class FixedFeeQuantitySchedule(BaseModel): start_date: datetime -class MaximumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this maximum interval applies to.""" +class MaximumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class MaximumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this maximum interval applies to.""" end_date: Optional[datetime] = None """The end date of the maximum interval.""" + filters: List[MaximumIntervalFilter] + """The filters that determine which prices this maximum interval applies to.""" + maximum_amount: str """ The maximum amount to charge in a given billing period for the price intervals @@ -330,16 +454,27 @@ class MaximumInterval(BaseModel): """The start date of the maximum interval.""" -class MinimumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this minimum interval applies to.""" +class MinimumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class MinimumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this minimum interval applies to.""" end_date: Optional[datetime] = None """The end date of the minimum interval.""" + filters: List[MinimumIntervalFilter] + """The filters that determine which prices this minimum interval applies to.""" + minimum_amount: str """ The minimum amount to charge in a given billing period for the price intervals @@ -551,6 +686,9 @@ class SubscriptionSchedulePlanChangeResponse(BaseModel): minimum_intervals: List[MinimumInterval] """The minimum intervals for this subscription sorted by the start_date.""" + name: str + """The name of the subscription.""" + net_terms: int """ Determines the difference between the invoice issue date for subscription @@ -562,7 +700,7 @@ class SubscriptionSchedulePlanChangeResponse(BaseModel): pending_subscription_change: Optional[PendingSubscriptionChange] = None """A pending subscription change if one exists on this subscription.""" - plan: Plan + plan: Optional[Plan] = None """ 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 diff --git a/src/orb/types/subscription_trigger_phase_response.py b/src/orb/types/subscription_trigger_phase_response.py index bab4f432..e2cfe96c 100644 --- a/src/orb/types/subscription_trigger_phase_response.py +++ b/src/orb/types/subscription_trigger_phase_response.py @@ -17,18 +17,28 @@ "AdjustmentInterval", "AdjustmentIntervalAdjustment", "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter", "BillingCycleAnchorConfiguration", "DiscountInterval", "DiscountIntervalAmountDiscountInterval", + "DiscountIntervalAmountDiscountIntervalFilter", "DiscountIntervalPercentageDiscountInterval", + "DiscountIntervalPercentageDiscountIntervalFilter", "DiscountIntervalUsageDiscountInterval", + "DiscountIntervalUsageDiscountIntervalFilter", "FixedFeeQuantitySchedule", "MaximumInterval", + "MaximumIntervalFilter", "MinimumInterval", + "MinimumIntervalFilter", "PendingSubscriptionChange", "PriceInterval", "PriceIntervalFixedFeeQuantityTransition", @@ -38,6 +48,17 @@ ] +class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): id: str @@ -46,6 +67,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -65,6 +89,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): """ +class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): id: str @@ -79,6 +114,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -92,6 +130,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel): id: str @@ -100,6 +149,9 @@ class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseMode applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -119,6 +171,17 @@ class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseMode """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): id: str @@ -127,6 +190,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -149,6 +215,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel): id: str @@ -157,6 +234,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -227,13 +307,21 @@ class BillingCycleAnchorConfiguration(BaseModel): """ +class DiscountIntervalAmountDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class DiscountIntervalAmountDiscountInterval(BaseModel): amount_discount: str """Only available if discount_type is `amount`.""" - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" - applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -242,14 +330,25 @@ class DiscountIntervalAmountDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalAmountDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" -class DiscountIntervalPercentageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class DiscountIntervalPercentageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + values: List[str] + """The IDs or values that match this filter.""" + + +class DiscountIntervalPercentageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -258,6 +357,9 @@ class DiscountIntervalPercentageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalPercentageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + percentage_discount: float """ Only available if discount_type is `percentage`.This is a number between 0 @@ -268,10 +370,18 @@ class DiscountIntervalPercentageDiscountInterval(BaseModel): """The start date of the discount interval.""" -class DiscountIntervalUsageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class DiscountIntervalUsageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class DiscountIntervalUsageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -280,6 +390,9 @@ class DiscountIntervalUsageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalUsageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" @@ -310,16 +423,27 @@ class FixedFeeQuantitySchedule(BaseModel): start_date: datetime -class MaximumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this maximum interval applies to.""" +class MaximumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class MaximumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this maximum interval applies to.""" end_date: Optional[datetime] = None """The end date of the maximum interval.""" + filters: List[MaximumIntervalFilter] + """The filters that determine which prices this maximum interval applies to.""" + maximum_amount: str """ The maximum amount to charge in a given billing period for the price intervals @@ -330,16 +454,27 @@ class MaximumInterval(BaseModel): """The start date of the maximum interval.""" -class MinimumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this minimum interval applies to.""" +class MinimumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class MinimumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this minimum interval applies to.""" end_date: Optional[datetime] = None """The end date of the minimum interval.""" + filters: List[MinimumIntervalFilter] + """The filters that determine which prices this minimum interval applies to.""" + minimum_amount: str """ The minimum amount to charge in a given billing period for the price intervals @@ -551,6 +686,9 @@ class SubscriptionTriggerPhaseResponse(BaseModel): minimum_intervals: List[MinimumInterval] """The minimum intervals for this subscription sorted by the start_date.""" + name: str + """The name of the subscription.""" + net_terms: int """ Determines the difference between the invoice issue date for subscription @@ -562,7 +700,7 @@ class SubscriptionTriggerPhaseResponse(BaseModel): pending_subscription_change: Optional[PendingSubscriptionChange] = None """A pending subscription change if one exists on this subscription.""" - plan: Plan + plan: Optional[Plan] = None """ 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 diff --git a/src/orb/types/subscription_unschedule_cancellation_response.py b/src/orb/types/subscription_unschedule_cancellation_response.py index beca6a53..59594047 100644 --- a/src/orb/types/subscription_unschedule_cancellation_response.py +++ b/src/orb/types/subscription_unschedule_cancellation_response.py @@ -17,18 +17,28 @@ "AdjustmentInterval", "AdjustmentIntervalAdjustment", "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter", "BillingCycleAnchorConfiguration", "DiscountInterval", "DiscountIntervalAmountDiscountInterval", + "DiscountIntervalAmountDiscountIntervalFilter", "DiscountIntervalPercentageDiscountInterval", + "DiscountIntervalPercentageDiscountIntervalFilter", "DiscountIntervalUsageDiscountInterval", + "DiscountIntervalUsageDiscountIntervalFilter", "FixedFeeQuantitySchedule", "MaximumInterval", + "MaximumIntervalFilter", "MinimumInterval", + "MinimumIntervalFilter", "PendingSubscriptionChange", "PriceInterval", "PriceIntervalFixedFeeQuantityTransition", @@ -38,6 +48,17 @@ ] +class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): id: str @@ -46,6 +67,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -65,6 +89,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): """ +class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): id: str @@ -79,6 +114,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -92,6 +130,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel): id: str @@ -100,6 +149,9 @@ class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseMode applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -119,6 +171,17 @@ class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseMode """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): id: str @@ -127,6 +190,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -149,6 +215,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel): id: str @@ -157,6 +234,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -227,13 +307,21 @@ class BillingCycleAnchorConfiguration(BaseModel): """ +class DiscountIntervalAmountDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class DiscountIntervalAmountDiscountInterval(BaseModel): amount_discount: str """Only available if discount_type is `amount`.""" - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" - applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -242,14 +330,25 @@ class DiscountIntervalAmountDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalAmountDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" -class DiscountIntervalPercentageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class DiscountIntervalPercentageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + values: List[str] + """The IDs or values that match this filter.""" + + +class DiscountIntervalPercentageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -258,6 +357,9 @@ class DiscountIntervalPercentageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalPercentageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + percentage_discount: float """ Only available if discount_type is `percentage`.This is a number between 0 @@ -268,10 +370,18 @@ class DiscountIntervalPercentageDiscountInterval(BaseModel): """The start date of the discount interval.""" -class DiscountIntervalUsageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class DiscountIntervalUsageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class DiscountIntervalUsageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -280,6 +390,9 @@ class DiscountIntervalUsageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalUsageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" @@ -310,16 +423,27 @@ class FixedFeeQuantitySchedule(BaseModel): start_date: datetime -class MaximumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this maximum interval applies to.""" +class MaximumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class MaximumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this maximum interval applies to.""" end_date: Optional[datetime] = None """The end date of the maximum interval.""" + filters: List[MaximumIntervalFilter] + """The filters that determine which prices this maximum interval applies to.""" + maximum_amount: str """ The maximum amount to charge in a given billing period for the price intervals @@ -330,16 +454,27 @@ class MaximumInterval(BaseModel): """The start date of the maximum interval.""" -class MinimumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this minimum interval applies to.""" +class MinimumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class MinimumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this minimum interval applies to.""" end_date: Optional[datetime] = None """The end date of the minimum interval.""" + filters: List[MinimumIntervalFilter] + """The filters that determine which prices this minimum interval applies to.""" + minimum_amount: str """ The minimum amount to charge in a given billing period for the price intervals @@ -551,6 +686,9 @@ class SubscriptionUnscheduleCancellationResponse(BaseModel): minimum_intervals: List[MinimumInterval] """The minimum intervals for this subscription sorted by the start_date.""" + name: str + """The name of the subscription.""" + net_terms: int """ Determines the difference between the invoice issue date for subscription @@ -562,7 +700,7 @@ class SubscriptionUnscheduleCancellationResponse(BaseModel): pending_subscription_change: Optional[PendingSubscriptionChange] = None """A pending subscription change if one exists on this subscription.""" - plan: Plan + plan: Optional[Plan] = None """ 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 diff --git a/src/orb/types/subscription_unschedule_fixed_fee_quantity_updates_response.py b/src/orb/types/subscription_unschedule_fixed_fee_quantity_updates_response.py index d17a4423..12b36a1a 100644 --- a/src/orb/types/subscription_unschedule_fixed_fee_quantity_updates_response.py +++ b/src/orb/types/subscription_unschedule_fixed_fee_quantity_updates_response.py @@ -17,18 +17,28 @@ "AdjustmentInterval", "AdjustmentIntervalAdjustment", "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter", "BillingCycleAnchorConfiguration", "DiscountInterval", "DiscountIntervalAmountDiscountInterval", + "DiscountIntervalAmountDiscountIntervalFilter", "DiscountIntervalPercentageDiscountInterval", + "DiscountIntervalPercentageDiscountIntervalFilter", "DiscountIntervalUsageDiscountInterval", + "DiscountIntervalUsageDiscountIntervalFilter", "FixedFeeQuantitySchedule", "MaximumInterval", + "MaximumIntervalFilter", "MinimumInterval", + "MinimumIntervalFilter", "PendingSubscriptionChange", "PriceInterval", "PriceIntervalFixedFeeQuantityTransition", @@ -38,6 +48,17 @@ ] +class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): id: str @@ -46,6 +67,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -65,6 +89,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): """ +class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): id: str @@ -79,6 +114,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -92,6 +130,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel): id: str @@ -100,6 +149,9 @@ class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseMode applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -119,6 +171,17 @@ class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseMode """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): id: str @@ -127,6 +190,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -149,6 +215,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel): id: str @@ -157,6 +234,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -227,13 +307,21 @@ class BillingCycleAnchorConfiguration(BaseModel): """ +class DiscountIntervalAmountDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class DiscountIntervalAmountDiscountInterval(BaseModel): amount_discount: str """Only available if discount_type is `amount`.""" - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" - applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -242,14 +330,25 @@ class DiscountIntervalAmountDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalAmountDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" -class DiscountIntervalPercentageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class DiscountIntervalPercentageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + values: List[str] + """The IDs or values that match this filter.""" + + +class DiscountIntervalPercentageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -258,6 +357,9 @@ class DiscountIntervalPercentageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalPercentageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + percentage_discount: float """ Only available if discount_type is `percentage`.This is a number between 0 @@ -268,10 +370,18 @@ class DiscountIntervalPercentageDiscountInterval(BaseModel): """The start date of the discount interval.""" -class DiscountIntervalUsageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class DiscountIntervalUsageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class DiscountIntervalUsageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -280,6 +390,9 @@ class DiscountIntervalUsageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalUsageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" @@ -310,16 +423,27 @@ class FixedFeeQuantitySchedule(BaseModel): start_date: datetime -class MaximumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this maximum interval applies to.""" +class MaximumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class MaximumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this maximum interval applies to.""" end_date: Optional[datetime] = None """The end date of the maximum interval.""" + filters: List[MaximumIntervalFilter] + """The filters that determine which prices this maximum interval applies to.""" + maximum_amount: str """ The maximum amount to charge in a given billing period for the price intervals @@ -330,16 +454,27 @@ class MaximumInterval(BaseModel): """The start date of the maximum interval.""" -class MinimumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this minimum interval applies to.""" +class MinimumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class MinimumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this minimum interval applies to.""" end_date: Optional[datetime] = None """The end date of the minimum interval.""" + filters: List[MinimumIntervalFilter] + """The filters that determine which prices this minimum interval applies to.""" + minimum_amount: str """ The minimum amount to charge in a given billing period for the price intervals @@ -551,6 +686,9 @@ class SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse(BaseModel): minimum_intervals: List[MinimumInterval] """The minimum intervals for this subscription sorted by the start_date.""" + name: str + """The name of the subscription.""" + net_terms: int """ Determines the difference between the invoice issue date for subscription @@ -562,7 +700,7 @@ class SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse(BaseModel): pending_subscription_change: Optional[PendingSubscriptionChange] = None """A pending subscription change if one exists on this subscription.""" - plan: Plan + plan: Optional[Plan] = None """ 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 diff --git a/src/orb/types/subscription_unschedule_pending_plan_changes_response.py b/src/orb/types/subscription_unschedule_pending_plan_changes_response.py index 96a76755..84f15eb2 100644 --- a/src/orb/types/subscription_unschedule_pending_plan_changes_response.py +++ b/src/orb/types/subscription_unschedule_pending_plan_changes_response.py @@ -17,18 +17,28 @@ "AdjustmentInterval", "AdjustmentIntervalAdjustment", "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter", "BillingCycleAnchorConfiguration", "DiscountInterval", "DiscountIntervalAmountDiscountInterval", + "DiscountIntervalAmountDiscountIntervalFilter", "DiscountIntervalPercentageDiscountInterval", + "DiscountIntervalPercentageDiscountIntervalFilter", "DiscountIntervalUsageDiscountInterval", + "DiscountIntervalUsageDiscountIntervalFilter", "FixedFeeQuantitySchedule", "MaximumInterval", + "MaximumIntervalFilter", "MinimumInterval", + "MinimumIntervalFilter", "PendingSubscriptionChange", "PriceInterval", "PriceIntervalFixedFeeQuantityTransition", @@ -38,6 +48,17 @@ ] +class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): id: str @@ -46,6 +67,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -65,6 +89,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): """ +class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): id: str @@ -79,6 +114,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -92,6 +130,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel): id: str @@ -100,6 +149,9 @@ class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseMode applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -119,6 +171,17 @@ class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseMode """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): id: str @@ -127,6 +190,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -149,6 +215,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel): id: str @@ -157,6 +234,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -227,13 +307,21 @@ class BillingCycleAnchorConfiguration(BaseModel): """ +class DiscountIntervalAmountDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class DiscountIntervalAmountDiscountInterval(BaseModel): amount_discount: str """Only available if discount_type is `amount`.""" - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" - applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -242,14 +330,25 @@ class DiscountIntervalAmountDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalAmountDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" -class DiscountIntervalPercentageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class DiscountIntervalPercentageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + values: List[str] + """The IDs or values that match this filter.""" + + +class DiscountIntervalPercentageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -258,6 +357,9 @@ class DiscountIntervalPercentageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalPercentageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + percentage_discount: float """ Only available if discount_type is `percentage`.This is a number between 0 @@ -268,10 +370,18 @@ class DiscountIntervalPercentageDiscountInterval(BaseModel): """The start date of the discount interval.""" -class DiscountIntervalUsageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class DiscountIntervalUsageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class DiscountIntervalUsageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -280,6 +390,9 @@ class DiscountIntervalUsageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalUsageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" @@ -310,16 +423,27 @@ class FixedFeeQuantitySchedule(BaseModel): start_date: datetime -class MaximumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this maximum interval applies to.""" +class MaximumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class MaximumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this maximum interval applies to.""" end_date: Optional[datetime] = None """The end date of the maximum interval.""" + filters: List[MaximumIntervalFilter] + """The filters that determine which prices this maximum interval applies to.""" + maximum_amount: str """ The maximum amount to charge in a given billing period for the price intervals @@ -330,16 +454,27 @@ class MaximumInterval(BaseModel): """The start date of the maximum interval.""" -class MinimumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this minimum interval applies to.""" +class MinimumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class MinimumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this minimum interval applies to.""" end_date: Optional[datetime] = None """The end date of the minimum interval.""" + filters: List[MinimumIntervalFilter] + """The filters that determine which prices this minimum interval applies to.""" + minimum_amount: str """ The minimum amount to charge in a given billing period for the price intervals @@ -551,6 +686,9 @@ class SubscriptionUnschedulePendingPlanChangesResponse(BaseModel): minimum_intervals: List[MinimumInterval] """The minimum intervals for this subscription sorted by the start_date.""" + name: str + """The name of the subscription.""" + net_terms: int """ Determines the difference between the invoice issue date for subscription @@ -562,7 +700,7 @@ class SubscriptionUnschedulePendingPlanChangesResponse(BaseModel): pending_subscription_change: Optional[PendingSubscriptionChange] = None """A pending subscription change if one exists on this subscription.""" - plan: Plan + plan: Optional[Plan] = None """ 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 diff --git a/src/orb/types/subscription_update_fixed_fee_quantity_params.py b/src/orb/types/subscription_update_fixed_fee_quantity_params.py index e64eb9f4..f3b3570f 100644 --- a/src/orb/types/subscription_update_fixed_fee_quantity_params.py +++ b/src/orb/types/subscription_update_fixed_fee_quantity_params.py @@ -35,6 +35,6 @@ class SubscriptionUpdateFixedFeeQuantityParams(TypedDict, total=False): effective_date: Annotated[Union[str, date, None], PropertyInfo(format="iso8601")] """ The date that the quantity change should take effect, localized to the - customer's timezone. Ifthis parameter is not passed in, the quantity change is + customer's timezone. If this parameter is not passed in, the quantity change is effective according to `change_option`. """ diff --git a/src/orb/types/subscription_update_fixed_fee_quantity_response.py b/src/orb/types/subscription_update_fixed_fee_quantity_response.py index 2b86b5c4..73e50df2 100644 --- a/src/orb/types/subscription_update_fixed_fee_quantity_response.py +++ b/src/orb/types/subscription_update_fixed_fee_quantity_response.py @@ -17,18 +17,28 @@ "AdjustmentInterval", "AdjustmentIntervalAdjustment", "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter", "BillingCycleAnchorConfiguration", "DiscountInterval", "DiscountIntervalAmountDiscountInterval", + "DiscountIntervalAmountDiscountIntervalFilter", "DiscountIntervalPercentageDiscountInterval", + "DiscountIntervalPercentageDiscountIntervalFilter", "DiscountIntervalUsageDiscountInterval", + "DiscountIntervalUsageDiscountIntervalFilter", "FixedFeeQuantitySchedule", "MaximumInterval", + "MaximumIntervalFilter", "MinimumInterval", + "MinimumIntervalFilter", "PendingSubscriptionChange", "PriceInterval", "PriceIntervalFixedFeeQuantityTransition", @@ -38,6 +48,17 @@ ] +class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): id: str @@ -46,6 +67,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -65,6 +89,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): """ +class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): id: str @@ -79,6 +114,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -92,6 +130,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel): id: str @@ -100,6 +149,9 @@ class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseMode applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -119,6 +171,17 @@ class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseMode """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): id: str @@ -127,6 +190,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -149,6 +215,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel): id: str @@ -157,6 +234,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -227,13 +307,21 @@ class BillingCycleAnchorConfiguration(BaseModel): """ +class DiscountIntervalAmountDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class DiscountIntervalAmountDiscountInterval(BaseModel): amount_discount: str """Only available if discount_type is `amount`.""" - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" - applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -242,14 +330,25 @@ class DiscountIntervalAmountDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalAmountDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" -class DiscountIntervalPercentageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class DiscountIntervalPercentageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + values: List[str] + """The IDs or values that match this filter.""" + + +class DiscountIntervalPercentageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -258,6 +357,9 @@ class DiscountIntervalPercentageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalPercentageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + percentage_discount: float """ Only available if discount_type is `percentage`.This is a number between 0 @@ -268,10 +370,18 @@ class DiscountIntervalPercentageDiscountInterval(BaseModel): """The start date of the discount interval.""" -class DiscountIntervalUsageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class DiscountIntervalUsageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class DiscountIntervalUsageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -280,6 +390,9 @@ class DiscountIntervalUsageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalUsageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" @@ -310,16 +423,27 @@ class FixedFeeQuantitySchedule(BaseModel): start_date: datetime -class MaximumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this maximum interval applies to.""" +class MaximumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class MaximumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this maximum interval applies to.""" end_date: Optional[datetime] = None """The end date of the maximum interval.""" + filters: List[MaximumIntervalFilter] + """The filters that determine which prices this maximum interval applies to.""" + maximum_amount: str """ The maximum amount to charge in a given billing period for the price intervals @@ -330,16 +454,27 @@ class MaximumInterval(BaseModel): """The start date of the maximum interval.""" -class MinimumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this minimum interval applies to.""" +class MinimumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class MinimumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this minimum interval applies to.""" end_date: Optional[datetime] = None """The end date of the minimum interval.""" + filters: List[MinimumIntervalFilter] + """The filters that determine which prices this minimum interval applies to.""" + minimum_amount: str """ The minimum amount to charge in a given billing period for the price intervals @@ -551,6 +686,9 @@ class SubscriptionUpdateFixedFeeQuantityResponse(BaseModel): minimum_intervals: List[MinimumInterval] """The minimum intervals for this subscription sorted by the start_date.""" + name: str + """The name of the subscription.""" + net_terms: int """ Determines the difference between the invoice issue date for subscription @@ -562,7 +700,7 @@ class SubscriptionUpdateFixedFeeQuantityResponse(BaseModel): pending_subscription_change: Optional[PendingSubscriptionChange] = None """A pending subscription change if one exists on this subscription.""" - plan: Plan + plan: Optional[Plan] = None """ 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 diff --git a/src/orb/types/subscription_update_trial_response.py b/src/orb/types/subscription_update_trial_response.py index 53e38304..f06a5192 100644 --- a/src/orb/types/subscription_update_trial_response.py +++ b/src/orb/types/subscription_update_trial_response.py @@ -17,18 +17,28 @@ "AdjustmentInterval", "AdjustmentIntervalAdjustment", "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment", + "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter", "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment", + "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter", "BillingCycleAnchorConfiguration", "DiscountInterval", "DiscountIntervalAmountDiscountInterval", + "DiscountIntervalAmountDiscountIntervalFilter", "DiscountIntervalPercentageDiscountInterval", + "DiscountIntervalPercentageDiscountIntervalFilter", "DiscountIntervalUsageDiscountInterval", + "DiscountIntervalUsageDiscountIntervalFilter", "FixedFeeQuantitySchedule", "MaximumInterval", + "MaximumIntervalFilter", "MinimumInterval", + "MinimumIntervalFilter", "PendingSubscriptionChange", "PriceInterval", "PriceIntervalFixedFeeQuantityTransition", @@ -38,6 +48,17 @@ ] +class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): id: str @@ -46,6 +67,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -65,6 +89,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel): """ +class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): id: str @@ -79,6 +114,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -92,6 +130,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel): id: str @@ -100,6 +149,9 @@ class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseMode applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -119,6 +171,17 @@ class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseMode """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): id: str @@ -127,6 +190,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -149,6 +215,17 @@ class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel): """The reason for the adjustment.""" +class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel): id: str @@ -157,6 +234,9 @@ class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel): applies_to_price_ids: List[str] """The price IDs that this adjustment applies to.""" + filters: List[AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter] + """The filters that determine which prices to apply this adjustment to.""" + is_invoice_level: bool """ True for adjustments that apply to an entire invocice, false for adjustments @@ -227,13 +307,21 @@ class BillingCycleAnchorConfiguration(BaseModel): """ +class DiscountIntervalAmountDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + + class DiscountIntervalAmountDiscountInterval(BaseModel): amount_discount: str """Only available if discount_type is `amount`.""" - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" - applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -242,14 +330,25 @@ class DiscountIntervalAmountDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalAmountDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" -class DiscountIntervalPercentageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class DiscountIntervalPercentageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + values: List[str] + """The IDs or values that match this filter.""" + + +class DiscountIntervalPercentageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -258,6 +357,9 @@ class DiscountIntervalPercentageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalPercentageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + percentage_discount: float """ Only available if discount_type is `percentage`.This is a number between 0 @@ -268,10 +370,18 @@ class DiscountIntervalPercentageDiscountInterval(BaseModel): """The start date of the discount interval.""" -class DiscountIntervalUsageDiscountInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this discount interval applies to.""" +class DiscountIntervalUsageDiscountIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class DiscountIntervalUsageDiscountInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this discount interval applies to.""" @@ -280,6 +390,9 @@ class DiscountIntervalUsageDiscountInterval(BaseModel): end_date: Optional[datetime] = None """The end date of the discount interval.""" + filters: List[DiscountIntervalUsageDiscountIntervalFilter] + """The filters that determine which prices this discount interval applies to.""" + start_date: datetime """The start date of the discount interval.""" @@ -310,16 +423,27 @@ class FixedFeeQuantitySchedule(BaseModel): start_date: datetime -class MaximumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this maximum interval applies to.""" +class MaximumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class MaximumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this maximum interval applies to.""" end_date: Optional[datetime] = None """The end date of the maximum interval.""" + filters: List[MaximumIntervalFilter] + """The filters that determine which prices this maximum interval applies to.""" + maximum_amount: str """ The maximum amount to charge in a given billing period for the price intervals @@ -330,16 +454,27 @@ class MaximumInterval(BaseModel): """The start date of the maximum interval.""" -class MinimumInterval(BaseModel): - applies_to_price_ids: List[str] - """The price ids that this minimum interval applies to.""" +class MinimumIntervalFilter(BaseModel): + field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] + """The property of the price to filter on.""" + + operator: Literal["includes", "excludes"] + """Should prices that match the filter be included or excluded.""" + + values: List[str] + """The IDs or values that match this filter.""" + +class MinimumInterval(BaseModel): applies_to_price_interval_ids: List[str] """The price interval ids that this minimum interval applies to.""" end_date: Optional[datetime] = None """The end date of the minimum interval.""" + filters: List[MinimumIntervalFilter] + """The filters that determine which prices this minimum interval applies to.""" + minimum_amount: str """ The minimum amount to charge in a given billing period for the price intervals @@ -551,6 +686,9 @@ class SubscriptionUpdateTrialResponse(BaseModel): minimum_intervals: List[MinimumInterval] """The minimum intervals for this subscription sorted by the start_date.""" + name: str + """The name of the subscription.""" + net_terms: int """ Determines the difference between the invoice issue date for subscription @@ -562,7 +700,7 @@ class SubscriptionUpdateTrialResponse(BaseModel): pending_subscription_change: Optional[PendingSubscriptionChange] = None """A pending subscription change if one exists on this subscription.""" - plan: Plan + plan: Optional[Plan] = None """ 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 diff --git a/tests/api_resources/beta/__init__.py b/tests/api_resources/beta/__init__.py new file mode 100644 index 00000000..fd8019a9 --- /dev/null +++ b/tests/api_resources/beta/__init__.py @@ -0,0 +1 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. diff --git a/tests/api_resources/beta/test_external_plan_id.py b/tests/api_resources/beta/test_external_plan_id.py new file mode 100644 index 00000000..ec1fcb07 --- /dev/null +++ b/tests/api_resources/beta/test_external_plan_id.py @@ -0,0 +1,548 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from orb import Orb, AsyncOrb +from orb.types import Plan, PlanVersion +from tests.utils import assert_matches_type + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestExternalPlanID: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create_plan_version(self, client: Orb) -> None: + external_plan_id = client.beta.external_plan_id.create_plan_version( + external_plan_id="external_plan_id", + version=0, + ) + assert_matches_type(PlanVersion, external_plan_id, path=["response"]) + + @parametrize + def test_method_create_plan_version_with_all_params(self, client: Orb) -> None: + external_plan_id = client.beta.external_plan_id.create_plan_version( + external_plan_id="external_plan_id", + version=0, + add_adjustments=[ + { + "adjustment": { + "adjustment_type": "percentage_discount", + "percentage_discount": 0, + "applies_to_price_ids": ["price_1", "price_2"], + "is_invoice_level": True, + }, + "plan_phase_order": 0, + } + ], + add_prices=[ + { + "allocation_price": { + "amount": "10.00", + "cadence": "monthly", + "currency": "USD", + "custom_expiration": { + "duration": 0, + "duration_unit": "day", + }, + "expires_at_end_of_cadence": True, + }, + "plan_phase_order": 0, + "price": { + "cadence": "annual", + "item_id": "item_id", + "model_type": "unit", + "name": "Annual fee", + "unit_config": {"unit_amount": "unit_amount"}, + "billable_metric_id": "billable_metric_id", + "billed_in_advance": True, + "billing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "conversion_rate": 0, + "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", + }, + "metadata": {"foo": "string"}, + }, + } + ], + remove_adjustments=[ + { + "adjustment_id": "adjustment_id", + "plan_phase_order": 0, + } + ], + remove_prices=[ + { + "price_id": "price_id", + "plan_phase_order": 0, + } + ], + replace_adjustments=[ + { + "adjustment": { + "adjustment_type": "percentage_discount", + "percentage_discount": 0, + "applies_to_price_ids": ["price_1", "price_2"], + "is_invoice_level": True, + }, + "replaces_adjustment_id": "replaces_adjustment_id", + "plan_phase_order": 0, + } + ], + replace_prices=[ + { + "replaces_price_id": "replaces_price_id", + "allocation_price": { + "amount": "10.00", + "cadence": "monthly", + "currency": "USD", + "custom_expiration": { + "duration": 0, + "duration_unit": "day", + }, + "expires_at_end_of_cadence": True, + }, + "plan_phase_order": 0, + "price": { + "cadence": "annual", + "item_id": "item_id", + "model_type": "unit", + "name": "Annual fee", + "unit_config": {"unit_amount": "unit_amount"}, + "billable_metric_id": "billable_metric_id", + "billed_in_advance": True, + "billing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "conversion_rate": 0, + "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", + }, + "metadata": {"foo": "string"}, + }, + } + ], + set_as_default=True, + ) + assert_matches_type(PlanVersion, external_plan_id, path=["response"]) + + @parametrize + def test_raw_response_create_plan_version(self, client: Orb) -> None: + response = client.beta.external_plan_id.with_raw_response.create_plan_version( + external_plan_id="external_plan_id", + version=0, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + external_plan_id = response.parse() + assert_matches_type(PlanVersion, external_plan_id, path=["response"]) + + @parametrize + def test_streaming_response_create_plan_version(self, client: Orb) -> None: + with client.beta.external_plan_id.with_streaming_response.create_plan_version( + external_plan_id="external_plan_id", + version=0, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + external_plan_id = response.parse() + assert_matches_type(PlanVersion, external_plan_id, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_create_plan_version(self, client: Orb) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_plan_id` but received ''"): + client.beta.external_plan_id.with_raw_response.create_plan_version( + external_plan_id="", + version=0, + ) + + @parametrize + def test_method_fetch_plan_version(self, client: Orb) -> None: + external_plan_id = client.beta.external_plan_id.fetch_plan_version( + version="version", + external_plan_id="external_plan_id", + ) + assert_matches_type(PlanVersion, external_plan_id, path=["response"]) + + @parametrize + def test_raw_response_fetch_plan_version(self, client: Orb) -> None: + response = client.beta.external_plan_id.with_raw_response.fetch_plan_version( + version="version", + external_plan_id="external_plan_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + external_plan_id = response.parse() + assert_matches_type(PlanVersion, external_plan_id, path=["response"]) + + @parametrize + def test_streaming_response_fetch_plan_version(self, client: Orb) -> None: + with client.beta.external_plan_id.with_streaming_response.fetch_plan_version( + version="version", + external_plan_id="external_plan_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + external_plan_id = response.parse() + assert_matches_type(PlanVersion, external_plan_id, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_fetch_plan_version(self, client: Orb) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_plan_id` but received ''"): + client.beta.external_plan_id.with_raw_response.fetch_plan_version( + version="version", + external_plan_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `version` but received ''"): + client.beta.external_plan_id.with_raw_response.fetch_plan_version( + version="", + external_plan_id="external_plan_id", + ) + + @parametrize + def test_method_set_default_plan_version(self, client: Orb) -> None: + external_plan_id = client.beta.external_plan_id.set_default_plan_version( + external_plan_id="external_plan_id", + version=0, + ) + assert_matches_type(Plan, external_plan_id, path=["response"]) + + @parametrize + def test_raw_response_set_default_plan_version(self, client: Orb) -> None: + response = client.beta.external_plan_id.with_raw_response.set_default_plan_version( + external_plan_id="external_plan_id", + version=0, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + external_plan_id = response.parse() + assert_matches_type(Plan, external_plan_id, path=["response"]) + + @parametrize + def test_streaming_response_set_default_plan_version(self, client: Orb) -> None: + with client.beta.external_plan_id.with_streaming_response.set_default_plan_version( + external_plan_id="external_plan_id", + version=0, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + external_plan_id = response.parse() + assert_matches_type(Plan, external_plan_id, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_set_default_plan_version(self, client: Orb) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_plan_id` but received ''"): + client.beta.external_plan_id.with_raw_response.set_default_plan_version( + external_plan_id="", + version=0, + ) + + +class TestAsyncExternalPlanID: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create_plan_version(self, async_client: AsyncOrb) -> None: + external_plan_id = await async_client.beta.external_plan_id.create_plan_version( + external_plan_id="external_plan_id", + version=0, + ) + assert_matches_type(PlanVersion, external_plan_id, path=["response"]) + + @parametrize + async def test_method_create_plan_version_with_all_params(self, async_client: AsyncOrb) -> None: + external_plan_id = await async_client.beta.external_plan_id.create_plan_version( + external_plan_id="external_plan_id", + version=0, + add_adjustments=[ + { + "adjustment": { + "adjustment_type": "percentage_discount", + "percentage_discount": 0, + "applies_to_price_ids": ["price_1", "price_2"], + "is_invoice_level": True, + }, + "plan_phase_order": 0, + } + ], + add_prices=[ + { + "allocation_price": { + "amount": "10.00", + "cadence": "monthly", + "currency": "USD", + "custom_expiration": { + "duration": 0, + "duration_unit": "day", + }, + "expires_at_end_of_cadence": True, + }, + "plan_phase_order": 0, + "price": { + "cadence": "annual", + "item_id": "item_id", + "model_type": "unit", + "name": "Annual fee", + "unit_config": {"unit_amount": "unit_amount"}, + "billable_metric_id": "billable_metric_id", + "billed_in_advance": True, + "billing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "conversion_rate": 0, + "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", + }, + "metadata": {"foo": "string"}, + }, + } + ], + remove_adjustments=[ + { + "adjustment_id": "adjustment_id", + "plan_phase_order": 0, + } + ], + remove_prices=[ + { + "price_id": "price_id", + "plan_phase_order": 0, + } + ], + replace_adjustments=[ + { + "adjustment": { + "adjustment_type": "percentage_discount", + "percentage_discount": 0, + "applies_to_price_ids": ["price_1", "price_2"], + "is_invoice_level": True, + }, + "replaces_adjustment_id": "replaces_adjustment_id", + "plan_phase_order": 0, + } + ], + replace_prices=[ + { + "replaces_price_id": "replaces_price_id", + "allocation_price": { + "amount": "10.00", + "cadence": "monthly", + "currency": "USD", + "custom_expiration": { + "duration": 0, + "duration_unit": "day", + }, + "expires_at_end_of_cadence": True, + }, + "plan_phase_order": 0, + "price": { + "cadence": "annual", + "item_id": "item_id", + "model_type": "unit", + "name": "Annual fee", + "unit_config": {"unit_amount": "unit_amount"}, + "billable_metric_id": "billable_metric_id", + "billed_in_advance": True, + "billing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "conversion_rate": 0, + "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", + }, + "metadata": {"foo": "string"}, + }, + } + ], + set_as_default=True, + ) + assert_matches_type(PlanVersion, external_plan_id, path=["response"]) + + @parametrize + async def test_raw_response_create_plan_version(self, async_client: AsyncOrb) -> None: + response = await async_client.beta.external_plan_id.with_raw_response.create_plan_version( + external_plan_id="external_plan_id", + version=0, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + external_plan_id = response.parse() + assert_matches_type(PlanVersion, external_plan_id, path=["response"]) + + @parametrize + async def test_streaming_response_create_plan_version(self, async_client: AsyncOrb) -> None: + async with async_client.beta.external_plan_id.with_streaming_response.create_plan_version( + external_plan_id="external_plan_id", + version=0, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + external_plan_id = await response.parse() + assert_matches_type(PlanVersion, external_plan_id, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_create_plan_version(self, async_client: AsyncOrb) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_plan_id` but received ''"): + await async_client.beta.external_plan_id.with_raw_response.create_plan_version( + external_plan_id="", + version=0, + ) + + @parametrize + async def test_method_fetch_plan_version(self, async_client: AsyncOrb) -> None: + external_plan_id = await async_client.beta.external_plan_id.fetch_plan_version( + version="version", + external_plan_id="external_plan_id", + ) + assert_matches_type(PlanVersion, external_plan_id, path=["response"]) + + @parametrize + async def test_raw_response_fetch_plan_version(self, async_client: AsyncOrb) -> None: + response = await async_client.beta.external_plan_id.with_raw_response.fetch_plan_version( + version="version", + external_plan_id="external_plan_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + external_plan_id = response.parse() + assert_matches_type(PlanVersion, external_plan_id, path=["response"]) + + @parametrize + async def test_streaming_response_fetch_plan_version(self, async_client: AsyncOrb) -> None: + async with async_client.beta.external_plan_id.with_streaming_response.fetch_plan_version( + version="version", + external_plan_id="external_plan_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + external_plan_id = await response.parse() + assert_matches_type(PlanVersion, external_plan_id, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_fetch_plan_version(self, async_client: AsyncOrb) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_plan_id` but received ''"): + await async_client.beta.external_plan_id.with_raw_response.fetch_plan_version( + version="version", + external_plan_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `version` but received ''"): + await async_client.beta.external_plan_id.with_raw_response.fetch_plan_version( + version="", + external_plan_id="external_plan_id", + ) + + @parametrize + async def test_method_set_default_plan_version(self, async_client: AsyncOrb) -> None: + external_plan_id = await async_client.beta.external_plan_id.set_default_plan_version( + external_plan_id="external_plan_id", + version=0, + ) + assert_matches_type(Plan, external_plan_id, path=["response"]) + + @parametrize + async def test_raw_response_set_default_plan_version(self, async_client: AsyncOrb) -> None: + response = await async_client.beta.external_plan_id.with_raw_response.set_default_plan_version( + external_plan_id="external_plan_id", + version=0, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + external_plan_id = response.parse() + assert_matches_type(Plan, external_plan_id, path=["response"]) + + @parametrize + async def test_streaming_response_set_default_plan_version(self, async_client: AsyncOrb) -> None: + async with async_client.beta.external_plan_id.with_streaming_response.set_default_plan_version( + external_plan_id="external_plan_id", + version=0, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + external_plan_id = await response.parse() + assert_matches_type(Plan, external_plan_id, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_set_default_plan_version(self, async_client: AsyncOrb) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_plan_id` but received ''"): + await async_client.beta.external_plan_id.with_raw_response.set_default_plan_version( + external_plan_id="", + version=0, + ) diff --git a/tests/api_resources/test_beta.py b/tests/api_resources/test_beta.py new file mode 100644 index 00000000..8461a6e0 --- /dev/null +++ b/tests/api_resources/test_beta.py @@ -0,0 +1,548 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from orb import Orb, AsyncOrb +from orb.types import Plan, PlanVersion +from tests.utils import assert_matches_type + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestBeta: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create_plan_version(self, client: Orb) -> None: + beta = client.beta.create_plan_version( + plan_id="plan_id", + version=0, + ) + assert_matches_type(PlanVersion, beta, path=["response"]) + + @parametrize + def test_method_create_plan_version_with_all_params(self, client: Orb) -> None: + beta = client.beta.create_plan_version( + plan_id="plan_id", + version=0, + add_adjustments=[ + { + "adjustment": { + "adjustment_type": "percentage_discount", + "percentage_discount": 0, + "applies_to_price_ids": ["price_1", "price_2"], + "is_invoice_level": True, + }, + "plan_phase_order": 0, + } + ], + add_prices=[ + { + "allocation_price": { + "amount": "10.00", + "cadence": "monthly", + "currency": "USD", + "custom_expiration": { + "duration": 0, + "duration_unit": "day", + }, + "expires_at_end_of_cadence": True, + }, + "plan_phase_order": 0, + "price": { + "cadence": "annual", + "item_id": "item_id", + "model_type": "unit", + "name": "Annual fee", + "unit_config": {"unit_amount": "unit_amount"}, + "billable_metric_id": "billable_metric_id", + "billed_in_advance": True, + "billing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "conversion_rate": 0, + "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", + }, + "metadata": {"foo": "string"}, + }, + } + ], + remove_adjustments=[ + { + "adjustment_id": "adjustment_id", + "plan_phase_order": 0, + } + ], + remove_prices=[ + { + "price_id": "price_id", + "plan_phase_order": 0, + } + ], + replace_adjustments=[ + { + "adjustment": { + "adjustment_type": "percentage_discount", + "percentage_discount": 0, + "applies_to_price_ids": ["price_1", "price_2"], + "is_invoice_level": True, + }, + "replaces_adjustment_id": "replaces_adjustment_id", + "plan_phase_order": 0, + } + ], + replace_prices=[ + { + "replaces_price_id": "replaces_price_id", + "allocation_price": { + "amount": "10.00", + "cadence": "monthly", + "currency": "USD", + "custom_expiration": { + "duration": 0, + "duration_unit": "day", + }, + "expires_at_end_of_cadence": True, + }, + "plan_phase_order": 0, + "price": { + "cadence": "annual", + "item_id": "item_id", + "model_type": "unit", + "name": "Annual fee", + "unit_config": {"unit_amount": "unit_amount"}, + "billable_metric_id": "billable_metric_id", + "billed_in_advance": True, + "billing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "conversion_rate": 0, + "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", + }, + "metadata": {"foo": "string"}, + }, + } + ], + set_as_default=True, + ) + assert_matches_type(PlanVersion, beta, path=["response"]) + + @parametrize + def test_raw_response_create_plan_version(self, client: Orb) -> None: + response = client.beta.with_raw_response.create_plan_version( + plan_id="plan_id", + version=0, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + beta = response.parse() + assert_matches_type(PlanVersion, beta, path=["response"]) + + @parametrize + def test_streaming_response_create_plan_version(self, client: Orb) -> None: + with client.beta.with_streaming_response.create_plan_version( + plan_id="plan_id", + version=0, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + beta = response.parse() + assert_matches_type(PlanVersion, beta, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_create_plan_version(self, client: Orb) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `plan_id` but received ''"): + client.beta.with_raw_response.create_plan_version( + plan_id="", + version=0, + ) + + @parametrize + def test_method_fetch_plan_version(self, client: Orb) -> None: + beta = client.beta.fetch_plan_version( + version="version", + plan_id="plan_id", + ) + assert_matches_type(PlanVersion, beta, path=["response"]) + + @parametrize + def test_raw_response_fetch_plan_version(self, client: Orb) -> None: + response = client.beta.with_raw_response.fetch_plan_version( + version="version", + plan_id="plan_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + beta = response.parse() + assert_matches_type(PlanVersion, beta, path=["response"]) + + @parametrize + def test_streaming_response_fetch_plan_version(self, client: Orb) -> None: + with client.beta.with_streaming_response.fetch_plan_version( + version="version", + plan_id="plan_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + beta = response.parse() + assert_matches_type(PlanVersion, beta, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_fetch_plan_version(self, client: Orb) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `plan_id` but received ''"): + client.beta.with_raw_response.fetch_plan_version( + version="version", + plan_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `version` but received ''"): + client.beta.with_raw_response.fetch_plan_version( + version="", + plan_id="plan_id", + ) + + @parametrize + def test_method_set_default_plan_version(self, client: Orb) -> None: + beta = client.beta.set_default_plan_version( + plan_id="plan_id", + version=0, + ) + assert_matches_type(Plan, beta, path=["response"]) + + @parametrize + def test_raw_response_set_default_plan_version(self, client: Orb) -> None: + response = client.beta.with_raw_response.set_default_plan_version( + plan_id="plan_id", + version=0, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + beta = response.parse() + assert_matches_type(Plan, beta, path=["response"]) + + @parametrize + def test_streaming_response_set_default_plan_version(self, client: Orb) -> None: + with client.beta.with_streaming_response.set_default_plan_version( + plan_id="plan_id", + version=0, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + beta = response.parse() + assert_matches_type(Plan, beta, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_set_default_plan_version(self, client: Orb) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `plan_id` but received ''"): + client.beta.with_raw_response.set_default_plan_version( + plan_id="", + version=0, + ) + + +class TestAsyncBeta: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create_plan_version(self, async_client: AsyncOrb) -> None: + beta = await async_client.beta.create_plan_version( + plan_id="plan_id", + version=0, + ) + assert_matches_type(PlanVersion, beta, path=["response"]) + + @parametrize + async def test_method_create_plan_version_with_all_params(self, async_client: AsyncOrb) -> None: + beta = await async_client.beta.create_plan_version( + plan_id="plan_id", + version=0, + add_adjustments=[ + { + "adjustment": { + "adjustment_type": "percentage_discount", + "percentage_discount": 0, + "applies_to_price_ids": ["price_1", "price_2"], + "is_invoice_level": True, + }, + "plan_phase_order": 0, + } + ], + add_prices=[ + { + "allocation_price": { + "amount": "10.00", + "cadence": "monthly", + "currency": "USD", + "custom_expiration": { + "duration": 0, + "duration_unit": "day", + }, + "expires_at_end_of_cadence": True, + }, + "plan_phase_order": 0, + "price": { + "cadence": "annual", + "item_id": "item_id", + "model_type": "unit", + "name": "Annual fee", + "unit_config": {"unit_amount": "unit_amount"}, + "billable_metric_id": "billable_metric_id", + "billed_in_advance": True, + "billing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "conversion_rate": 0, + "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", + }, + "metadata": {"foo": "string"}, + }, + } + ], + remove_adjustments=[ + { + "adjustment_id": "adjustment_id", + "plan_phase_order": 0, + } + ], + remove_prices=[ + { + "price_id": "price_id", + "plan_phase_order": 0, + } + ], + replace_adjustments=[ + { + "adjustment": { + "adjustment_type": "percentage_discount", + "percentage_discount": 0, + "applies_to_price_ids": ["price_1", "price_2"], + "is_invoice_level": True, + }, + "replaces_adjustment_id": "replaces_adjustment_id", + "plan_phase_order": 0, + } + ], + replace_prices=[ + { + "replaces_price_id": "replaces_price_id", + "allocation_price": { + "amount": "10.00", + "cadence": "monthly", + "currency": "USD", + "custom_expiration": { + "duration": 0, + "duration_unit": "day", + }, + "expires_at_end_of_cadence": True, + }, + "plan_phase_order": 0, + "price": { + "cadence": "annual", + "item_id": "item_id", + "model_type": "unit", + "name": "Annual fee", + "unit_config": {"unit_amount": "unit_amount"}, + "billable_metric_id": "billable_metric_id", + "billed_in_advance": True, + "billing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "conversion_rate": 0, + "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", + }, + "metadata": {"foo": "string"}, + }, + } + ], + set_as_default=True, + ) + assert_matches_type(PlanVersion, beta, path=["response"]) + + @parametrize + async def test_raw_response_create_plan_version(self, async_client: AsyncOrb) -> None: + response = await async_client.beta.with_raw_response.create_plan_version( + plan_id="plan_id", + version=0, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + beta = response.parse() + assert_matches_type(PlanVersion, beta, path=["response"]) + + @parametrize + async def test_streaming_response_create_plan_version(self, async_client: AsyncOrb) -> None: + async with async_client.beta.with_streaming_response.create_plan_version( + plan_id="plan_id", + version=0, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + beta = await response.parse() + assert_matches_type(PlanVersion, beta, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_create_plan_version(self, async_client: AsyncOrb) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `plan_id` but received ''"): + await async_client.beta.with_raw_response.create_plan_version( + plan_id="", + version=0, + ) + + @parametrize + async def test_method_fetch_plan_version(self, async_client: AsyncOrb) -> None: + beta = await async_client.beta.fetch_plan_version( + version="version", + plan_id="plan_id", + ) + assert_matches_type(PlanVersion, beta, path=["response"]) + + @parametrize + async def test_raw_response_fetch_plan_version(self, async_client: AsyncOrb) -> None: + response = await async_client.beta.with_raw_response.fetch_plan_version( + version="version", + plan_id="plan_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + beta = response.parse() + assert_matches_type(PlanVersion, beta, path=["response"]) + + @parametrize + async def test_streaming_response_fetch_plan_version(self, async_client: AsyncOrb) -> None: + async with async_client.beta.with_streaming_response.fetch_plan_version( + version="version", + plan_id="plan_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + beta = await response.parse() + assert_matches_type(PlanVersion, beta, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_fetch_plan_version(self, async_client: AsyncOrb) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `plan_id` but received ''"): + await async_client.beta.with_raw_response.fetch_plan_version( + version="version", + plan_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `version` but received ''"): + await async_client.beta.with_raw_response.fetch_plan_version( + version="", + plan_id="plan_id", + ) + + @parametrize + async def test_method_set_default_plan_version(self, async_client: AsyncOrb) -> None: + beta = await async_client.beta.set_default_plan_version( + plan_id="plan_id", + version=0, + ) + assert_matches_type(Plan, beta, path=["response"]) + + @parametrize + async def test_raw_response_set_default_plan_version(self, async_client: AsyncOrb) -> None: + response = await async_client.beta.with_raw_response.set_default_plan_version( + plan_id="plan_id", + version=0, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + beta = response.parse() + assert_matches_type(Plan, beta, path=["response"]) + + @parametrize + async def test_streaming_response_set_default_plan_version(self, async_client: AsyncOrb) -> None: + async with async_client.beta.with_streaming_response.set_default_plan_version( + plan_id="plan_id", + version=0, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + beta = await response.parse() + assert_matches_type(Plan, beta, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_set_default_plan_version(self, async_client: AsyncOrb) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `plan_id` but received ''"): + await async_client.beta.with_raw_response.set_default_plan_version( + plan_id="", + version=0, + ) diff --git a/tests/api_resources/test_credit_notes.py b/tests/api_resources/test_credit_notes.py index 5d423210..ab1030c8 100644 --- a/tests/api_resources/test_credit_notes.py +++ b/tests/api_resources/test_credit_notes.py @@ -28,6 +28,7 @@ def test_method_create(self, client: Orb) -> None: "invoice_line_item_id": "4khy3nwzktxv7", } ], + reason="duplicate", ) assert_matches_type(CreditNote, credit_note, path=["response"]) @@ -40,8 +41,8 @@ def test_method_create_with_all_params(self, client: Orb) -> None: "invoice_line_item_id": "4khy3nwzktxv7", } ], - memo="An optional memo for my credit note.", reason="duplicate", + memo="An optional memo for my credit note.", ) assert_matches_type(CreditNote, credit_note, path=["response"]) @@ -54,6 +55,7 @@ def test_raw_response_create(self, client: Orb) -> None: "invoice_line_item_id": "4khy3nwzktxv7", } ], + reason="duplicate", ) assert response.is_closed is True @@ -70,6 +72,7 @@ def test_streaming_response_create(self, client: Orb) -> None: "invoice_line_item_id": "4khy3nwzktxv7", } ], + reason="duplicate", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -167,6 +170,7 @@ async def test_method_create(self, async_client: AsyncOrb) -> None: "invoice_line_item_id": "4khy3nwzktxv7", } ], + reason="duplicate", ) assert_matches_type(CreditNote, credit_note, path=["response"]) @@ -179,8 +183,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No "invoice_line_item_id": "4khy3nwzktxv7", } ], - memo="An optional memo for my credit note.", reason="duplicate", + memo="An optional memo for my credit note.", ) assert_matches_type(CreditNote, credit_note, path=["response"]) @@ -193,6 +197,7 @@ async def test_raw_response_create(self, async_client: AsyncOrb) -> None: "invoice_line_item_id": "4khy3nwzktxv7", } ], + reason="duplicate", ) assert response.is_closed is True @@ -209,6 +214,7 @@ async def test_streaming_response_create(self, async_client: AsyncOrb) -> None: "invoice_line_item_id": "4khy3nwzktxv7", } ], + reason="duplicate", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_invoices.py b/tests/api_resources/test_invoices.py index 4d379d1f..bc2b7669 100644 --- a/tests/api_resources/test_invoices.py +++ b/tests/api_resources/test_invoices.py @@ -61,9 +61,9 @@ def test_method_create_with_all_params(self, client: Orb) -> None: net_terms=0, customer_id="4khy3nwzktxv7", discount={ - "applies_to_price_ids": ["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"], "discount_type": "percentage", "percentage_discount": 0.15, + "applies_to_price_ids": ["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"], "reason": "reason", }, external_customer_id="external-customer-id", @@ -505,9 +505,9 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No net_terms=0, customer_id="4khy3nwzktxv7", discount={ - "applies_to_price_ids": ["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"], "discount_type": "percentage", "percentage_discount": 0.15, + "applies_to_price_ids": ["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"], "reason": "reason", }, external_customer_id="external-customer-id", diff --git a/tests/api_resources/test_items.py b/tests/api_resources/test_items.py index c65f50ad..43beecc1 100644 --- a/tests/api_resources/test_items.py +++ b/tests/api_resources/test_items.py @@ -25,6 +25,14 @@ def test_method_create(self, client: Orb) -> None: ) assert_matches_type(Item, item, path=["response"]) + @parametrize + def test_method_create_with_all_params(self, client: Orb) -> None: + item = client.items.create( + name="API requests", + metadata={"foo": "string"}, + ) + assert_matches_type(Item, item, path=["response"]) + @parametrize def test_raw_response_create(self, client: Orb) -> None: response = client.items.with_raw_response.create( @@ -66,6 +74,7 @@ def test_method_update_with_all_params(self, client: Orb) -> None: "external_entity_id": "external_entity_id", } ], + metadata={"foo": "string"}, name="name", ) assert_matches_type(Item, item, path=["response"]) @@ -134,6 +143,44 @@ def test_streaming_response_list(self, client: Orb) -> None: assert cast(Any, response.is_closed) is True + @parametrize + def test_method_archive(self, client: Orb) -> None: + item = client.items.archive( + "item_id", + ) + assert_matches_type(Item, item, path=["response"]) + + @parametrize + def test_raw_response_archive(self, client: Orb) -> None: + response = client.items.with_raw_response.archive( + "item_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + item = response.parse() + assert_matches_type(Item, item, path=["response"]) + + @parametrize + def test_streaming_response_archive(self, client: Orb) -> None: + with client.items.with_streaming_response.archive( + "item_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + item = response.parse() + assert_matches_type(Item, item, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_archive(self, client: Orb) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `item_id` but received ''"): + client.items.with_raw_response.archive( + "", + ) + @parametrize def test_method_fetch(self, client: Orb) -> None: item = client.items.fetch( @@ -183,6 +230,14 @@ async def test_method_create(self, async_client: AsyncOrb) -> None: ) assert_matches_type(Item, item, path=["response"]) + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> None: + item = await async_client.items.create( + name="API requests", + metadata={"foo": "string"}, + ) + assert_matches_type(Item, item, path=["response"]) + @parametrize async def test_raw_response_create(self, async_client: AsyncOrb) -> None: response = await async_client.items.with_raw_response.create( @@ -224,6 +279,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncOrb) -> No "external_entity_id": "external_entity_id", } ], + metadata={"foo": "string"}, name="name", ) assert_matches_type(Item, item, path=["response"]) @@ -292,6 +348,44 @@ async def test_streaming_response_list(self, async_client: AsyncOrb) -> None: assert cast(Any, response.is_closed) is True + @parametrize + async def test_method_archive(self, async_client: AsyncOrb) -> None: + item = await async_client.items.archive( + "item_id", + ) + assert_matches_type(Item, item, path=["response"]) + + @parametrize + async def test_raw_response_archive(self, async_client: AsyncOrb) -> None: + response = await async_client.items.with_raw_response.archive( + "item_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + item = response.parse() + assert_matches_type(Item, item, path=["response"]) + + @parametrize + async def test_streaming_response_archive(self, async_client: AsyncOrb) -> None: + async with async_client.items.with_streaming_response.archive( + "item_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + item = await response.parse() + assert_matches_type(Item, item, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_archive(self, async_client: AsyncOrb) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `item_id` but received ''"): + await async_client.items.with_raw_response.archive( + "", + ) + @parametrize async def test_method_fetch(self, async_client: AsyncOrb) -> None: item = await async_client.items.fetch( diff --git a/tests/api_resources/test_plans.py b/tests/api_resources/test_plans.py index 938816b8..f012b029 100644 --- a/tests/api_resources/test_plans.py +++ b/tests/api_resources/test_plans.py @@ -56,9 +56,14 @@ def test_method_create_with_all_params(self, client: Orb) -> None: }, "conversion_rate": 0, "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": "invoice_grouping_key", + "invoice_grouping_key": "x", "invoicing_cycle_configuration": { "duration": 0, "duration_unit": "day", @@ -282,9 +287,14 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No }, "conversion_rate": 0, "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": "invoice_grouping_key", + "invoice_grouping_key": "x", "invoicing_cycle_configuration": { "duration": 0, "duration_unit": "day", diff --git a/tests/api_resources/test_prices.py b/tests/api_resources/test_prices.py index 41b706cf..c2003835 100644 --- a/tests/api_resources/test_prices.py +++ b/tests/api_resources/test_prices.py @@ -11,6 +11,7 @@ from orb.types import ( Price, PriceEvaluateResponse, + PriceEvaluateMultipleResponse, ) from orb._utils import parse_datetime from tests.utils import assert_matches_type @@ -50,9 +51,14 @@ def test_method_create_with_all_params_overload_1(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -129,9 +135,14 @@ def test_method_create_with_all_params_overload_2(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -226,9 +237,14 @@ def test_method_create_with_all_params_overload_3(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -337,9 +353,14 @@ def test_method_create_with_all_params_overload_4(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -445,9 +466,14 @@ def test_method_create_with_all_params_overload_5(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -548,9 +574,14 @@ def test_method_create_with_all_params_overload_6(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -638,9 +669,14 @@ def test_method_create_with_all_params_overload_7(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -719,9 +755,14 @@ def test_method_create_with_all_params_overload_8(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -799,9 +840,14 @@ def test_method_create_with_all_params_overload_9(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -872,9 +918,14 @@ def test_method_create_with_all_params_overload_10(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -945,9 +996,14 @@ def test_method_create_with_all_params_overload_11(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -1018,9 +1074,14 @@ def test_method_create_with_all_params_overload_12(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -1091,9 +1152,14 @@ def test_method_create_with_all_params_overload_13(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -1164,9 +1230,14 @@ def test_method_create_with_all_params_overload_14(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -1237,9 +1308,14 @@ def test_method_create_with_all_params_overload_15(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -1310,9 +1386,14 @@ def test_method_create_with_all_params_overload_16(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -1383,9 +1464,14 @@ def test_method_create_with_all_params_overload_17(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -1456,9 +1542,14 @@ def test_method_create_with_all_params_overload_18(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -1529,9 +1620,14 @@ def test_method_create_with_all_params_overload_19(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -1602,9 +1698,14 @@ def test_method_create_with_all_params_overload_20(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -1675,9 +1776,14 @@ def test_method_create_with_all_params_overload_21(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -1748,9 +1854,14 @@ def test_method_create_with_all_params_overload_22(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -1821,9 +1932,14 @@ def test_method_create_with_all_params_overload_23(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -1894,9 +2010,14 @@ def test_method_create_with_all_params_overload_24(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -1967,9 +2088,14 @@ def test_method_create_with_all_params_overload_25(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -2040,9 +2166,14 @@ def test_method_create_with_all_params_overload_26(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -2113,9 +2244,14 @@ def test_method_create_with_all_params_overload_27(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -2186,9 +2322,14 @@ def test_method_create_with_all_params_overload_28(self, client: Orb) -> None: "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -2369,6 +2510,94 @@ def test_path_params_evaluate(self, client: Orb) -> None: timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"), ) + @parametrize + def test_method_evaluate_multiple(self, client: Orb) -> None: + price = client.prices.evaluate_multiple( + timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"), + timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"), + ) + assert_matches_type(PriceEvaluateMultipleResponse, price, path=["response"]) + + @parametrize + def test_method_evaluate_multiple_with_all_params(self, client: Orb) -> None: + price = client.prices.evaluate_multiple( + timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"), + timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"), + customer_id="customer_id", + events=[ + { + "event_name": "event_name", + "properties": {}, + "timestamp": parse_datetime("2020-12-09T16:09:53Z"), + "customer_id": "customer_id", + "external_customer_id": "external_customer_id", + } + ], + external_customer_id="external_customer_id", + price_evaluations=[ + { + "filter": "my_numeric_property > 100 AND my_other_property = 'bar'", + "grouping_keys": ["case when my_event_type = 'foo' then true else false end"], + "price": { + "cadence": "annual", + "currency": "currency", + "item_id": "item_id", + "model_type": "unit", + "name": "Annual fee", + "unit_config": {"unit_amount": "unit_amount"}, + "billable_metric_id": "billable_metric_id", + "billed_in_advance": True, + "billing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "conversion_rate": 0, + "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", + }, + "metadata": {"foo": "string"}, + }, + "price_id": "price_id", + } + ], + ) + assert_matches_type(PriceEvaluateMultipleResponse, price, path=["response"]) + + @parametrize + def test_raw_response_evaluate_multiple(self, client: Orb) -> None: + response = client.prices.with_raw_response.evaluate_multiple( + timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"), + timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"), + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + price = response.parse() + assert_matches_type(PriceEvaluateMultipleResponse, price, path=["response"]) + + @parametrize + def test_streaming_response_evaluate_multiple(self, client: Orb) -> None: + with client.prices.with_streaming_response.evaluate_multiple( + timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"), + timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"), + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + price = response.parse() + assert_matches_type(PriceEvaluateMultipleResponse, price, path=["response"]) + + assert cast(Any, response.is_closed) is True + @parametrize def test_method_fetch(self, client: Orb) -> None: price = client.prices.fetch( @@ -2439,9 +2668,14 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -2518,9 +2752,14 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -2615,9 +2854,14 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -2726,9 +2970,14 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -2834,9 +3083,14 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -2937,9 +3191,14 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -3027,9 +3286,14 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -3108,9 +3372,14 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -3188,9 +3457,14 @@ async def test_method_create_with_all_params_overload_9(self, async_client: Asyn "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -3261,9 +3535,14 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -3334,9 +3613,14 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -3407,9 +3691,14 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -3480,9 +3769,14 @@ async def test_method_create_with_all_params_overload_13(self, async_client: Asy "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -3553,9 +3847,14 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -3626,9 +3925,14 @@ async def test_method_create_with_all_params_overload_15(self, async_client: Asy "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -3699,9 +4003,14 @@ async def test_method_create_with_all_params_overload_16(self, async_client: Asy "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -3772,9 +4081,14 @@ async def test_method_create_with_all_params_overload_17(self, async_client: Asy "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -3845,9 +4159,14 @@ async def test_method_create_with_all_params_overload_18(self, async_client: Asy "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -3918,9 +4237,14 @@ async def test_method_create_with_all_params_overload_19(self, async_client: Asy "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -3991,9 +4315,14 @@ async def test_method_create_with_all_params_overload_20(self, async_client: Asy "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -4064,9 +4393,14 @@ async def test_method_create_with_all_params_overload_21(self, async_client: Asy "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -4137,9 +4471,14 @@ async def test_method_create_with_all_params_overload_22(self, async_client: Asy "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -4210,9 +4549,14 @@ async def test_method_create_with_all_params_overload_23(self, async_client: Asy "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -4283,9 +4627,14 @@ async def test_method_create_with_all_params_overload_24(self, async_client: Asy "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -4356,9 +4705,14 @@ async def test_method_create_with_all_params_overload_25(self, async_client: Asy "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -4429,9 +4783,14 @@ async def test_method_create_with_all_params_overload_26(self, async_client: Asy "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -4502,9 +4861,14 @@ async def test_method_create_with_all_params_overload_27(self, async_client: Asy "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -4575,9 +4939,14 @@ async def test_method_create_with_all_params_overload_28(self, async_client: Asy "duration_unit": "day", }, conversion_rate=0, + 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="invoice_grouping_key", + invoice_grouping_key="x", invoicing_cycle_configuration={ "duration": 0, "duration_unit": "day", @@ -4758,6 +5127,94 @@ async def test_path_params_evaluate(self, async_client: AsyncOrb) -> None: timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"), ) + @parametrize + async def test_method_evaluate_multiple(self, async_client: AsyncOrb) -> None: + price = await async_client.prices.evaluate_multiple( + timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"), + timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"), + ) + assert_matches_type(PriceEvaluateMultipleResponse, price, path=["response"]) + + @parametrize + async def test_method_evaluate_multiple_with_all_params(self, async_client: AsyncOrb) -> None: + price = await async_client.prices.evaluate_multiple( + timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"), + timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"), + customer_id="customer_id", + events=[ + { + "event_name": "event_name", + "properties": {}, + "timestamp": parse_datetime("2020-12-09T16:09:53Z"), + "customer_id": "customer_id", + "external_customer_id": "external_customer_id", + } + ], + external_customer_id="external_customer_id", + price_evaluations=[ + { + "filter": "my_numeric_property > 100 AND my_other_property = 'bar'", + "grouping_keys": ["case when my_event_type = 'foo' then true else false end"], + "price": { + "cadence": "annual", + "currency": "currency", + "item_id": "item_id", + "model_type": "unit", + "name": "Annual fee", + "unit_config": {"unit_amount": "unit_amount"}, + "billable_metric_id": "billable_metric_id", + "billed_in_advance": True, + "billing_cycle_configuration": { + "duration": 0, + "duration_unit": "day", + }, + "conversion_rate": 0, + "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", + }, + "metadata": {"foo": "string"}, + }, + "price_id": "price_id", + } + ], + ) + assert_matches_type(PriceEvaluateMultipleResponse, price, path=["response"]) + + @parametrize + async def test_raw_response_evaluate_multiple(self, async_client: AsyncOrb) -> None: + response = await async_client.prices.with_raw_response.evaluate_multiple( + timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"), + timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"), + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + price = response.parse() + assert_matches_type(PriceEvaluateMultipleResponse, price, path=["response"]) + + @parametrize + async def test_streaming_response_evaluate_multiple(self, async_client: AsyncOrb) -> None: + async with async_client.prices.with_streaming_response.evaluate_multiple( + timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"), + timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"), + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + price = await response.parse() + assert_matches_type(PriceEvaluateMultipleResponse, price, path=["response"]) + + assert cast(Any, response.is_closed) is True + @parametrize async def test_method_fetch(self, async_client: AsyncOrb) -> None: price = await async_client.prices.fetch( diff --git a/tests/api_resources/test_subscriptions.py b/tests/api_resources/test_subscriptions.py index 1235356b..d6d46997 100644 --- a/tests/api_resources/test_subscriptions.py +++ b/tests/api_resources/test_subscriptions.py @@ -46,8 +46,8 @@ def test_method_create_with_all_params(self, client: Orb) -> None: { "adjustment": { "adjustment_type": "percentage_discount", - "applies_to_price_ids": ["price_1", "price_2"], "percentage_discount": 0, + "applies_to_price_ids": ["price_1", "price_2"], "is_invoice_level": True, }, "end_date": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -61,6 +61,10 @@ def test_method_create_with_all_params(self, client: Orb) -> None: "amount": "10.00", "cadence": "monthly", "currency": "USD", + "custom_expiration": { + "duration": 0, + "duration_unit": "day", + }, "expires_at_end_of_cadence": True, }, "discounts": [ @@ -90,9 +94,14 @@ def test_method_create_with_all_params(self, client: Orb) -> None: }, "conversion_rate": 0, "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": "invoice_grouping_key", + "invoice_grouping_key": "x", "invoicing_cycle_configuration": { "duration": 0, "duration_unit": "day", @@ -114,6 +123,7 @@ def test_method_create_with_all_params(self, client: Orb) -> None: }, coupon_redemption_code="coupon_redemption_code", credits_overage_rate=0, + currency="currency", customer_id="customer_id", default_invoice_memo="default_invoice_memo", end_date=parse_datetime("2019-12-27T18:11:19.117Z"), @@ -125,6 +135,7 @@ def test_method_create_with_all_params(self, client: Orb) -> None: initial_phase_order=2, invoicing_threshold="10.00", metadata={"foo": "string"}, + name="name", net_terms=0, per_credit_overage_amount=0, plan_id="ZMwNQefe7J3ecf7W", @@ -141,8 +152,8 @@ def test_method_create_with_all_params(self, client: Orb) -> None: { "adjustment": { "adjustment_type": "percentage_discount", - "applies_to_price_ids": ["price_1", "price_2"], "percentage_discount": 0, + "applies_to_price_ids": ["price_1", "price_2"], "is_invoice_level": True, }, "replaces_adjustment_id": "replaces_adjustment_id", @@ -155,6 +166,10 @@ def test_method_create_with_all_params(self, client: Orb) -> None: "amount": "10.00", "cadence": "monthly", "currency": "USD", + "custom_expiration": { + "duration": 0, + "duration_unit": "day", + }, "expires_at_end_of_cadence": True, }, "discounts": [ @@ -183,9 +198,14 @@ def test_method_create_with_all_params(self, client: Orb) -> None: }, "conversion_rate": 0, "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": "invoice_grouping_key", + "invoice_grouping_key": "x", "invoicing_cycle_configuration": { "duration": 0, "duration_unit": "day", @@ -582,6 +602,10 @@ def test_method_price_intervals_with_all_params(self, client: Orb) -> None: "amount": "10.00", "cadence": "monthly", "currency": "USD", + "custom_expiration": { + "duration": 0, + "duration_unit": "day", + }, "expires_at_end_of_cadence": True, }, "discounts": [ @@ -615,9 +639,14 @@ def test_method_price_intervals_with_all_params(self, client: Orb) -> None: "duration_unit": "day", }, "conversion_rate": 0, + "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": "invoice_grouping_key", + "invoice_grouping_key": "x", "invoicing_cycle_configuration": { "duration": 0, "duration_unit": "day", @@ -632,8 +661,8 @@ def test_method_price_intervals_with_all_params(self, client: Orb) -> None: { "adjustment": { "adjustment_type": "percentage_discount", - "applies_to_price_ids": ["price_1", "price_2"], "percentage_discount": 0, + "applies_to_price_ids": ["price_1", "price_2"], "is_invoice_level": True, }, "start_date": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -718,8 +747,8 @@ def test_method_schedule_plan_change_with_all_params(self, client: Orb) -> None: { "adjustment": { "adjustment_type": "percentage_discount", - "applies_to_price_ids": ["price_1", "price_2"], "percentage_discount": 0, + "applies_to_price_ids": ["price_1", "price_2"], "is_invoice_level": True, }, "end_date": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -733,6 +762,10 @@ def test_method_schedule_plan_change_with_all_params(self, client: Orb) -> None: "amount": "10.00", "cadence": "monthly", "currency": "USD", + "custom_expiration": { + "duration": 0, + "duration_unit": "day", + }, "expires_at_end_of_cadence": True, }, "discounts": [ @@ -762,9 +795,14 @@ def test_method_schedule_plan_change_with_all_params(self, client: Orb) -> None: }, "conversion_rate": 0, "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": "invoice_grouping_key", + "invoice_grouping_key": "x", "invoicing_cycle_configuration": { "duration": 0, "duration_unit": "day", @@ -808,8 +846,8 @@ def test_method_schedule_plan_change_with_all_params(self, client: Orb) -> None: { "adjustment": { "adjustment_type": "percentage_discount", - "applies_to_price_ids": ["price_1", "price_2"], "percentage_discount": 0, + "applies_to_price_ids": ["price_1", "price_2"], "is_invoice_level": True, }, "replaces_adjustment_id": "replaces_adjustment_id", @@ -822,6 +860,10 @@ def test_method_schedule_plan_change_with_all_params(self, client: Orb) -> None: "amount": "10.00", "cadence": "monthly", "currency": "USD", + "custom_expiration": { + "duration": 0, + "duration_unit": "day", + }, "expires_at_end_of_cadence": True, }, "discounts": [ @@ -850,9 +892,14 @@ def test_method_schedule_plan_change_with_all_params(self, client: Orb) -> None: }, "conversion_rate": 0, "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": "invoice_grouping_key", + "invoice_grouping_key": "x", "invoicing_cycle_configuration": { "duration": 0, "duration_unit": "day", @@ -1192,8 +1239,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No { "adjustment": { "adjustment_type": "percentage_discount", - "applies_to_price_ids": ["price_1", "price_2"], "percentage_discount": 0, + "applies_to_price_ids": ["price_1", "price_2"], "is_invoice_level": True, }, "end_date": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -1207,6 +1254,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No "amount": "10.00", "cadence": "monthly", "currency": "USD", + "custom_expiration": { + "duration": 0, + "duration_unit": "day", + }, "expires_at_end_of_cadence": True, }, "discounts": [ @@ -1236,9 +1287,14 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No }, "conversion_rate": 0, "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": "invoice_grouping_key", + "invoice_grouping_key": "x", "invoicing_cycle_configuration": { "duration": 0, "duration_unit": "day", @@ -1260,6 +1316,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No }, coupon_redemption_code="coupon_redemption_code", credits_overage_rate=0, + currency="currency", customer_id="customer_id", default_invoice_memo="default_invoice_memo", end_date=parse_datetime("2019-12-27T18:11:19.117Z"), @@ -1271,6 +1328,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No initial_phase_order=2, invoicing_threshold="10.00", metadata={"foo": "string"}, + name="name", net_terms=0, per_credit_overage_amount=0, plan_id="ZMwNQefe7J3ecf7W", @@ -1287,8 +1345,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No { "adjustment": { "adjustment_type": "percentage_discount", - "applies_to_price_ids": ["price_1", "price_2"], "percentage_discount": 0, + "applies_to_price_ids": ["price_1", "price_2"], "is_invoice_level": True, }, "replaces_adjustment_id": "replaces_adjustment_id", @@ -1301,6 +1359,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No "amount": "10.00", "cadence": "monthly", "currency": "USD", + "custom_expiration": { + "duration": 0, + "duration_unit": "day", + }, "expires_at_end_of_cadence": True, }, "discounts": [ @@ -1329,9 +1391,14 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No }, "conversion_rate": 0, "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": "invoice_grouping_key", + "invoice_grouping_key": "x", "invoicing_cycle_configuration": { "duration": 0, "duration_unit": "day", @@ -1728,6 +1795,10 @@ async def test_method_price_intervals_with_all_params(self, async_client: AsyncO "amount": "10.00", "cadence": "monthly", "currency": "USD", + "custom_expiration": { + "duration": 0, + "duration_unit": "day", + }, "expires_at_end_of_cadence": True, }, "discounts": [ @@ -1761,9 +1832,14 @@ async def test_method_price_intervals_with_all_params(self, async_client: AsyncO "duration_unit": "day", }, "conversion_rate": 0, + "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": "invoice_grouping_key", + "invoice_grouping_key": "x", "invoicing_cycle_configuration": { "duration": 0, "duration_unit": "day", @@ -1778,8 +1854,8 @@ async def test_method_price_intervals_with_all_params(self, async_client: AsyncO { "adjustment": { "adjustment_type": "percentage_discount", - "applies_to_price_ids": ["price_1", "price_2"], "percentage_discount": 0, + "applies_to_price_ids": ["price_1", "price_2"], "is_invoice_level": True, }, "start_date": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -1864,8 +1940,8 @@ async def test_method_schedule_plan_change_with_all_params(self, async_client: A { "adjustment": { "adjustment_type": "percentage_discount", - "applies_to_price_ids": ["price_1", "price_2"], "percentage_discount": 0, + "applies_to_price_ids": ["price_1", "price_2"], "is_invoice_level": True, }, "end_date": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -1879,6 +1955,10 @@ async def test_method_schedule_plan_change_with_all_params(self, async_client: A "amount": "10.00", "cadence": "monthly", "currency": "USD", + "custom_expiration": { + "duration": 0, + "duration_unit": "day", + }, "expires_at_end_of_cadence": True, }, "discounts": [ @@ -1908,9 +1988,14 @@ async def test_method_schedule_plan_change_with_all_params(self, async_client: A }, "conversion_rate": 0, "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": "invoice_grouping_key", + "invoice_grouping_key": "x", "invoicing_cycle_configuration": { "duration": 0, "duration_unit": "day", @@ -1954,8 +2039,8 @@ async def test_method_schedule_plan_change_with_all_params(self, async_client: A { "adjustment": { "adjustment_type": "percentage_discount", - "applies_to_price_ids": ["price_1", "price_2"], "percentage_discount": 0, + "applies_to_price_ids": ["price_1", "price_2"], "is_invoice_level": True, }, "replaces_adjustment_id": "replaces_adjustment_id", @@ -1968,6 +2053,10 @@ async def test_method_schedule_plan_change_with_all_params(self, async_client: A "amount": "10.00", "cadence": "monthly", "currency": "USD", + "custom_expiration": { + "duration": 0, + "duration_unit": "day", + }, "expires_at_end_of_cadence": True, }, "discounts": [ @@ -1996,9 +2085,14 @@ async def test_method_schedule_plan_change_with_all_params(self, async_client: A }, "conversion_rate": 0, "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": "invoice_grouping_key", + "invoice_grouping_key": "x", "invoicing_cycle_configuration": { "duration": 0, "duration_unit": "day",