From 55cc8c80728bb3ed890ba6755a3668bbc473e10b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 13 Mar 2025 16:48:16 +0000 Subject: [PATCH 1/4] chore(internal): remove extra empty newlines (#587) --- pyproject.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 399b4e68..a97f2e50 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,6 @@ Homepage = "https://github.com/orbcorp/orb-python" Repository = "https://github.com/orbcorp/orb-python" - [tool.rye] managed = true # version pins are in requirements-dev.lock @@ -152,7 +151,6 @@ reportImplicitOverride = true reportImportCycles = false reportPrivateUsage = false - [tool.ruff] line-length = 120 output-format = "grouped" From 90163b24a6491e3681238288a19fe29a319cb7e0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 13 Mar 2025 19:26:17 +0000 Subject: [PATCH 2/4] chore(api): correctly support ExternalCustomerID array filter on Subscriptions.List (#589) --- .stats.yml | 2 +- src/orb/resources/subscriptions.py | 4 ++-- src/orb/types/subscription_list_params.py | 2 +- tests/api_resources/test_subscriptions.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index a9fd9444..c9a15c8a 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-979330185e8fda7b2bc2440075fe81c66132fc87ff3c548e93dd05db35ba3172.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-e3aeba4569f0d304b27804cc2cdd9888f3f58628fe426e206ab49e164e5417bd.yml diff --git a/src/orb/resources/subscriptions.py b/src/orb/resources/subscriptions.py index 83422a37..89c51e21 100644 --- a/src/orb/resources/subscriptions.py +++ b/src/orb/resources/subscriptions.py @@ -594,7 +594,7 @@ def list( created_at_lte: Union[str, datetime, None] | NotGiven = NOT_GIVEN, cursor: Optional[str] | NotGiven = NOT_GIVEN, customer_id: Optional[List[str]] | NotGiven = NOT_GIVEN, - external_customer_id: Optional[str] | NotGiven = NOT_GIVEN, + external_customer_id: Optional[List[str]] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, status: Optional[Literal["active", "ended", "upcoming"]] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -2608,7 +2608,7 @@ def list( created_at_lte: Union[str, datetime, None] | NotGiven = NOT_GIVEN, cursor: Optional[str] | NotGiven = NOT_GIVEN, customer_id: Optional[List[str]] | NotGiven = NOT_GIVEN, - external_customer_id: Optional[str] | NotGiven = NOT_GIVEN, + external_customer_id: Optional[List[str]] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, status: Optional[Literal["active", "ended", "upcoming"]] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. diff --git a/src/orb/types/subscription_list_params.py b/src/orb/types/subscription_list_params.py index 16a3a1af..2919bebb 100644 --- a/src/orb/types/subscription_list_params.py +++ b/src/orb/types/subscription_list_params.py @@ -29,7 +29,7 @@ class SubscriptionListParams(TypedDict, total=False): customer_id: Optional[List[str]] - external_customer_id: Optional[str] + external_customer_id: Optional[List[str]] limit: int """The number of items to fetch. Defaults to 20.""" diff --git a/tests/api_resources/test_subscriptions.py b/tests/api_resources/test_subscriptions.py index 89ac2bab..49b4ffdb 100644 --- a/tests/api_resources/test_subscriptions.py +++ b/tests/api_resources/test_subscriptions.py @@ -286,7 +286,7 @@ def test_method_list_with_all_params(self, client: Orb) -> None: created_at_lte=parse_datetime("2019-12-27T18:11:19.117Z"), cursor="cursor", customer_id=["string"], - external_customer_id="external_customer_id", + external_customer_id=["string"], limit=1, status="active", ) @@ -1432,7 +1432,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None created_at_lte=parse_datetime("2019-12-27T18:11:19.117Z"), cursor="cursor", customer_id=["string"], - external_customer_id="external_customer_id", + external_customer_id=["string"], limit=1, status="active", ) From 1848cf80341718b42dd0917d6a4fb06dca89f287 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Mar 2025 05:24:37 +0000 Subject: [PATCH 3/4] feat(api): api update (#590) --- .stats.yml | 2 +- src/orb/resources/credit_notes.py | 19 ++++++++++++++++++- src/orb/types/credit_note_list_params.py | 15 +++++++++++++-- tests/api_resources/test_credit_notes.py | 9 +++++++++ 4 files changed, 41 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index c9a15c8a..85c391c8 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-e3aeba4569f0d304b27804cc2cdd9888f3f58628fe426e206ab49e164e5417bd.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-aeb94d91af916dbff0132ee7c4501df9223609b19fef0398a1a495e7a432ee36.yml diff --git a/src/orb/resources/credit_notes.py b/src/orb/resources/credit_notes.py index cba989c3..efac90c7 100644 --- a/src/orb/resources/credit_notes.py +++ b/src/orb/resources/credit_notes.py @@ -2,7 +2,8 @@ from __future__ import annotations -from typing import Iterable, Optional +from typing import Union, Iterable, Optional +from datetime import datetime from typing_extensions import Literal import httpx @@ -101,6 +102,10 @@ def create( def list( self, *, + created_at_gt: Union[str, datetime, None] | NotGiven = NOT_GIVEN, + created_at_gte: Union[str, datetime, None] | NotGiven = NOT_GIVEN, + created_at_lt: Union[str, datetime, None] | NotGiven = NOT_GIVEN, + created_at_lte: Union[str, datetime, None] | NotGiven = NOT_GIVEN, cursor: Optional[str] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -140,6 +145,10 @@ def list( timeout=timeout, query=maybe_transform( { + "created_at_gt": created_at_gt, + "created_at_gte": created_at_gte, + "created_at_lt": created_at_lt, + "created_at_lte": created_at_lte, "cursor": cursor, "limit": limit, }, @@ -261,6 +270,10 @@ async def create( def list( self, *, + created_at_gt: Union[str, datetime, None] | NotGiven = NOT_GIVEN, + created_at_gte: Union[str, datetime, None] | NotGiven = NOT_GIVEN, + created_at_lt: Union[str, datetime, None] | NotGiven = NOT_GIVEN, + created_at_lte: Union[str, datetime, None] | NotGiven = NOT_GIVEN, cursor: Optional[str] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -300,6 +313,10 @@ def list( timeout=timeout, query=maybe_transform( { + "created_at_gt": created_at_gt, + "created_at_gte": created_at_gte, + "created_at_lt": created_at_lt, + "created_at_lte": created_at_lte, "cursor": cursor, "limit": limit, }, diff --git a/src/orb/types/credit_note_list_params.py b/src/orb/types/credit_note_list_params.py index fa1314af..eeeccfc8 100644 --- a/src/orb/types/credit_note_list_params.py +++ b/src/orb/types/credit_note_list_params.py @@ -2,13 +2,24 @@ from __future__ import annotations -from typing import Optional -from typing_extensions import TypedDict +from typing import Union, Optional +from datetime import datetime +from typing_extensions import Annotated, TypedDict + +from .._utils import PropertyInfo __all__ = ["CreditNoteListParams"] class CreditNoteListParams(TypedDict, total=False): + created_at_gt: Annotated[Union[str, datetime, None], PropertyInfo(alias="created_at[gt]", format="iso8601")] + + created_at_gte: Annotated[Union[str, datetime, None], PropertyInfo(alias="created_at[gte]", format="iso8601")] + + created_at_lt: Annotated[Union[str, datetime, None], PropertyInfo(alias="created_at[lt]", format="iso8601")] + + created_at_lte: Annotated[Union[str, datetime, None], PropertyInfo(alias="created_at[lte]", format="iso8601")] + cursor: Optional[str] """Cursor for pagination. diff --git a/tests/api_resources/test_credit_notes.py b/tests/api_resources/test_credit_notes.py index 08d07146..5d423210 100644 --- a/tests/api_resources/test_credit_notes.py +++ b/tests/api_resources/test_credit_notes.py @@ -9,6 +9,7 @@ from orb import Orb, AsyncOrb from orb.types import CreditNote +from orb._utils import parse_datetime from tests.utils import assert_matches_type from orb.pagination import SyncPage, AsyncPage @@ -86,6 +87,10 @@ def test_method_list(self, client: Orb) -> None: @parametrize def test_method_list_with_all_params(self, client: Orb) -> None: credit_note = client.credit_notes.list( + created_at_gt=parse_datetime("2019-12-27T18:11:19.117Z"), + created_at_gte=parse_datetime("2019-12-27T18:11:19.117Z"), + created_at_lt=parse_datetime("2019-12-27T18:11:19.117Z"), + created_at_lte=parse_datetime("2019-12-27T18:11:19.117Z"), cursor="cursor", limit=1, ) @@ -221,6 +226,10 @@ async def test_method_list(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None: credit_note = await async_client.credit_notes.list( + created_at_gt=parse_datetime("2019-12-27T18:11:19.117Z"), + created_at_gte=parse_datetime("2019-12-27T18:11:19.117Z"), + created_at_lt=parse_datetime("2019-12-27T18:11:19.117Z"), + created_at_lte=parse_datetime("2019-12-27T18:11:19.117Z"), cursor="cursor", limit=1, ) From 5b230f548e8dd351a5fdb4b8f07f6d82b4010025 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Mar 2025 05:25:05 +0000 Subject: [PATCH 4/4] release: 3.17.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 14 ++++++++++++++ pyproject.toml | 2 +- src/orb/_version.py | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2c220f1b..5522caae 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.16.0" + ".": "3.17.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 136e159c..4501b69e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 3.17.0 (2025-03-14) + +Full Changelog: [v3.16.0...v3.17.0](https://github.com/orbcorp/orb-python/compare/v3.16.0...v3.17.0) + +### Features + +* **api:** api update ([#590](https://github.com/orbcorp/orb-python/issues/590)) ([1848cf8](https://github.com/orbcorp/orb-python/commit/1848cf80341718b42dd0917d6a4fb06dca89f287)) + + +### Chores + +* **api:** correctly support ExternalCustomerID array filter on Subscriptions.List ([#589](https://github.com/orbcorp/orb-python/issues/589)) ([90163b2](https://github.com/orbcorp/orb-python/commit/90163b24a6491e3681238288a19fe29a319cb7e0)) +* **internal:** remove extra empty newlines ([#587](https://github.com/orbcorp/orb-python/issues/587)) ([55cc8c8](https://github.com/orbcorp/orb-python/commit/55cc8c80728bb3ed890ba6755a3668bbc473e10b)) + ## 3.16.0 (2025-03-11) Full Changelog: [v3.15.0...v3.16.0](https://github.com/orbcorp/orb-python/compare/v3.15.0...v3.16.0) diff --git a/pyproject.toml b/pyproject.toml index a97f2e50..69c64428 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "orb-billing" -version = "3.16.0" +version = "3.17.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 a2ec2097..ab183536 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.16.0" # x-release-please-version +__version__ = "3.17.0" # x-release-please-version