diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e0dc5001..1f73031b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.1.0" + ".": "3.2.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 8070692c..4de92a98 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 103 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-43a4d1d907fd25faa99fef58ba7afb3dd39fae36f955b29bfe27b4bfdaa0ee54.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-2824cb456b8e3a7ce1ea34aa37a2c8e63d5b70425a5863502ffe1e1b1ef7efaf.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 2fa426b8..2bf05dda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 3.2.0 (2025-02-11) + +Full Changelog: [v3.1.0...v3.2.0](https://github.com/orbcorp/orb-python/compare/v3.1.0...v3.2.0) + +### Features + +* **api:** api update ([#528](https://github.com/orbcorp/orb-python/issues/528)) ([091fd4c](https://github.com/orbcorp/orb-python/commit/091fd4cb9df5721bd0e80ecae6f145d6395cedce)) + ## 3.1.0 (2025-02-07) Full Changelog: [v3.0.0...v3.1.0](https://github.com/orbcorp/orb-python/compare/v3.0.0...v3.1.0) diff --git a/pyproject.toml b/pyproject.toml index 64859814..52c7efe5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "orb-billing" -version = "3.1.0" +version = "3.2.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 4418c2e3..e650f414 100644 --- a/src/orb/_version.py +++ b/src/orb/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "orb" -__version__ = "3.1.0" # x-release-please-version +__version__ = "3.2.0" # x-release-please-version diff --git a/src/orb/types/customers/balance_transaction_create_response.py b/src/orb/types/customers/balance_transaction_create_response.py index 09f688d0..37b07da1 100644 --- a/src/orb/types/customers/balance_transaction_create_response.py +++ b/src/orb/types/customers/balance_transaction_create_response.py @@ -32,6 +32,7 @@ class BalanceTransactionCreateResponse(BaseModel): "credit_note_applied", "credit_note_voided", "overpayment_refund", + "external_payment", ] amount: str diff --git a/src/orb/types/customers/balance_transaction_list_response.py b/src/orb/types/customers/balance_transaction_list_response.py index d5d3bb38..4f39b39d 100644 --- a/src/orb/types/customers/balance_transaction_list_response.py +++ b/src/orb/types/customers/balance_transaction_list_response.py @@ -32,6 +32,7 @@ class BalanceTransactionListResponse(BaseModel): "credit_note_applied", "credit_note_voided", "overpayment_refund", + "external_payment", ] amount: str diff --git a/src/orb/types/invoice.py b/src/orb/types/invoice.py index 0da763aa..d30fa9a2 100644 --- a/src/orb/types/invoice.py +++ b/src/orb/types/invoice.py @@ -136,6 +136,7 @@ class CustomerBalanceTransaction(BaseModel): "credit_note_applied", "credit_note_voided", "overpayment_refund", + "external_payment", ] amount: str diff --git a/src/orb/types/invoice_fetch_upcoming_response.py b/src/orb/types/invoice_fetch_upcoming_response.py index 64509902..fefafb59 100644 --- a/src/orb/types/invoice_fetch_upcoming_response.py +++ b/src/orb/types/invoice_fetch_upcoming_response.py @@ -136,6 +136,7 @@ class CustomerBalanceTransaction(BaseModel): "credit_note_applied", "credit_note_voided", "overpayment_refund", + "external_payment", ] amount: str diff --git a/src/orb/types/subscription_create_params.py b/src/orb/types/subscription_create_params.py index a6529dad..925ed3f3 100644 --- a/src/orb/types/subscription_create_params.py +++ b/src/orb/types/subscription_create_params.py @@ -18,6 +18,7 @@ "AddAdjustmentAdjustmentNewMinimum", "AddAdjustmentAdjustmentNewMaximum", "AddPrice", + "AddPriceAllocationPrice", "AddPriceDiscount", "AddPricePrice", "AddPricePriceNewSubscriptionUnitPrice", @@ -98,6 +99,7 @@ "ReplaceAdjustmentAdjustmentNewMinimum", "ReplaceAdjustmentAdjustmentNewMaximum", "ReplacePrice", + "ReplacePriceAllocationPrice", "ReplacePriceDiscount", "ReplacePricePrice", "ReplacePricePriceNewSubscriptionUnitPrice", @@ -427,6 +429,26 @@ class AddAdjustment(TypedDict, total=False): """ +class AddPriceAllocationPrice(TypedDict, total=False): + amount: Required[str] + """An amount of the currency to allocate to the customer at the specified cadence.""" + + cadence: Required[Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]] + """The cadence at which to allocate the amount to the customer.""" + + currency: Required[str] + """ + An ISO 4217 currency string or a custom pricing unit identifier in which to bill + this price. + """ + + expires_at_end_of_cadence: Required[bool] + """ + Whether the allocated amount should expire at the end of the cadence or roll + over to the next period. + """ + + class AddPriceDiscount(TypedDict, total=False): discount_type: Required[Literal["percentage", "usage", "amount"]] @@ -2211,6 +2233,9 @@ class AddPricePriceNewSubscriptionBulkWithProrationPrice(TypedDict, total=False) class AddPrice(TypedDict, total=False): + allocation_price: Optional[AddPriceAllocationPrice] + """The definition of a new allocation price to create and add to the subscription.""" + discounts: Optional[Iterable[AddPriceDiscount]] """[DEPRECATED] Use add_adjustments instead. @@ -2388,6 +2413,26 @@ class ReplaceAdjustment(TypedDict, total=False): """The id of the adjustment on the plan to replace in the subscription.""" +class ReplacePriceAllocationPrice(TypedDict, total=False): + amount: Required[str] + """An amount of the currency to allocate to the customer at the specified cadence.""" + + cadence: Required[Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]] + """The cadence at which to allocate the amount to the customer.""" + + currency: Required[str] + """ + An ISO 4217 currency string or a custom pricing unit identifier in which to bill + this price. + """ + + expires_at_end_of_cadence: Required[bool] + """ + Whether the allocated amount should expire at the end of the cadence or roll + over to the next period. + """ + + class ReplacePriceDiscount(TypedDict, total=False): discount_type: Required[Literal["percentage", "usage", "amount"]] @@ -4191,6 +4236,9 @@ class ReplacePrice(TypedDict, total=False): replaces_price_id: Required[str] """The id of the price on the plan to replace in the subscription.""" + allocation_price: Optional[ReplacePriceAllocationPrice] + """The definition of a new allocation price to create and add to the subscription.""" + discounts: Optional[Iterable[ReplacePriceDiscount]] """[DEPRECATED] Use add_adjustments instead. diff --git a/src/orb/types/subscription_schedule_plan_change_params.py b/src/orb/types/subscription_schedule_plan_change_params.py index 0b11cc12..b2fd7dff 100644 --- a/src/orb/types/subscription_schedule_plan_change_params.py +++ b/src/orb/types/subscription_schedule_plan_change_params.py @@ -18,6 +18,7 @@ "AddAdjustmentAdjustmentNewMinimum", "AddAdjustmentAdjustmentNewMaximum", "AddPrice", + "AddPriceAllocationPrice", "AddPriceDiscount", "AddPricePrice", "AddPricePriceNewSubscriptionUnitPrice", @@ -98,6 +99,7 @@ "ReplaceAdjustmentAdjustmentNewMinimum", "ReplaceAdjustmentAdjustmentNewMaximum", "ReplacePrice", + "ReplacePriceAllocationPrice", "ReplacePriceDiscount", "ReplacePricePrice", "ReplacePricePriceNewSubscriptionUnitPrice", @@ -427,6 +429,26 @@ class AddAdjustment(TypedDict, total=False): """ +class AddPriceAllocationPrice(TypedDict, total=False): + amount: Required[str] + """An amount of the currency to allocate to the customer at the specified cadence.""" + + cadence: Required[Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]] + """The cadence at which to allocate the amount to the customer.""" + + currency: Required[str] + """ + An ISO 4217 currency string or a custom pricing unit identifier in which to bill + this price. + """ + + expires_at_end_of_cadence: Required[bool] + """ + Whether the allocated amount should expire at the end of the cadence or roll + over to the next period. + """ + + class AddPriceDiscount(TypedDict, total=False): discount_type: Required[Literal["percentage", "usage", "amount"]] @@ -2211,6 +2233,9 @@ class AddPricePriceNewSubscriptionBulkWithProrationPrice(TypedDict, total=False) class AddPrice(TypedDict, total=False): + allocation_price: Optional[AddPriceAllocationPrice] + """The definition of a new allocation price to create and add to the subscription.""" + discounts: Optional[Iterable[AddPriceDiscount]] """[DEPRECATED] Use add_adjustments instead. @@ -2388,6 +2413,26 @@ class ReplaceAdjustment(TypedDict, total=False): """The id of the adjustment on the plan to replace in the subscription.""" +class ReplacePriceAllocationPrice(TypedDict, total=False): + amount: Required[str] + """An amount of the currency to allocate to the customer at the specified cadence.""" + + cadence: Required[Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]] + """The cadence at which to allocate the amount to the customer.""" + + currency: Required[str] + """ + An ISO 4217 currency string or a custom pricing unit identifier in which to bill + this price. + """ + + expires_at_end_of_cadence: Required[bool] + """ + Whether the allocated amount should expire at the end of the cadence or roll + over to the next period. + """ + + class ReplacePriceDiscount(TypedDict, total=False): discount_type: Required[Literal["percentage", "usage", "amount"]] @@ -4191,6 +4236,9 @@ class ReplacePrice(TypedDict, total=False): replaces_price_id: Required[str] """The id of the price on the plan to replace in the subscription.""" + allocation_price: Optional[ReplacePriceAllocationPrice] + """The definition of a new allocation price to create and add to the subscription.""" + discounts: Optional[Iterable[ReplacePriceDiscount]] """[DEPRECATED] Use add_adjustments instead. diff --git a/tests/api_resources/test_subscriptions.py b/tests/api_resources/test_subscriptions.py index ae7621ad..8e834c39 100644 --- a/tests/api_resources/test_subscriptions.py +++ b/tests/api_resources/test_subscriptions.py @@ -57,6 +57,12 @@ def test_method_create_with_all_params(self, client: Orb) -> None: ], add_prices=[ { + "allocation_price": { + "amount": "10.00", + "cadence": "one_time", + "currency": "USD", + "expires_at_end_of_cadence": True, + }, "discounts": [ { "discount_type": "percentage", @@ -145,6 +151,12 @@ def test_method_create_with_all_params(self, client: Orb) -> None: replace_prices=[ { "replaces_price_id": "replaces_price_id", + "allocation_price": { + "amount": "10.00", + "cadence": "one_time", + "currency": "USD", + "expires_at_end_of_cadence": True, + }, "discounts": [ { "discount_type": "percentage", @@ -710,6 +722,12 @@ def test_method_schedule_plan_change_with_all_params(self, client: Orb) -> None: ], add_prices=[ { + "allocation_price": { + "amount": "10.00", + "cadence": "one_time", + "currency": "USD", + "expires_at_end_of_cadence": True, + }, "discounts": [ { "discount_type": "percentage", @@ -793,6 +811,12 @@ def test_method_schedule_plan_change_with_all_params(self, client: Orb) -> None: replace_prices=[ { "replaces_price_id": "replaces_price_id", + "allocation_price": { + "amount": "10.00", + "cadence": "one_time", + "currency": "USD", + "expires_at_end_of_cadence": True, + }, "discounts": [ { "discount_type": "percentage", @@ -1169,6 +1193,12 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No ], add_prices=[ { + "allocation_price": { + "amount": "10.00", + "cadence": "one_time", + "currency": "USD", + "expires_at_end_of_cadence": True, + }, "discounts": [ { "discount_type": "percentage", @@ -1257,6 +1287,12 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No replace_prices=[ { "replaces_price_id": "replaces_price_id", + "allocation_price": { + "amount": "10.00", + "cadence": "one_time", + "currency": "USD", + "expires_at_end_of_cadence": True, + }, "discounts": [ { "discount_type": "percentage", @@ -1822,6 +1858,12 @@ async def test_method_schedule_plan_change_with_all_params(self, async_client: A ], add_prices=[ { + "allocation_price": { + "amount": "10.00", + "cadence": "one_time", + "currency": "USD", + "expires_at_end_of_cadence": True, + }, "discounts": [ { "discount_type": "percentage", @@ -1905,6 +1947,12 @@ async def test_method_schedule_plan_change_with_all_params(self, async_client: A replace_prices=[ { "replaces_price_id": "replaces_price_id", + "allocation_price": { + "amount": "10.00", + "cadence": "one_time", + "currency": "USD", + "expires_at_end_of_cadence": True, + }, "discounts": [ { "discount_type": "percentage",