diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 052d78b7..647ed9ca 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.18.0" + ".": "4.19.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index d522ff7b..b0dfd8e3 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-42aa43f3893eef31a351e066bf0cf8c56da8c857ccbb45eb7dd58739ad43bd86.yml -openapi_spec_hash: e6b8c1e707036539d88a7b79af864a49 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-c075f748a7de8ecdccf11a8f2374682b0efd84f1318147274a838bf2fdd73b58.yml +openapi_spec_hash: ae918b8f348f1b7d3252a59dac36c453 config_hash: 1f73a949b649ecfe6ec68ba1bb459dc2 diff --git a/CHANGELOG.md b/CHANGELOG.md index c5ddb8dd..6ec8604e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 4.19.0 (2025-09-29) + +Full Changelog: [v4.18.0...v4.19.0](https://github.com/orbcorp/orb-python/compare/v4.18.0...v4.19.0) + +### Features + +* **api:** api update ([366b8ed](https://github.com/orbcorp/orb-python/commit/366b8edb91b4f8a8b897b22d2110ddd496fc5aa9)) + ## 4.18.0 (2025-09-19) Full Changelog: [v4.17.0...v4.18.0](https://github.com/orbcorp/orb-python/compare/v4.17.0...v4.18.0) diff --git a/pyproject.toml b/pyproject.toml index d9b8e377..20eccea2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "orb-billing" -version = "4.18.0" +version = "4.19.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 de68ab7c..a8e32a71 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.18.0" # x-release-please-version +__version__ = "4.19.0" # x-release-please-version diff --git a/src/orb/resources/subscription_changes.py b/src/orb/resources/subscription_changes.py index c68e425b..b5eea975 100644 --- a/src/orb/resources/subscription_changes.py +++ b/src/orb/resources/subscription_changes.py @@ -89,6 +89,7 @@ def apply( subscription_change_id: str, *, description: Optional[str] | Omit = omit, + mark_as_paid: Optional[bool] | Omit = omit, previously_collected_amount: 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. @@ -107,7 +108,11 @@ def apply( Args: description: Description to apply to the balance transaction representing this credit. - previously_collected_amount: Amount already collected to apply to the customer's balance. + mark_as_paid: Mark all pending invoices that are payable as paid. If amount is also provided, + mark as paid and credit the difference to the customer's balance. + + previously_collected_amount: Amount already collected to apply to the customer's balance. If mark_as_paid is + also provided, credit the difference to the customer's balance. extra_headers: Send extra headers @@ -128,6 +133,7 @@ def apply( body=maybe_transform( { "description": description, + "mark_as_paid": mark_as_paid, "previously_collected_amount": previously_collected_amount, }, subscription_change_apply_params.SubscriptionChangeApplyParams, @@ -256,6 +262,7 @@ async def apply( subscription_change_id: str, *, description: Optional[str] | Omit = omit, + mark_as_paid: Optional[bool] | Omit = omit, previously_collected_amount: 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. @@ -274,7 +281,11 @@ async def apply( Args: description: Description to apply to the balance transaction representing this credit. - previously_collected_amount: Amount already collected to apply to the customer's balance. + mark_as_paid: Mark all pending invoices that are payable as paid. If amount is also provided, + mark as paid and credit the difference to the customer's balance. + + previously_collected_amount: Amount already collected to apply to the customer's balance. If mark_as_paid is + also provided, credit the difference to the customer's balance. extra_headers: Send extra headers @@ -295,6 +306,7 @@ async def apply( body=await async_maybe_transform( { "description": description, + "mark_as_paid": mark_as_paid, "previously_collected_amount": previously_collected_amount, }, subscription_change_apply_params.SubscriptionChangeApplyParams, diff --git a/src/orb/types/subscription_change_apply_params.py b/src/orb/types/subscription_change_apply_params.py index a0f098fd..6c0ebed2 100644 --- a/src/orb/types/subscription_change_apply_params.py +++ b/src/orb/types/subscription_change_apply_params.py @@ -12,5 +12,16 @@ class SubscriptionChangeApplyParams(TypedDict, total=False): description: Optional[str] """Description to apply to the balance transaction representing this credit.""" + mark_as_paid: Optional[bool] + """Mark all pending invoices that are payable as paid. + + If amount is also provided, mark as paid and credit the difference to the + customer's balance. + """ + previously_collected_amount: Optional[str] - """Amount already collected to apply to the customer's balance.""" + """Amount already collected to apply to the customer's balance. + + If mark_as_paid is also provided, credit the difference to the customer's + balance. + """ diff --git a/tests/api_resources/test_subscription_changes.py b/tests/api_resources/test_subscription_changes.py index 68137cca..e69a7514 100644 --- a/tests/api_resources/test_subscription_changes.py +++ b/tests/api_resources/test_subscription_changes.py @@ -73,6 +73,7 @@ def test_method_apply_with_all_params(self, client: Orb) -> None: subscription_change = client.subscription_changes.apply( subscription_change_id="subscription_change_id", description="description", + mark_as_paid=True, previously_collected_amount="previously_collected_amount", ) assert_matches_type(SubscriptionChangeApplyResponse, subscription_change, path=["response"]) @@ -208,6 +209,7 @@ async def test_method_apply_with_all_params(self, async_client: AsyncOrb) -> Non subscription_change = await async_client.subscription_changes.apply( subscription_change_id="subscription_change_id", description="description", + mark_as_paid=True, previously_collected_amount="previously_collected_amount", ) assert_matches_type(SubscriptionChangeApplyResponse, subscription_change, path=["response"])