diff --git a/.release-please-manifest.json b/.release-please-manifest.json index cd95c250..1b159305 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.28.0" + ".": "4.29.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 320998e1..f2277cfc 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-828c91953d2351040fdd4d90a3d9eafd09f9d240c4f6ce0441b7a10c06c1c722.yml -openapi_spec_hash: c82bc88563f80f600e59e22014d4cec4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-cbce25283cb9c3282e03e08b7ee81395436af7d0eb480ffcbab307b5bf1c92a0.yml +openapi_spec_hash: c286edf46db95dee05eb6f180ac24ab0 config_hash: 1f73a949b649ecfe6ec68ba1bb459dc2 diff --git a/CHANGELOG.md b/CHANGELOG.md index adb7cef7..723673da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 4.29.0 (2025-10-23) + +Full Changelog: [v4.28.0...v4.29.0](https://github.com/orbcorp/orb-python/compare/v4.28.0...v4.29.0) + +### Features + +* **api:** api update ([9b86b32](https://github.com/orbcorp/orb-python/commit/9b86b32f9283071ad1a482e593563013a097a355)) + ## 4.28.0 (2025-10-17) Full Changelog: [v4.27.0...v4.28.0](https://github.com/orbcorp/orb-python/compare/v4.27.0...v4.28.0) diff --git a/pyproject.toml b/pyproject.toml index 1073fe47..1a6de0e4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "orb-billing" -version = "4.28.0" +version = "4.29.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 c5f6c105..4e1e9193 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.28.0" # x-release-please-version +__version__ = "4.29.0" # x-release-please-version diff --git a/src/orb/resources/subscription_changes.py b/src/orb/resources/subscription_changes.py index b5eea975..0709fa58 100644 --- a/src/orb/resources/subscription_changes.py +++ b/src/orb/resources/subscription_changes.py @@ -2,7 +2,8 @@ from __future__ import annotations -from typing import Optional +from typing import Union, Optional +from datetime import date import httpx @@ -90,6 +91,9 @@ def apply( *, description: Optional[str] | Omit = omit, mark_as_paid: Optional[bool] | Omit = omit, + payment_external_id: Optional[str] | Omit = omit, + payment_notes: Optional[str] | Omit = omit, + payment_received_date: Union[str, date, None] | 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. @@ -111,6 +115,14 @@ def apply( 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. + payment_external_id: An optional external ID to associate with the payment. Only applicable when + mark_as_paid is true. + + payment_notes: Optional notes about the payment. Only applicable when mark_as_paid is true. + + payment_received_date: A date string to specify the date the payment was received. Only applicable when + mark_as_paid is true. If not provided, defaults to the current date. + 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. @@ -134,6 +146,9 @@ def apply( { "description": description, "mark_as_paid": mark_as_paid, + "payment_external_id": payment_external_id, + "payment_notes": payment_notes, + "payment_received_date": payment_received_date, "previously_collected_amount": previously_collected_amount, }, subscription_change_apply_params.SubscriptionChangeApplyParams, @@ -263,6 +278,9 @@ async def apply( *, description: Optional[str] | Omit = omit, mark_as_paid: Optional[bool] | Omit = omit, + payment_external_id: Optional[str] | Omit = omit, + payment_notes: Optional[str] | Omit = omit, + payment_received_date: Union[str, date, None] | 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. @@ -284,6 +302,14 @@ async def apply( 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. + payment_external_id: An optional external ID to associate with the payment. Only applicable when + mark_as_paid is true. + + payment_notes: Optional notes about the payment. Only applicable when mark_as_paid is true. + + payment_received_date: A date string to specify the date the payment was received. Only applicable when + mark_as_paid is true. If not provided, defaults to the current date. + 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. @@ -307,6 +333,9 @@ async def apply( { "description": description, "mark_as_paid": mark_as_paid, + "payment_external_id": payment_external_id, + "payment_notes": payment_notes, + "payment_received_date": payment_received_date, "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 6c0ebed2..21142c0c 100644 --- a/src/orb/types/subscription_change_apply_params.py +++ b/src/orb/types/subscription_change_apply_params.py @@ -2,8 +2,11 @@ from __future__ import annotations -from typing import Optional -from typing_extensions import TypedDict +from typing import Union, Optional +from datetime import date +from typing_extensions import Annotated, TypedDict + +from .._utils import PropertyInfo __all__ = ["SubscriptionChangeApplyParams"] @@ -19,6 +22,22 @@ class SubscriptionChangeApplyParams(TypedDict, total=False): customer's balance. """ + payment_external_id: Optional[str] + """An optional external ID to associate with the payment. + + Only applicable when mark_as_paid is true. + """ + + payment_notes: Optional[str] + """Optional notes about the payment. Only applicable when mark_as_paid is true.""" + + payment_received_date: Annotated[Union[str, date, None], PropertyInfo(format="iso8601")] + """A date string to specify the date the payment was received. + + Only applicable when mark_as_paid is true. If not provided, defaults to the + current date. + """ + previously_collected_amount: Optional[str] """Amount already collected to apply to the customer's balance. diff --git a/tests/api_resources/test_subscription_changes.py b/tests/api_resources/test_subscription_changes.py index e69a7514..5b6fc868 100644 --- a/tests/api_resources/test_subscription_changes.py +++ b/tests/api_resources/test_subscription_changes.py @@ -13,6 +13,7 @@ SubscriptionChangeCancelResponse, SubscriptionChangeRetrieveResponse, ) +from orb._utils import parse_date from tests.utils import assert_matches_type base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -74,6 +75,9 @@ def test_method_apply_with_all_params(self, client: Orb) -> None: subscription_change_id="subscription_change_id", description="description", mark_as_paid=True, + payment_external_id="payment_external_id", + payment_notes="payment_notes", + payment_received_date=parse_date("2019-12-27"), previously_collected_amount="previously_collected_amount", ) assert_matches_type(SubscriptionChangeApplyResponse, subscription_change, path=["response"]) @@ -210,6 +214,9 @@ async def test_method_apply_with_all_params(self, async_client: AsyncOrb) -> Non subscription_change_id="subscription_change_id", description="description", mark_as_paid=True, + payment_external_id="payment_external_id", + payment_notes="payment_notes", + payment_received_date=parse_date("2019-12-27"), previously_collected_amount="previously_collected_amount", ) assert_matches_type(SubscriptionChangeApplyResponse, subscription_change, path=["response"])