diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7bda38c9..a92bd0ca 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.39.0" + ".": "4.40.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 107688d5..30ac7b66 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 118 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-9e751a2aefff382af949380b5979a80cb02743eca1583cf5146325fb400ba87f.yml -openapi_spec_hash: 219a1008f47d3293f64f1baebe2d6eb5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-947253d9be505473c1c2cb0193d2602fa6b017e221f482be3f4f374c6156b350.yml +openapi_spec_hash: 1b40d1a85b4b846a1c14634fbbc65da3 config_hash: e6db17547fe854b1c240407cf4c6dc9e diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b41b8af..e3d52548 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 4.40.0 (2025-11-16) + +Full Changelog: [v4.39.0...v4.40.0](https://github.com/orbcorp/orb-python/compare/v4.39.0...v4.40.0) + +### Features + +* **api:** api update ([df68e3b](https://github.com/orbcorp/orb-python/commit/df68e3b750cde5f59c8af374a4e7b3cd2a4feb26)) + ## 4.39.0 (2025-11-13) Full Changelog: [v4.38.2...v4.39.0](https://github.com/orbcorp/orb-python/compare/v4.38.2...v4.39.0) diff --git a/pyproject.toml b/pyproject.toml index 5cf231bc..397d74ed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "orb-billing" -version = "4.39.0" +version = "4.40.0" description = "The official Python library for the orb API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/orb/_version.py b/src/orb/_version.py index 7618a36f..150f1c04 100644 --- a/src/orb/_version.py +++ b/src/orb/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "orb" -__version__ = "4.39.0" # x-release-please-version +__version__ = "4.40.0" # x-release-please-version diff --git a/src/orb/resources/prices/prices.py b/src/orb/resources/prices/prices.py index 750f1ecf..970d9e16 100644 --- a/src/orb/resources/prices/prices.py +++ b/src/orb/resources/prices/prices.py @@ -2671,6 +2671,104 @@ def create( """ ... + @overload + def create( + self, + *, + cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"], + cumulative_grouped_allocation_config: price_create_params.NewFloatingCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig, + currency: str, + item_id: str, + model_type: Literal["cumulative_grouped_allocation"], + name: str, + billable_metric_id: Optional[str] | Omit = omit, + billed_in_advance: Optional[bool] | Omit = omit, + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | Omit = omit, + conversion_rate: Optional[float] | Omit = omit, + conversion_rate_config: Optional[ + price_create_params.NewFloatingCumulativeGroupedAllocationPriceConversionRateConfig + ] + | Omit = omit, + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | Omit = omit, + external_price_id: Optional[str] | Omit = omit, + fixed_price_quantity: Optional[float] | Omit = omit, + invoice_grouping_key: Optional[str] | Omit = omit, + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | Omit = omit, + metadata: Optional[Dict[str, Optional[str]]] | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> 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 + associated with a specific plan and can instead be individually added to + subscriptions, including subscriptions on different plans. + + An `external_price_id` can be optionally specified as an alias to allow + ergonomic interaction with prices in the Orb API. + + See the [Price resource](/product-catalog/price-configuration) for the + specification of different price model configurations possible in this endpoint. + + Args: + cadence: The cadence to bill for this price on. + + cumulative_grouped_allocation_config: Configuration for cumulative_grouped_allocation pricing + + currency: An ISO 4217 currency string for which this price is billed in. + + item_id: The id of the item the price will be associated with. + + model_type: The pricing model type + + name: The name of the price. + + billable_metric_id: The id of the billable metric for the price. Only needed if the price is + usage-based. + + billed_in_advance: If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + + billing_cycle_configuration: For custom cadence: specifies the duration of the billing period in days or + months. + + conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + + conversion_rate_config: The configuration for the 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 + applied. + + invoice_grouping_key: The property used to group this price on an invoice + + invoicing_cycle_configuration: Within each billing cycle, specifies the cadence at which invoices are produced. + If unspecified, a single invoice is produced per billing cycle. + + metadata: User-specified key/value pairs for the resource. 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 + + 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 + """ + ... + @overload def create( self, @@ -2987,6 +3085,7 @@ def create( ["cadence", "currency", "item_id", "model_type", "name", "scalable_matrix_with_unit_pricing_config"], ["cadence", "currency", "item_id", "model_type", "name", "scalable_matrix_with_tiered_pricing_config"], ["cadence", "cumulative_grouped_bulk_config", "currency", "item_id", "model_type", "name"], + ["cadence", "cumulative_grouped_allocation_config", "currency", "item_id", "model_type", "name"], ["cadence", "currency", "item_id", "minimum_config", "model_type", "name"], ["cadence", "currency", "item_id", "model_type", "name", "percent_config"], ["cadence", "currency", "event_output_config", "item_id", "model_type", "name"], @@ -3024,6 +3123,7 @@ def create( | Literal["scalable_matrix_with_unit_pricing"] | Literal["scalable_matrix_with_tiered_pricing"] | Literal["cumulative_grouped_bulk"] + | Literal["cumulative_grouped_allocation"] | Literal["minimum"] | Literal["percent"] | Literal["event_output"], @@ -3060,6 +3160,7 @@ def create( | Optional[price_create_params.NewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfig] | Optional[price_create_params.NewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfig] | Optional[price_create_params.NewFloatingCumulativeGroupedBulkPriceConversionRateConfig] + | Optional[price_create_params.NewFloatingCumulativeGroupedAllocationPriceConversionRateConfig] | Optional[price_create_params.NewFloatingMinimumCompositePriceConversionRateConfig] | Optional[price_create_params.NewFloatingPercentCompositePriceConversionRateConfig] | Optional[price_create_params.NewFloatingEventOutputPriceConversionRateConfig] @@ -3115,6 +3216,8 @@ def create( | Omit = omit, cumulative_grouped_bulk_config: price_create_params.NewFloatingCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig | Omit = omit, + cumulative_grouped_allocation_config: price_create_params.NewFloatingCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig + | Omit = omit, minimum_config: price_create_params.NewFloatingMinimumCompositePriceMinimumConfig | Omit = omit, percent_config: price_create_params.NewFloatingPercentCompositePricePercentConfig | Omit = omit, event_output_config: price_create_params.NewFloatingEventOutputPriceEventOutputConfig | Omit = omit, @@ -3175,6 +3278,7 @@ def create( "scalable_matrix_with_unit_pricing_config": scalable_matrix_with_unit_pricing_config, "scalable_matrix_with_tiered_pricing_config": scalable_matrix_with_tiered_pricing_config, "cumulative_grouped_bulk_config": cumulative_grouped_bulk_config, + "cumulative_grouped_allocation_config": cumulative_grouped_allocation_config, "minimum_config": minimum_config, "percent_config": percent_config, "event_output_config": event_output_config, @@ -6223,6 +6327,104 @@ async def create( """ ... + @overload + async def create( + self, + *, + cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"], + cumulative_grouped_allocation_config: price_create_params.NewFloatingCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig, + currency: str, + item_id: str, + model_type: Literal["cumulative_grouped_allocation"], + name: str, + billable_metric_id: Optional[str] | Omit = omit, + billed_in_advance: Optional[bool] | Omit = omit, + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | Omit = omit, + conversion_rate: Optional[float] | Omit = omit, + conversion_rate_config: Optional[ + price_create_params.NewFloatingCumulativeGroupedAllocationPriceConversionRateConfig + ] + | Omit = omit, + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | Omit = omit, + external_price_id: Optional[str] | Omit = omit, + fixed_price_quantity: Optional[float] | Omit = omit, + invoice_grouping_key: Optional[str] | Omit = omit, + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | Omit = omit, + metadata: Optional[Dict[str, Optional[str]]] | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> 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 + associated with a specific plan and can instead be individually added to + subscriptions, including subscriptions on different plans. + + An `external_price_id` can be optionally specified as an alias to allow + ergonomic interaction with prices in the Orb API. + + See the [Price resource](/product-catalog/price-configuration) for the + specification of different price model configurations possible in this endpoint. + + Args: + cadence: The cadence to bill for this price on. + + cumulative_grouped_allocation_config: Configuration for cumulative_grouped_allocation pricing + + currency: An ISO 4217 currency string for which this price is billed in. + + item_id: The id of the item the price will be associated with. + + model_type: The pricing model type + + name: The name of the price. + + billable_metric_id: The id of the billable metric for the price. Only needed if the price is + usage-based. + + billed_in_advance: If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + + billing_cycle_configuration: For custom cadence: specifies the duration of the billing period in days or + months. + + conversion_rate: The per unit conversion rate of the price currency to the invoicing currency. + + conversion_rate_config: The configuration for the 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 + applied. + + invoice_grouping_key: The property used to group this price on an invoice + + invoicing_cycle_configuration: Within each billing cycle, specifies the cadence at which invoices are produced. + If unspecified, a single invoice is produced per billing cycle. + + metadata: User-specified key/value pairs for the resource. 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 + + 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 + """ + ... + @overload async def create( self, @@ -6539,6 +6741,7 @@ async def create( ["cadence", "currency", "item_id", "model_type", "name", "scalable_matrix_with_unit_pricing_config"], ["cadence", "currency", "item_id", "model_type", "name", "scalable_matrix_with_tiered_pricing_config"], ["cadence", "cumulative_grouped_bulk_config", "currency", "item_id", "model_type", "name"], + ["cadence", "cumulative_grouped_allocation_config", "currency", "item_id", "model_type", "name"], ["cadence", "currency", "item_id", "minimum_config", "model_type", "name"], ["cadence", "currency", "item_id", "model_type", "name", "percent_config"], ["cadence", "currency", "event_output_config", "item_id", "model_type", "name"], @@ -6576,6 +6779,7 @@ async def create( | Literal["scalable_matrix_with_unit_pricing"] | Literal["scalable_matrix_with_tiered_pricing"] | Literal["cumulative_grouped_bulk"] + | Literal["cumulative_grouped_allocation"] | Literal["minimum"] | Literal["percent"] | Literal["event_output"], @@ -6612,6 +6816,7 @@ async def create( | Optional[price_create_params.NewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfig] | Optional[price_create_params.NewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfig] | Optional[price_create_params.NewFloatingCumulativeGroupedBulkPriceConversionRateConfig] + | Optional[price_create_params.NewFloatingCumulativeGroupedAllocationPriceConversionRateConfig] | Optional[price_create_params.NewFloatingMinimumCompositePriceConversionRateConfig] | Optional[price_create_params.NewFloatingPercentCompositePriceConversionRateConfig] | Optional[price_create_params.NewFloatingEventOutputPriceConversionRateConfig] @@ -6667,6 +6872,8 @@ async def create( | Omit = omit, cumulative_grouped_bulk_config: price_create_params.NewFloatingCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig | Omit = omit, + cumulative_grouped_allocation_config: price_create_params.NewFloatingCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig + | Omit = omit, minimum_config: price_create_params.NewFloatingMinimumCompositePriceMinimumConfig | Omit = omit, percent_config: price_create_params.NewFloatingPercentCompositePricePercentConfig | Omit = omit, event_output_config: price_create_params.NewFloatingEventOutputPriceEventOutputConfig | Omit = omit, @@ -6727,6 +6934,7 @@ async def create( "scalable_matrix_with_unit_pricing_config": scalable_matrix_with_unit_pricing_config, "scalable_matrix_with_tiered_pricing_config": scalable_matrix_with_tiered_pricing_config, "cumulative_grouped_bulk_config": cumulative_grouped_bulk_config, + "cumulative_grouped_allocation_config": cumulative_grouped_allocation_config, "minimum_config": minimum_config, "percent_config": percent_config, "event_output_config": event_output_config, diff --git a/src/orb/types/beta/external_plan_id_create_plan_version_params.py b/src/orb/types/beta/external_plan_id_create_plan_version_params.py index b4731697..6f22d131 100644 --- a/src/orb/types/beta/external_plan_id_create_plan_version_params.py +++ b/src/orb/types/beta/external_plan_id_create_plan_version_params.py @@ -61,6 +61,9 @@ "AddPricePriceNewPlanGroupedWithMinMaxThresholdsPrice", "AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig", "AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig", + "AddPricePriceNewPlanCumulativeGroupedAllocationPrice", + "AddPricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig", + "AddPricePriceNewPlanCumulativeGroupedAllocationPriceConversionRateConfig", "AddPricePriceNewPlanPercentCompositePrice", "AddPricePriceNewPlanPercentCompositePricePercentConfig", "AddPricePriceNewPlanPercentCompositePriceConversionRateConfig", @@ -85,6 +88,9 @@ "ReplacePricePriceNewPlanGroupedWithMinMaxThresholdsPrice", "ReplacePricePriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig", "ReplacePricePriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig", + "ReplacePricePriceNewPlanCumulativeGroupedAllocationPrice", + "ReplacePricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig", + "ReplacePricePriceNewPlanCumulativeGroupedAllocationPriceConversionRateConfig", "ReplacePricePriceNewPlanPercentCompositePrice", "ReplacePricePriceNewPlanPercentCompositePricePercentConfig", "ReplacePricePriceNewPlanPercentCompositePriceConversionRateConfig", @@ -447,6 +453,108 @@ class AddPricePriceNewPlanGroupedWithMinMaxThresholdsPrice(TypedDict, total=Fals """ +class AddPricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig(TypedDict, total=False): + cumulative_allocation: Required[str] + """The overall allocation across all groups""" + + group_allocation: Required[str] + """The allocation per individual group""" + + grouping_key: Required[str] + """The event property used to group usage before applying allocations""" + + unit_amount: Required[str] + """The amount to charge for each unit outside of the allocation""" + + +AddPricePriceNewPlanCumulativeGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPricePriceNewPlanCumulativeGroupedAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + cumulative_grouped_allocation_config: Required[ + AddPricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig + ] + """Configuration for cumulative_grouped_allocation pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["cumulative_grouped_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPricePriceNewPlanCumulativeGroupedAllocationPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + class AddPricePriceNewPlanPercentCompositePricePercentConfig(TypedDict, total=False): percent: Required[float] """What percent of the component subtotals to charge""" @@ -670,6 +778,7 @@ class AddPricePriceNewPlanEventOutputPrice(TypedDict, total=False): NewPlanScalableMatrixWithUnitPricingPrice, NewPlanScalableMatrixWithTieredPricingPrice, NewPlanCumulativeGroupedBulkPrice, + AddPricePriceNewPlanCumulativeGroupedAllocationPrice, NewPlanMinimumCompositePrice, AddPricePriceNewPlanPercentCompositePrice, AddPricePriceNewPlanEventOutputPrice, @@ -1033,6 +1142,108 @@ class ReplacePricePriceNewPlanGroupedWithMinMaxThresholdsPrice(TypedDict, total= """ +class ReplacePricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig(TypedDict, total=False): + cumulative_allocation: Required[str] + """The overall allocation across all groups""" + + group_allocation: Required[str] + """The allocation per individual group""" + + grouping_key: Required[str] + """The event property used to group usage before applying allocations""" + + unit_amount: Required[str] + """The amount to charge for each unit outside of the allocation""" + + +ReplacePricePriceNewPlanCumulativeGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePricePriceNewPlanCumulativeGroupedAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + cumulative_grouped_allocation_config: Required[ + ReplacePricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig + ] + """Configuration for cumulative_grouped_allocation pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["cumulative_grouped_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ReplacePricePriceNewPlanCumulativeGroupedAllocationPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + 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 ReplacePricePriceNewPlanPercentCompositePricePercentConfig(TypedDict, total=False): percent: Required[float] """What percent of the component subtotals to charge""" @@ -1256,6 +1467,7 @@ class ReplacePricePriceNewPlanEventOutputPrice(TypedDict, total=False): NewPlanScalableMatrixWithUnitPricingPrice, NewPlanScalableMatrixWithTieredPricingPrice, NewPlanCumulativeGroupedBulkPrice, + ReplacePricePriceNewPlanCumulativeGroupedAllocationPrice, NewPlanMinimumCompositePrice, ReplacePricePriceNewPlanPercentCompositePrice, ReplacePricePriceNewPlanEventOutputPrice, diff --git a/src/orb/types/beta_create_plan_version_params.py b/src/orb/types/beta_create_plan_version_params.py index b87b7c4d..3b12717f 100644 --- a/src/orb/types/beta_create_plan_version_params.py +++ b/src/orb/types/beta_create_plan_version_params.py @@ -61,6 +61,9 @@ "AddPricePriceNewPlanGroupedWithMinMaxThresholdsPrice", "AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig", "AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig", + "AddPricePriceNewPlanCumulativeGroupedAllocationPrice", + "AddPricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig", + "AddPricePriceNewPlanCumulativeGroupedAllocationPriceConversionRateConfig", "AddPricePriceNewPlanPercentCompositePrice", "AddPricePriceNewPlanPercentCompositePricePercentConfig", "AddPricePriceNewPlanPercentCompositePriceConversionRateConfig", @@ -85,6 +88,9 @@ "ReplacePricePriceNewPlanGroupedWithMinMaxThresholdsPrice", "ReplacePricePriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig", "ReplacePricePriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig", + "ReplacePricePriceNewPlanCumulativeGroupedAllocationPrice", + "ReplacePricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig", + "ReplacePricePriceNewPlanCumulativeGroupedAllocationPriceConversionRateConfig", "ReplacePricePriceNewPlanPercentCompositePrice", "ReplacePricePriceNewPlanPercentCompositePricePercentConfig", "ReplacePricePriceNewPlanPercentCompositePriceConversionRateConfig", @@ -447,6 +453,108 @@ class AddPricePriceNewPlanGroupedWithMinMaxThresholdsPrice(TypedDict, total=Fals """ +class AddPricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig(TypedDict, total=False): + cumulative_allocation: Required[str] + """The overall allocation across all groups""" + + group_allocation: Required[str] + """The allocation per individual group""" + + grouping_key: Required[str] + """The event property used to group usage before applying allocations""" + + unit_amount: Required[str] + """The amount to charge for each unit outside of the allocation""" + + +AddPricePriceNewPlanCumulativeGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPricePriceNewPlanCumulativeGroupedAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + cumulative_grouped_allocation_config: Required[ + AddPricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig + ] + """Configuration for cumulative_grouped_allocation pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["cumulative_grouped_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPricePriceNewPlanCumulativeGroupedAllocationPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + Individual keys can be removed by setting the value to `null`, and the entire + metadata mapping can be cleared by setting `metadata` to `null`. + """ + + reference_id: Optional[str] + """ + A transient ID that can be used to reference this price when adding adjustments + in the same API call. + """ + + class AddPricePriceNewPlanPercentCompositePricePercentConfig(TypedDict, total=False): percent: Required[float] """What percent of the component subtotals to charge""" @@ -670,6 +778,7 @@ class AddPricePriceNewPlanEventOutputPrice(TypedDict, total=False): NewPlanScalableMatrixWithUnitPricingPrice, NewPlanScalableMatrixWithTieredPricingPrice, NewPlanCumulativeGroupedBulkPrice, + AddPricePriceNewPlanCumulativeGroupedAllocationPrice, NewPlanMinimumCompositePrice, AddPricePriceNewPlanPercentCompositePrice, AddPricePriceNewPlanEventOutputPrice, @@ -1033,6 +1142,108 @@ class ReplacePricePriceNewPlanGroupedWithMinMaxThresholdsPrice(TypedDict, total= """ +class ReplacePricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig(TypedDict, total=False): + cumulative_allocation: Required[str] + """The overall allocation across all groups""" + + group_allocation: Required[str] + """The allocation per individual group""" + + grouping_key: Required[str] + """The event property used to group usage before applying allocations""" + + unit_amount: Required[str] + """The amount to charge for each unit outside of the allocation""" + + +ReplacePricePriceNewPlanCumulativeGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePricePriceNewPlanCumulativeGroupedAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + cumulative_grouped_allocation_config: Required[ + ReplacePricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig + ] + """Configuration for cumulative_grouped_allocation pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["cumulative_grouped_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ReplacePricePriceNewPlanCumulativeGroupedAllocationPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + 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 ReplacePricePriceNewPlanPercentCompositePricePercentConfig(TypedDict, total=False): percent: Required[float] """What percent of the component subtotals to charge""" @@ -1256,6 +1467,7 @@ class ReplacePricePriceNewPlanEventOutputPrice(TypedDict, total=False): NewPlanScalableMatrixWithUnitPricingPrice, NewPlanScalableMatrixWithTieredPricingPrice, NewPlanCumulativeGroupedBulkPrice, + ReplacePricePriceNewPlanCumulativeGroupedAllocationPrice, NewPlanMinimumCompositePrice, ReplacePricePriceNewPlanPercentCompositePrice, ReplacePricePriceNewPlanEventOutputPrice, diff --git a/src/orb/types/plan.py b/src/orb/types/plan.py index 4dee4e7a..a81bace5 100644 --- a/src/orb/types/plan.py +++ b/src/orb/types/plan.py @@ -16,7 +16,7 @@ from .shared.plan_phase_amount_discount_adjustment import PlanPhaseAmountDiscountAdjustment from .shared.plan_phase_percentage_discount_adjustment import PlanPhasePercentageDiscountAdjustment -__all__ = ["Plan", "Adjustment", "BasePlan", "PlanPhase", "Product", "TrialConfig"] +__all__ = ["Plan", "Adjustment", "PlanPhase", "Product", "TrialConfig", "BasePlan"] Adjustment: TypeAlias = Annotated[ Union[ @@ -30,19 +30,6 @@ ] -class BasePlan(BaseModel): - id: Optional[str] = None - - external_plan_id: Optional[str] = None - """ - An optional user-defined ID for this plan resource, used throughout the system - as an alias for this Plan. Use this field to identify a plan by an existing - identifier in your system. - """ - - name: Optional[str] = None - - class PlanPhase(BaseModel): id: str @@ -86,6 +73,19 @@ class TrialConfig(BaseModel): trial_period_unit: Literal["days"] +class BasePlan(BaseModel): + id: Optional[str] = None + + external_plan_id: Optional[str] = None + """ + An optional user-defined ID for this plan resource, used throughout the system + as an alias for this Plan. Use this field to identify a plan by an existing + identifier in your system. + """ + + name: Optional[str] = None + + class Plan(BaseModel): id: str @@ -95,14 +95,6 @@ class Plan(BaseModel): If the plan has phases, this includes adjustments across all phases of the plan. """ - base_plan: Optional[BasePlan] = None - - base_plan_id: Optional[str] = None - """ - The parent plan id if the given plan was created by overriding one or more of - the parent's prices - """ - created_at: datetime currency: str @@ -176,3 +168,11 @@ class Plan(BaseModel): trial_config: TrialConfig version: int + + base_plan: Optional[BasePlan] = None + + base_plan_id: Optional[str] = None + """ + The parent plan id if the given plan was created by overriding one or more of + the parent's prices + """ diff --git a/src/orb/types/plan_create_params.py b/src/orb/types/plan_create_params.py index 653232e1..23b66751 100644 --- a/src/orb/types/plan_create_params.py +++ b/src/orb/types/plan_create_params.py @@ -59,6 +59,9 @@ "PricePriceNewPlanGroupedWithMinMaxThresholdsPrice", "PricePriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig", "PricePriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig", + "PricePriceNewPlanCumulativeGroupedAllocationPrice", + "PricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig", + "PricePriceNewPlanCumulativeGroupedAllocationPriceConversionRateConfig", "PricePriceNewPlanPercentCompositePrice", "PricePriceNewPlanPercentCompositePricePercentConfig", "PricePriceNewPlanPercentCompositePriceConversionRateConfig", @@ -440,6 +443,108 @@ class PricePriceNewPlanGroupedWithMinMaxThresholdsPrice(TypedDict, total=False): """ +class PricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig(TypedDict, total=False): + cumulative_allocation: Required[str] + """The overall allocation across all groups""" + + group_allocation: Required[str] + """The allocation per individual group""" + + grouping_key: Required[str] + """The event property used to group usage before applying allocations""" + + unit_amount: Required[str] + """The amount to charge for each unit outside of the allocation""" + + +PricePriceNewPlanCumulativeGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PricePriceNewPlanCumulativeGroupedAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + cumulative_grouped_allocation_config: Required[ + PricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig + ] + """Configuration for cumulative_grouped_allocation pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["cumulative_grouped_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[PricePriceNewPlanCumulativeGroupedAllocationPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + 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 PricePriceNewPlanPercentCompositePricePercentConfig(TypedDict, total=False): percent: Required[float] """What percent of the component subtotals to charge""" @@ -663,6 +768,7 @@ class PricePriceNewPlanEventOutputPrice(TypedDict, total=False): NewPlanScalableMatrixWithUnitPricingPrice, NewPlanScalableMatrixWithTieredPricingPrice, NewPlanCumulativeGroupedBulkPrice, + PricePriceNewPlanCumulativeGroupedAllocationPrice, NewPlanMinimumCompositePrice, PricePriceNewPlanPercentCompositePrice, PricePriceNewPlanEventOutputPrice, diff --git a/src/orb/types/price_create_params.py b/src/orb/types/price_create_params.py index 726c4fff..ff714f42 100644 --- a/src/orb/types/price_create_params.py +++ b/src/orb/types/price_create_params.py @@ -111,6 +111,9 @@ "NewFloatingCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig", "NewFloatingCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValue", "NewFloatingCumulativeGroupedBulkPriceConversionRateConfig", + "NewFloatingCumulativeGroupedAllocationPrice", + "NewFloatingCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig", + "NewFloatingCumulativeGroupedAllocationPriceConversionRateConfig", "NewFloatingMinimumCompositePrice", "NewFloatingMinimumCompositePriceMinimumConfig", "NewFloatingMinimumCompositePriceConversionRateConfig", @@ -2619,6 +2622,99 @@ class NewFloatingCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig(TypedDict ] +class NewFloatingCumulativeGroupedAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + cumulative_grouped_allocation_config: Required[ + NewFloatingCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig + ] + """Configuration for cumulative_grouped_allocation pricing""" + + 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_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[NewFloatingCumulativeGroupedAllocationPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + 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 NewFloatingCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig(TypedDict, total=False): + cumulative_allocation: Required[str] + """The overall allocation across all groups""" + + group_allocation: Required[str] + """The allocation per individual group""" + + grouping_key: Required[str] + """The event property used to group usage before applying allocations""" + + unit_amount: Required[str] + """The amount to charge for each unit outside of the allocation""" + + +NewFloatingCumulativeGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + class NewFloatingMinimumCompositePrice(TypedDict, total=False): cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] """The cadence to bill for this price on.""" @@ -2906,6 +3002,7 @@ class NewFloatingEventOutputPriceEventOutputConfig(TypedDict, total=False): NewFloatingScalableMatrixWithUnitPricingPrice, NewFloatingScalableMatrixWithTieredPricingPrice, NewFloatingCumulativeGroupedBulkPrice, + NewFloatingCumulativeGroupedAllocationPrice, NewFloatingMinimumCompositePrice, NewFloatingPercentCompositePrice, NewFloatingEventOutputPrice, diff --git a/src/orb/types/price_evaluate_multiple_params.py b/src/orb/types/price_evaluate_multiple_params.py index 8dffa2bd..331a1026 100644 --- a/src/orb/types/price_evaluate_multiple_params.py +++ b/src/orb/types/price_evaluate_multiple_params.py @@ -55,6 +55,9 @@ "PriceEvaluationPriceNewFloatingGroupedWithMinMaxThresholdsPrice", "PriceEvaluationPriceNewFloatingGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig", "PriceEvaluationPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig", + "PriceEvaluationPriceNewFloatingCumulativeGroupedAllocationPrice", + "PriceEvaluationPriceNewFloatingCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig", + "PriceEvaluationPriceNewFloatingCumulativeGroupedAllocationPriceConversionRateConfig", "PriceEvaluationPriceNewFloatingPercentCompositePrice", "PriceEvaluationPriceNewFloatingPercentCompositePricePercentConfig", "PriceEvaluationPriceNewFloatingPercentCompositePriceConversionRateConfig", @@ -279,6 +282,103 @@ class PriceEvaluationPriceNewFloatingGroupedWithMinMaxThresholdsPrice(TypedDict, """ +class PriceEvaluationPriceNewFloatingCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig( + TypedDict, total=False +): + cumulative_allocation: Required[str] + """The overall allocation across all groups""" + + group_allocation: Required[str] + """The allocation per individual group""" + + grouping_key: Required[str] + """The event property used to group usage before applying allocations""" + + unit_amount: Required[str] + """The amount to charge for each unit outside of the allocation""" + + +PriceEvaluationPriceNewFloatingCumulativeGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceEvaluationPriceNewFloatingCumulativeGroupedAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + cumulative_grouped_allocation_config: Required[ + PriceEvaluationPriceNewFloatingCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig + ] + """Configuration for cumulative_grouped_allocation pricing""" + + 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_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceEvaluationPriceNewFloatingCumulativeGroupedAllocationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + 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 PriceEvaluationPriceNewFloatingPercentCompositePricePercentConfig(TypedDict, total=False): percent: Required[float] """What percent of the component subtotals to charge""" @@ -484,6 +584,7 @@ class PriceEvaluationPriceNewFloatingEventOutputPrice(TypedDict, total=False): NewFloatingScalableMatrixWithUnitPricingPrice, NewFloatingScalableMatrixWithTieredPricingPrice, NewFloatingCumulativeGroupedBulkPrice, + PriceEvaluationPriceNewFloatingCumulativeGroupedAllocationPrice, NewFloatingMinimumCompositePrice, PriceEvaluationPriceNewFloatingPercentCompositePrice, PriceEvaluationPriceNewFloatingEventOutputPrice, diff --git a/src/orb/types/price_evaluate_preview_events_params.py b/src/orb/types/price_evaluate_preview_events_params.py index f5645b35..a490430a 100644 --- a/src/orb/types/price_evaluate_preview_events_params.py +++ b/src/orb/types/price_evaluate_preview_events_params.py @@ -56,6 +56,9 @@ "PriceEvaluationPriceNewFloatingGroupedWithMinMaxThresholdsPrice", "PriceEvaluationPriceNewFloatingGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig", "PriceEvaluationPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig", + "PriceEvaluationPriceNewFloatingCumulativeGroupedAllocationPrice", + "PriceEvaluationPriceNewFloatingCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig", + "PriceEvaluationPriceNewFloatingCumulativeGroupedAllocationPriceConversionRateConfig", "PriceEvaluationPriceNewFloatingPercentCompositePrice", "PriceEvaluationPriceNewFloatingPercentCompositePricePercentConfig", "PriceEvaluationPriceNewFloatingPercentCompositePriceConversionRateConfig", @@ -311,6 +314,103 @@ class PriceEvaluationPriceNewFloatingGroupedWithMinMaxThresholdsPrice(TypedDict, """ +class PriceEvaluationPriceNewFloatingCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig( + TypedDict, total=False +): + cumulative_allocation: Required[str] + """The overall allocation across all groups""" + + group_allocation: Required[str] + """The allocation per individual group""" + + grouping_key: Required[str] + """The event property used to group usage before applying allocations""" + + unit_amount: Required[str] + """The amount to charge for each unit outside of the allocation""" + + +PriceEvaluationPriceNewFloatingCumulativeGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class PriceEvaluationPriceNewFloatingCumulativeGroupedAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + cumulative_grouped_allocation_config: Required[ + PriceEvaluationPriceNewFloatingCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig + ] + """Configuration for cumulative_grouped_allocation pricing""" + + 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_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + PriceEvaluationPriceNewFloatingCumulativeGroupedAllocationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + 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 PriceEvaluationPriceNewFloatingPercentCompositePricePercentConfig(TypedDict, total=False): percent: Required[float] """What percent of the component subtotals to charge""" @@ -516,6 +616,7 @@ class PriceEvaluationPriceNewFloatingEventOutputPrice(TypedDict, total=False): NewFloatingScalableMatrixWithUnitPricingPrice, NewFloatingScalableMatrixWithTieredPricingPrice, NewFloatingCumulativeGroupedBulkPrice, + PriceEvaluationPriceNewFloatingCumulativeGroupedAllocationPrice, NewFloatingMinimumCompositePrice, PriceEvaluationPriceNewFloatingPercentCompositePrice, PriceEvaluationPriceNewFloatingEventOutputPrice, diff --git a/src/orb/types/shared/price.py b/src/orb/types/shared/price.py index f591adb3..e6dcb4fa 100644 --- a/src/orb/types/shared/price.py +++ b/src/orb/types/shared/price.py @@ -147,6 +147,10 @@ "CumulativeGroupedBulkPriceConversionRateConfig", "CumulativeGroupedBulkPriceCumulativeGroupedBulkConfig", "CumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValue", + "CumulativeGroupedAllocationPrice", + "CumulativeGroupedAllocationPriceCompositePriceFilter", + "CumulativeGroupedAllocationPriceConversionRateConfig", + "CumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig", "MinimumCompositePrice", "MinimumCompositePriceCompositePriceFilter", "MinimumCompositePriceConversionRateConfig", @@ -3001,6 +3005,110 @@ class CumulativeGroupedBulkPrice(BaseModel): dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None +class CumulativeGroupedAllocationPriceCompositePriceFilter(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.""" + + +CumulativeGroupedAllocationPriceConversionRateConfig: TypeAlias = Annotated[ + Union[UnitConversionRateConfig, TieredConversionRateConfig], PropertyInfo(discriminator="conversion_rate_type") +] + + +class CumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig(BaseModel): + cumulative_allocation: str + """The overall allocation across all groups""" + + group_allocation: str + """The allocation per individual group""" + + grouping_key: str + """The event property used to group usage before applying allocations""" + + unit_amount: str + """The amount to charge for each unit outside of the allocation""" + + +class CumulativeGroupedAllocationPrice(BaseModel): + id: str + + billable_metric: Optional[BillableMetricTiny] = None + + billing_cycle_configuration: BillingCycleConfiguration + + billing_mode: Literal["in_advance", "in_arrear"] + + cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"] + + composite_price_filters: Optional[List[CumulativeGroupedAllocationPriceCompositePriceFilter]] = None + + conversion_rate: Optional[float] = None + + conversion_rate_config: Optional[CumulativeGroupedAllocationPriceConversionRateConfig] = None + + created_at: datetime + + credit_allocation: Optional[Allocation] = None + + cumulative_grouped_allocation_config: CumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig + """Configuration for cumulative_grouped_allocation pricing""" + + currency: str + + discount: Optional[Discount] = None + + external_price_id: Optional[str] = None + + fixed_price_quantity: Optional[float] = None + + invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None + + item: ItemSlim + """ + A minimal representation of an Item containing only the essential identifying + information. + """ + + maximum: Optional[Maximum] = None + + maximum_amount: Optional[str] = None + + 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`. + """ + + minimum: Optional[Minimum] = None + + minimum_amount: Optional[str] = None + + price_model_type: Literal["cumulative_grouped_allocation"] = FieldInfo(alias="model_type") + """The pricing model type""" + + name: str + + plan_phase_order: Optional[int] = None + + price_type: Literal["usage_price", "fixed_price", "composite_price"] + + replaces_price_id: Optional[str] = None + """The price id this price replaces. + + This price will take the place of the replaced price in plan version migrations. + """ + + dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None + + class MinimumCompositePriceCompositePriceFilter(BaseModel): field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] """The property of the price to filter on.""" @@ -3331,6 +3439,7 @@ class EventOutputPrice(BaseModel): ScalableMatrixWithUnitPricingPrice, ScalableMatrixWithTieredPricingPrice, CumulativeGroupedBulkPrice, + CumulativeGroupedAllocationPrice, MinimumCompositePrice, PercentCompositePrice, EventOutputPrice, diff --git a/src/orb/types/subscription_create_params.py b/src/orb/types/subscription_create_params.py index dceed6e1..47d4c6e5 100644 --- a/src/orb/types/subscription_create_params.py +++ b/src/orb/types/subscription_create_params.py @@ -72,6 +72,9 @@ "AddPricePriceNewSubscriptionGroupedWithMinMaxThresholdsPrice", "AddPricePriceNewSubscriptionGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig", "AddPricePriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig", + "AddPricePriceNewSubscriptionCumulativeGroupedAllocationPrice", + "AddPricePriceNewSubscriptionCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig", + "AddPricePriceNewSubscriptionCumulativeGroupedAllocationPriceConversionRateConfig", "AddPricePriceNewSubscriptionPercentCompositePrice", "AddPricePriceNewSubscriptionPercentCompositePricePercentConfig", "AddPricePriceNewSubscriptionPercentCompositePriceConversionRateConfig", @@ -96,6 +99,9 @@ "ReplacePricePriceNewSubscriptionGroupedWithMinMaxThresholdsPrice", "ReplacePricePriceNewSubscriptionGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig", "ReplacePricePriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig", + "ReplacePricePriceNewSubscriptionCumulativeGroupedAllocationPrice", + "ReplacePricePriceNewSubscriptionCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig", + "ReplacePricePriceNewSubscriptionCumulativeGroupedAllocationPriceConversionRateConfig", "ReplacePricePriceNewSubscriptionPercentCompositePrice", "ReplacePricePriceNewSubscriptionPercentCompositePricePercentConfig", "ReplacePricePriceNewSubscriptionPercentCompositePriceConversionRateConfig", @@ -620,6 +626,110 @@ class AddPricePriceNewSubscriptionGroupedWithMinMaxThresholdsPrice(TypedDict, to """ +class AddPricePriceNewSubscriptionCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig( + TypedDict, total=False +): + cumulative_allocation: Required[str] + """The overall allocation across all groups""" + + group_allocation: Required[str] + """The allocation per individual group""" + + grouping_key: Required[str] + """The event property used to group usage before applying allocations""" + + unit_amount: Required[str] + """The amount to charge for each unit outside of the allocation""" + + +AddPricePriceNewSubscriptionCumulativeGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPricePriceNewSubscriptionCumulativeGroupedAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + cumulative_grouped_allocation_config: Required[ + AddPricePriceNewSubscriptionCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig + ] + """Configuration for cumulative_grouped_allocation pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["cumulative_grouped_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPricePriceNewSubscriptionCumulativeGroupedAllocationPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + 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 AddPricePriceNewSubscriptionPercentCompositePricePercentConfig(TypedDict, total=False): percent: Required[float] """What percent of the component subtotals to charge""" @@ -843,6 +953,7 @@ class AddPricePriceNewSubscriptionEventOutputPrice(TypedDict, total=False): NewSubscriptionScalableMatrixWithUnitPricingPriceParam, NewSubscriptionScalableMatrixWithTieredPricingPriceParam, NewSubscriptionCumulativeGroupedBulkPriceParam, + AddPricePriceNewSubscriptionCumulativeGroupedAllocationPrice, NewSubscriptionMinimumCompositePriceParam, AddPricePriceNewSubscriptionPercentCompositePrice, AddPricePriceNewSubscriptionEventOutputPrice, @@ -1244,6 +1355,112 @@ class ReplacePricePriceNewSubscriptionGroupedWithMinMaxThresholdsPrice(TypedDict """ +class ReplacePricePriceNewSubscriptionCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig( + TypedDict, total=False +): + cumulative_allocation: Required[str] + """The overall allocation across all groups""" + + group_allocation: Required[str] + """The allocation per individual group""" + + grouping_key: Required[str] + """The event property used to group usage before applying allocations""" + + unit_amount: Required[str] + """The amount to charge for each unit outside of the allocation""" + + +ReplacePricePriceNewSubscriptionCumulativeGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePricePriceNewSubscriptionCumulativeGroupedAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + cumulative_grouped_allocation_config: Required[ + ReplacePricePriceNewSubscriptionCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig + ] + """Configuration for cumulative_grouped_allocation pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["cumulative_grouped_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePricePriceNewSubscriptionCumulativeGroupedAllocationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + 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 ReplacePricePriceNewSubscriptionPercentCompositePricePercentConfig(TypedDict, total=False): percent: Required[float] """What percent of the component subtotals to charge""" @@ -1467,6 +1684,7 @@ class ReplacePricePriceNewSubscriptionEventOutputPrice(TypedDict, total=False): NewSubscriptionScalableMatrixWithUnitPricingPriceParam, NewSubscriptionScalableMatrixWithTieredPricingPriceParam, NewSubscriptionCumulativeGroupedBulkPriceParam, + ReplacePricePriceNewSubscriptionCumulativeGroupedAllocationPrice, NewSubscriptionMinimumCompositePriceParam, ReplacePricePriceNewSubscriptionPercentCompositePrice, ReplacePricePriceNewSubscriptionEventOutputPrice, diff --git a/src/orb/types/subscription_price_intervals_params.py b/src/orb/types/subscription_price_intervals_params.py index 6e79da65..a59e68da 100644 --- a/src/orb/types/subscription_price_intervals_params.py +++ b/src/orb/types/subscription_price_intervals_params.py @@ -67,6 +67,9 @@ "AddPriceNewFloatingGroupedWithMinMaxThresholdsPrice", "AddPriceNewFloatingGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig", "AddPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig", + "AddPriceNewFloatingCumulativeGroupedAllocationPrice", + "AddPriceNewFloatingCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig", + "AddPriceNewFloatingCumulativeGroupedAllocationPriceConversionRateConfig", "AddPriceNewFloatingPercentCompositePrice", "AddPriceNewFloatingPercentCompositePricePercentConfig", "AddPriceNewFloatingPercentCompositePriceConversionRateConfig", @@ -345,6 +348,99 @@ class AddPriceNewFloatingGroupedWithMinMaxThresholdsPrice(TypedDict, total=False """ +class AddPriceNewFloatingCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig(TypedDict, total=False): + cumulative_allocation: Required[str] + """The overall allocation across all groups""" + + group_allocation: Required[str] + """The allocation per individual group""" + + grouping_key: Required[str] + """The event property used to group usage before applying allocations""" + + unit_amount: Required[str] + """The amount to charge for each unit outside of the allocation""" + + +AddPriceNewFloatingCumulativeGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPriceNewFloatingCumulativeGroupedAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + cumulative_grouped_allocation_config: Required[ + AddPriceNewFloatingCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig + ] + """Configuration for cumulative_grouped_allocation pricing""" + + 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_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPriceNewFloatingCumulativeGroupedAllocationPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + 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 AddPriceNewFloatingPercentCompositePricePercentConfig(TypedDict, total=False): percent: Required[float] """What percent of the component subtotals to charge""" @@ -550,6 +646,7 @@ class AddPriceNewFloatingEventOutputPrice(TypedDict, total=False): NewFloatingScalableMatrixWithUnitPricingPrice, NewFloatingScalableMatrixWithTieredPricingPrice, NewFloatingCumulativeGroupedBulkPrice, + AddPriceNewFloatingCumulativeGroupedAllocationPrice, NewFloatingMinimumCompositePrice, AddPriceNewFloatingPercentCompositePrice, AddPriceNewFloatingEventOutputPrice, diff --git a/src/orb/types/subscription_schedule_plan_change_params.py b/src/orb/types/subscription_schedule_plan_change_params.py index c5017d98..2862f63e 100644 --- a/src/orb/types/subscription_schedule_plan_change_params.py +++ b/src/orb/types/subscription_schedule_plan_change_params.py @@ -72,6 +72,9 @@ "AddPricePriceNewSubscriptionGroupedWithMinMaxThresholdsPrice", "AddPricePriceNewSubscriptionGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig", "AddPricePriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig", + "AddPricePriceNewSubscriptionCumulativeGroupedAllocationPrice", + "AddPricePriceNewSubscriptionCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig", + "AddPricePriceNewSubscriptionCumulativeGroupedAllocationPriceConversionRateConfig", "AddPricePriceNewSubscriptionPercentCompositePrice", "AddPricePriceNewSubscriptionPercentCompositePricePercentConfig", "AddPricePriceNewSubscriptionPercentCompositePriceConversionRateConfig", @@ -96,6 +99,9 @@ "ReplacePricePriceNewSubscriptionGroupedWithMinMaxThresholdsPrice", "ReplacePricePriceNewSubscriptionGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig", "ReplacePricePriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig", + "ReplacePricePriceNewSubscriptionCumulativeGroupedAllocationPrice", + "ReplacePricePriceNewSubscriptionCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig", + "ReplacePricePriceNewSubscriptionCumulativeGroupedAllocationPriceConversionRateConfig", "ReplacePricePriceNewSubscriptionPercentCompositePrice", "ReplacePricePriceNewSubscriptionPercentCompositePricePercentConfig", "ReplacePricePriceNewSubscriptionPercentCompositePriceConversionRateConfig", @@ -608,6 +614,110 @@ class AddPricePriceNewSubscriptionGroupedWithMinMaxThresholdsPrice(TypedDict, to """ +class AddPricePriceNewSubscriptionCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig( + TypedDict, total=False +): + cumulative_allocation: Required[str] + """The overall allocation across all groups""" + + group_allocation: Required[str] + """The allocation per individual group""" + + grouping_key: Required[str] + """The event property used to group usage before applying allocations""" + + unit_amount: Required[str] + """The amount to charge for each unit outside of the allocation""" + + +AddPricePriceNewSubscriptionCumulativeGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class AddPricePriceNewSubscriptionCumulativeGroupedAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + cumulative_grouped_allocation_config: Required[ + AddPricePriceNewSubscriptionCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig + ] + """Configuration for cumulative_grouped_allocation pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["cumulative_grouped_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[AddPricePriceNewSubscriptionCumulativeGroupedAllocationPriceConversionRateConfig] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + 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 AddPricePriceNewSubscriptionPercentCompositePricePercentConfig(TypedDict, total=False): percent: Required[float] """What percent of the component subtotals to charge""" @@ -831,6 +941,7 @@ class AddPricePriceNewSubscriptionEventOutputPrice(TypedDict, total=False): NewSubscriptionScalableMatrixWithUnitPricingPriceParam, NewSubscriptionScalableMatrixWithTieredPricingPriceParam, NewSubscriptionCumulativeGroupedBulkPriceParam, + AddPricePriceNewSubscriptionCumulativeGroupedAllocationPrice, NewSubscriptionMinimumCompositePriceParam, AddPricePriceNewSubscriptionPercentCompositePrice, AddPricePriceNewSubscriptionEventOutputPrice, @@ -1232,6 +1343,112 @@ class ReplacePricePriceNewSubscriptionGroupedWithMinMaxThresholdsPrice(TypedDict """ +class ReplacePricePriceNewSubscriptionCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig( + TypedDict, total=False +): + cumulative_allocation: Required[str] + """The overall allocation across all groups""" + + group_allocation: Required[str] + """The allocation per individual group""" + + grouping_key: Required[str] + """The event property used to group usage before applying allocations""" + + unit_amount: Required[str] + """The amount to charge for each unit outside of the allocation""" + + +ReplacePricePriceNewSubscriptionCumulativeGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[ + UnitConversionRateConfig, TieredConversionRateConfig +] + + +class ReplacePricePriceNewSubscriptionCumulativeGroupedAllocationPrice(TypedDict, total=False): + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] + """The cadence to bill for this price on.""" + + cumulative_grouped_allocation_config: Required[ + ReplacePricePriceNewSubscriptionCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig + ] + """Configuration for cumulative_grouped_allocation pricing""" + + item_id: Required[str] + """The id of the item the price will be associated with.""" + + model_type: Required[Literal["cumulative_grouped_allocation"]] + """The pricing model type""" + + name: Required[str] + """The name of the price.""" + + billable_metric_id: Optional[str] + """The id of the billable metric for the price. + + Only needed if the price is usage-based. + """ + + billed_in_advance: Optional[bool] + """ + If the Price represents a fixed cost, the price will be billed in-advance if + this is true, and in-arrears if this is false. + """ + + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """ + For custom cadence: specifies the duration of the billing period in days or + months. + """ + + conversion_rate: Optional[float] + """The per unit conversion rate of the price currency to the invoicing currency.""" + + conversion_rate_config: Optional[ + ReplacePricePriceNewSubscriptionCumulativeGroupedAllocationPriceConversionRateConfig + ] + """The configuration for the rate of the price currency to the invoicing currency.""" + + currency: Optional[str] + """ + An ISO 4217 currency string, or custom pricing unit identifier, in which this + price is billed. + """ + + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] + """For dimensional price: specifies a price group and dimension values""" + + external_price_id: Optional[str] + """An alias for the price.""" + + fixed_price_quantity: Optional[float] + """ + If the Price represents a fixed cost, this represents the quantity of units + applied. + """ + + invoice_grouping_key: Optional[str] + """The property used to group this price on an invoice""" + + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] + """Within each billing cycle, specifies the cadence at which invoices are produced. + + If unspecified, a single invoice is produced per billing cycle. + """ + + metadata: Optional[Dict[str, Optional[str]]] + """User-specified key/value pairs for the resource. + + 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 ReplacePricePriceNewSubscriptionPercentCompositePricePercentConfig(TypedDict, total=False): percent: Required[float] """What percent of the component subtotals to charge""" @@ -1455,6 +1672,7 @@ class ReplacePricePriceNewSubscriptionEventOutputPrice(TypedDict, total=False): NewSubscriptionScalableMatrixWithUnitPricingPriceParam, NewSubscriptionScalableMatrixWithTieredPricingPriceParam, NewSubscriptionCumulativeGroupedBulkPriceParam, + ReplacePricePriceNewSubscriptionCumulativeGroupedAllocationPrice, NewSubscriptionMinimumCompositePriceParam, ReplacePricePriceNewSubscriptionPercentCompositePrice, ReplacePricePriceNewSubscriptionEventOutputPrice, diff --git a/tests/api_resources/test_prices.py b/tests/api_resources/test_prices.py index f19b1f05..c0c6c6e5 100644 --- a/tests/api_resources/test_prices.py +++ b/tests/api_resources/test_prices.py @@ -3136,6 +3136,108 @@ def test_streaming_response_create_overload_27(self, client: Orb) -> None: @parametrize def test_method_create_overload_28(self, client: Orb) -> None: + price = client.prices.create( + cadence="annual", + cumulative_grouped_allocation_config={ + "cumulative_allocation": "cumulative_allocation", + "group_allocation": "group_allocation", + "grouping_key": "x", + "unit_amount": "unit_amount", + }, + currency="currency", + item_id="item_id", + model_type="cumulative_grouped_allocation", + name="Annual fee", + ) + assert_matches_type(Price, price, path=["response"]) + + @parametrize + def test_method_create_with_all_params_overload_28(self, client: Orb) -> None: + price = client.prices.create( + cadence="annual", + cumulative_grouped_allocation_config={ + "cumulative_allocation": "cumulative_allocation", + "group_allocation": "group_allocation", + "grouping_key": "x", + "unit_amount": "unit_amount", + }, + currency="currency", + item_id="item_id", + model_type="cumulative_grouped_allocation", + name="Annual fee", + billable_metric_id="billable_metric_id", + billed_in_advance=True, + billing_cycle_configuration={ + "duration": 0, + "duration_unit": "day", + }, + conversion_rate=0, + conversion_rate_config={ + "conversion_rate_type": "unit", + "unit_config": {"unit_amount": "unit_amount"}, + }, + 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"}, + ) + assert_matches_type(Price, price, path=["response"]) + + @parametrize + def test_raw_response_create_overload_28(self, client: Orb) -> None: + response = client.prices.with_raw_response.create( + cadence="annual", + cumulative_grouped_allocation_config={ + "cumulative_allocation": "cumulative_allocation", + "group_allocation": "group_allocation", + "grouping_key": "x", + "unit_amount": "unit_amount", + }, + currency="currency", + item_id="item_id", + model_type="cumulative_grouped_allocation", + name="Annual fee", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + price = response.parse() + assert_matches_type(Price, price, path=["response"]) + + @parametrize + def test_streaming_response_create_overload_28(self, client: Orb) -> None: + with client.prices.with_streaming_response.create( + cadence="annual", + cumulative_grouped_allocation_config={ + "cumulative_allocation": "cumulative_allocation", + "group_allocation": "group_allocation", + "grouping_key": "x", + "unit_amount": "unit_amount", + }, + currency="currency", + item_id="item_id", + model_type="cumulative_grouped_allocation", + name="Annual fee", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + price = response.parse() + assert_matches_type(Price, price, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_create_overload_29(self, client: Orb) -> None: price = client.prices.create( cadence="annual", currency="currency", @@ -3147,7 +3249,7 @@ def test_method_create_overload_28(self, client: Orb) -> None: assert_matches_type(Price, price, path=["response"]) @parametrize - def test_method_create_with_all_params_overload_28(self, client: Orb) -> None: + def test_method_create_with_all_params_overload_29(self, client: Orb) -> None: price = client.prices.create( cadence="annual", currency="currency", @@ -3186,7 +3288,7 @@ def test_method_create_with_all_params_overload_28(self, client: Orb) -> None: assert_matches_type(Price, price, path=["response"]) @parametrize - def test_raw_response_create_overload_28(self, client: Orb) -> None: + def test_raw_response_create_overload_29(self, client: Orb) -> None: response = client.prices.with_raw_response.create( cadence="annual", currency="currency", @@ -3202,7 +3304,7 @@ def test_raw_response_create_overload_28(self, client: Orb) -> None: assert_matches_type(Price, price, path=["response"]) @parametrize - def test_streaming_response_create_overload_28(self, client: Orb) -> None: + def test_streaming_response_create_overload_29(self, client: Orb) -> None: with client.prices.with_streaming_response.create( cadence="annual", currency="currency", @@ -3220,7 +3322,7 @@ def test_streaming_response_create_overload_28(self, client: Orb) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_method_create_overload_29(self, client: Orb) -> None: + def test_method_create_overload_30(self, client: Orb) -> None: price = client.prices.create( cadence="annual", currency="currency", @@ -3232,7 +3334,7 @@ def test_method_create_overload_29(self, client: Orb) -> None: assert_matches_type(Price, price, path=["response"]) @parametrize - def test_method_create_with_all_params_overload_29(self, client: Orb) -> None: + def test_method_create_with_all_params_overload_30(self, client: Orb) -> None: price = client.prices.create( cadence="annual", currency="currency", @@ -3268,7 +3370,7 @@ def test_method_create_with_all_params_overload_29(self, client: Orb) -> None: assert_matches_type(Price, price, path=["response"]) @parametrize - def test_raw_response_create_overload_29(self, client: Orb) -> None: + def test_raw_response_create_overload_30(self, client: Orb) -> None: response = client.prices.with_raw_response.create( cadence="annual", currency="currency", @@ -3284,7 +3386,7 @@ def test_raw_response_create_overload_29(self, client: Orb) -> None: assert_matches_type(Price, price, path=["response"]) @parametrize - def test_streaming_response_create_overload_29(self, client: Orb) -> None: + def test_streaming_response_create_overload_30(self, client: Orb) -> None: with client.prices.with_streaming_response.create( cadence="annual", currency="currency", @@ -3302,7 +3404,7 @@ def test_streaming_response_create_overload_29(self, client: Orb) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_method_create_overload_30(self, client: Orb) -> None: + def test_method_create_overload_31(self, client: Orb) -> None: price = client.prices.create( cadence="annual", currency="currency", @@ -3314,7 +3416,7 @@ def test_method_create_overload_30(self, client: Orb) -> None: assert_matches_type(Price, price, path=["response"]) @parametrize - def test_method_create_with_all_params_overload_30(self, client: Orb) -> None: + def test_method_create_with_all_params_overload_31(self, client: Orb) -> None: price = client.prices.create( cadence="annual", currency="currency", @@ -3354,7 +3456,7 @@ def test_method_create_with_all_params_overload_30(self, client: Orb) -> None: assert_matches_type(Price, price, path=["response"]) @parametrize - def test_raw_response_create_overload_30(self, client: Orb) -> None: + def test_raw_response_create_overload_31(self, client: Orb) -> None: response = client.prices.with_raw_response.create( cadence="annual", currency="currency", @@ -3370,7 +3472,7 @@ def test_raw_response_create_overload_30(self, client: Orb) -> None: assert_matches_type(Price, price, path=["response"]) @parametrize - def test_streaming_response_create_overload_30(self, client: Orb) -> None: + def test_streaming_response_create_overload_31(self, client: Orb) -> None: with client.prices.with_streaming_response.create( cadence="annual", currency="currency", @@ -6864,6 +6966,108 @@ async def test_streaming_response_create_overload_27(self, async_client: AsyncOr @parametrize async def test_method_create_overload_28(self, async_client: AsyncOrb) -> None: + price = await async_client.prices.create( + cadence="annual", + cumulative_grouped_allocation_config={ + "cumulative_allocation": "cumulative_allocation", + "group_allocation": "group_allocation", + "grouping_key": "x", + "unit_amount": "unit_amount", + }, + currency="currency", + item_id="item_id", + model_type="cumulative_grouped_allocation", + name="Annual fee", + ) + assert_matches_type(Price, price, path=["response"]) + + @parametrize + async def test_method_create_with_all_params_overload_28(self, async_client: AsyncOrb) -> None: + price = await async_client.prices.create( + cadence="annual", + cumulative_grouped_allocation_config={ + "cumulative_allocation": "cumulative_allocation", + "group_allocation": "group_allocation", + "grouping_key": "x", + "unit_amount": "unit_amount", + }, + currency="currency", + item_id="item_id", + model_type="cumulative_grouped_allocation", + name="Annual fee", + billable_metric_id="billable_metric_id", + billed_in_advance=True, + billing_cycle_configuration={ + "duration": 0, + "duration_unit": "day", + }, + conversion_rate=0, + conversion_rate_config={ + "conversion_rate_type": "unit", + "unit_config": {"unit_amount": "unit_amount"}, + }, + 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"}, + ) + assert_matches_type(Price, price, path=["response"]) + + @parametrize + async def test_raw_response_create_overload_28(self, async_client: AsyncOrb) -> None: + response = await async_client.prices.with_raw_response.create( + cadence="annual", + cumulative_grouped_allocation_config={ + "cumulative_allocation": "cumulative_allocation", + "group_allocation": "group_allocation", + "grouping_key": "x", + "unit_amount": "unit_amount", + }, + currency="currency", + item_id="item_id", + model_type="cumulative_grouped_allocation", + name="Annual fee", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + price = response.parse() + assert_matches_type(Price, price, path=["response"]) + + @parametrize + async def test_streaming_response_create_overload_28(self, async_client: AsyncOrb) -> None: + async with async_client.prices.with_streaming_response.create( + cadence="annual", + cumulative_grouped_allocation_config={ + "cumulative_allocation": "cumulative_allocation", + "group_allocation": "group_allocation", + "grouping_key": "x", + "unit_amount": "unit_amount", + }, + currency="currency", + item_id="item_id", + model_type="cumulative_grouped_allocation", + name="Annual fee", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + price = await response.parse() + assert_matches_type(Price, price, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_create_overload_29(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", currency="currency", @@ -6875,7 +7079,7 @@ async def test_method_create_overload_28(self, async_client: AsyncOrb) -> None: assert_matches_type(Price, price, path=["response"]) @parametrize - async def test_method_create_with_all_params_overload_28(self, async_client: AsyncOrb) -> None: + async def test_method_create_with_all_params_overload_29(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", currency="currency", @@ -6914,7 +7118,7 @@ async def test_method_create_with_all_params_overload_28(self, async_client: Asy assert_matches_type(Price, price, path=["response"]) @parametrize - async def test_raw_response_create_overload_28(self, async_client: AsyncOrb) -> None: + async def test_raw_response_create_overload_29(self, async_client: AsyncOrb) -> None: response = await async_client.prices.with_raw_response.create( cadence="annual", currency="currency", @@ -6930,7 +7134,7 @@ async def test_raw_response_create_overload_28(self, async_client: AsyncOrb) -> assert_matches_type(Price, price, path=["response"]) @parametrize - async def test_streaming_response_create_overload_28(self, async_client: AsyncOrb) -> None: + async def test_streaming_response_create_overload_29(self, async_client: AsyncOrb) -> None: async with async_client.prices.with_streaming_response.create( cadence="annual", currency="currency", @@ -6948,7 +7152,7 @@ async def test_streaming_response_create_overload_28(self, async_client: AsyncOr assert cast(Any, response.is_closed) is True @parametrize - async def test_method_create_overload_29(self, async_client: AsyncOrb) -> None: + async def test_method_create_overload_30(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", currency="currency", @@ -6960,7 +7164,7 @@ async def test_method_create_overload_29(self, async_client: AsyncOrb) -> None: assert_matches_type(Price, price, path=["response"]) @parametrize - async def test_method_create_with_all_params_overload_29(self, async_client: AsyncOrb) -> None: + async def test_method_create_with_all_params_overload_30(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", currency="currency", @@ -6996,7 +7200,7 @@ async def test_method_create_with_all_params_overload_29(self, async_client: Asy assert_matches_type(Price, price, path=["response"]) @parametrize - async def test_raw_response_create_overload_29(self, async_client: AsyncOrb) -> None: + async def test_raw_response_create_overload_30(self, async_client: AsyncOrb) -> None: response = await async_client.prices.with_raw_response.create( cadence="annual", currency="currency", @@ -7012,7 +7216,7 @@ async def test_raw_response_create_overload_29(self, async_client: AsyncOrb) -> assert_matches_type(Price, price, path=["response"]) @parametrize - async def test_streaming_response_create_overload_29(self, async_client: AsyncOrb) -> None: + async def test_streaming_response_create_overload_30(self, async_client: AsyncOrb) -> None: async with async_client.prices.with_streaming_response.create( cadence="annual", currency="currency", @@ -7030,7 +7234,7 @@ async def test_streaming_response_create_overload_29(self, async_client: AsyncOr assert cast(Any, response.is_closed) is True @parametrize - async def test_method_create_overload_30(self, async_client: AsyncOrb) -> None: + async def test_method_create_overload_31(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", currency="currency", @@ -7042,7 +7246,7 @@ async def test_method_create_overload_30(self, async_client: AsyncOrb) -> None: assert_matches_type(Price, price, path=["response"]) @parametrize - async def test_method_create_with_all_params_overload_30(self, async_client: AsyncOrb) -> None: + async def test_method_create_with_all_params_overload_31(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", currency="currency", @@ -7082,7 +7286,7 @@ async def test_method_create_with_all_params_overload_30(self, async_client: Asy assert_matches_type(Price, price, path=["response"]) @parametrize - async def test_raw_response_create_overload_30(self, async_client: AsyncOrb) -> None: + async def test_raw_response_create_overload_31(self, async_client: AsyncOrb) -> None: response = await async_client.prices.with_raw_response.create( cadence="annual", currency="currency", @@ -7098,7 +7302,7 @@ async def test_raw_response_create_overload_30(self, async_client: AsyncOrb) -> assert_matches_type(Price, price, path=["response"]) @parametrize - async def test_streaming_response_create_overload_30(self, async_client: AsyncOrb) -> None: + async def test_streaming_response_create_overload_31(self, async_client: AsyncOrb) -> None: async with async_client.prices.with_streaming_response.create( cadence="annual", currency="currency",