diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9a61761c..7723ed4f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.17.0" + ".": "2.18.0" } diff --git a/.stats.yml b/.stats.yml index bca80a58..fb63efe6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 97 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-e9785c0b77f4a91dd668d12d707abdaa63cc527029c9d62a92ac24ec40500d18.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-77e2e50c9fb438b08736da759f722f9d062ed3fad3183fb951eb1eee93fa93f5.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index acb6b6d7..4e83b691 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 2.18.0 (2024-12-03) + +Full Changelog: [v2.17.0...v2.18.0](https://github.com/orbcorp/orb-python/compare/v2.17.0...v2.18.0) + +### Features + +* **api:** api update ([#450](https://github.com/orbcorp/orb-python/issues/450)) ([0f5fabb](https://github.com/orbcorp/orb-python/commit/0f5fabbee9dbeee5203d4282d43816cbbc9a2e5c)) + + +### Chores + +* **internal:** bump pyright ([#449](https://github.com/orbcorp/orb-python/issues/449)) ([0de91b3](https://github.com/orbcorp/orb-python/commit/0de91b38c438fb2c9bb611d5047dec111d770433)) +* **internal:** codegen related update ([#448](https://github.com/orbcorp/orb-python/issues/448)) ([a9096c4](https://github.com/orbcorp/orb-python/commit/a9096c4d6f68f3829f870c535fee1b070db314b9)) +* **internal:** version bump ([#445](https://github.com/orbcorp/orb-python/issues/445)) ([67b0288](https://github.com/orbcorp/orb-python/commit/67b02886b84161966490b333253bfd9b231397dc)) + ## 2.17.0 (2024-11-28) Full Changelog: [v2.16.0...v2.17.0](https://github.com/orbcorp/orb-python/compare/v2.16.0...v2.17.0) diff --git a/pyproject.toml b/pyproject.toml index 373c2520..d8d75047 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "orb-billing" -version = "2.17.0" +version = "2.18.0" description = "The official Python library for the orb API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/requirements-dev.lock b/requirements-dev.lock index 67107cde..637727ec 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -68,7 +68,7 @@ pydantic-core==2.23.4 # via pydantic pygments==2.18.0 # via rich -pyright==1.1.380 +pyright==1.1.389 pytest==8.3.3 # via pytest-asyncio pytest-asyncio==0.24.0 @@ -97,6 +97,7 @@ typing-extensions==4.12.2 # via orb-billing # via pydantic # via pydantic-core + # via pyright virtualenv==20.24.5 # via nox zipp==3.17.0 diff --git a/src/orb/_version.py b/src/orb/_version.py index a619f812..f9bd1bfb 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__ = "2.17.0" # x-release-please-version +__version__ = "2.18.0" # x-release-please-version diff --git a/src/orb/pagination.py b/src/orb/pagination.py index df68690f..61cc363c 100644 --- a/src/orb/pagination.py +++ b/src/orb/pagination.py @@ -32,7 +32,8 @@ def _get_page_items(self) -> List[_T]: def next_page_info(self) -> Optional[PageInfo]: next_cursor = None if self.pagination_metadata is not None: # pyright: ignore[reportUnnecessaryComparison] - next_cursor = self.pagination_metadata.next_cursor + if self.pagination_metadata.next_cursor is not None: + next_cursor = self.pagination_metadata.next_cursor if not next_cursor: return None @@ -54,7 +55,8 @@ def _get_page_items(self) -> List[_T]: def next_page_info(self) -> Optional[PageInfo]: next_cursor = None if self.pagination_metadata is not None: # pyright: ignore[reportUnnecessaryComparison] - next_cursor = self.pagination_metadata.next_cursor + if self.pagination_metadata.next_cursor is not None: + next_cursor = self.pagination_metadata.next_cursor if not next_cursor: return None diff --git a/src/orb/resources/invoices.py b/src/orb/resources/invoices.py index a85c4c11..094e565d 100644 --- a/src/orb/resources/invoices.py +++ b/src/orb/resources/invoices.py @@ -243,6 +243,11 @@ def list( cursor: Cursor for pagination. This can be populated by the `next_cursor` value returned from the initial request. + due_date_window: Filters invoices by their due dates within a specific time range in the past. + Specify the range as a number followed by 'd' (days) or 'm' (months). For + example, '7d' filters invoices due in the last 7 days, and '2m' filters those + due in the last 2 months. + limit: The number of items to fetch. Defaults to 20. extra_headers: Send extra headers @@ -773,6 +778,11 @@ def list( cursor: Cursor for pagination. This can be populated by the `next_cursor` value returned from the initial request. + due_date_window: Filters invoices by their due dates within a specific time range in the past. + Specify the range as a number followed by 'd' (days) or 'm' (months). For + example, '7d' filters invoices due in the last 7 days, and '2m' filters those + due in the last 2 months. + limit: The number of items to fetch. Defaults to 20. extra_headers: Send extra headers diff --git a/src/orb/types/invoice_list_params.py b/src/orb/types/invoice_list_params.py index 31bc4111..3bc832ee 100644 --- a/src/orb/types/invoice_list_params.py +++ b/src/orb/types/invoice_list_params.py @@ -32,6 +32,12 @@ class InvoiceListParams(TypedDict, total=False): due_date: Annotated[Union[str, date, None], PropertyInfo(format="iso8601")] due_date_window: Optional[str] + """Filters invoices by their due dates within a specific time range in the past. + + Specify the range as a number followed by 'd' (days) or 'm' (months). For + example, '7d' filters invoices due in the last 7 days, and '2m' filters those + due in the last 2 months. + """ due_date_gt: Annotated[Union[str, date, None], PropertyInfo(alias="due_date[gt]", format="iso8601")]