From 96715402bb54430a3e37a000f9fa3a092e310e9e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 14:34:27 +0000 Subject: [PATCH 1/4] chore(internal): bump pydantic dependency (#859) --- requirements-dev.lock | 4 ++-- requirements.lock | 4 ++-- src/increase/_types.py | 6 ++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/requirements-dev.lock b/requirements-dev.lock index 8e2af7ec..6e89e592 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -62,9 +62,9 @@ platformdirs==3.11.0 # via virtualenv pluggy==1.5.0 # via pytest -pydantic==2.9.2 +pydantic==2.10.3 # via increase -pydantic-core==2.23.4 +pydantic-core==2.27.1 # via pydantic pygments==2.18.0 # via rich diff --git a/requirements.lock b/requirements.lock index 807b908c..a1809fbc 100644 --- a/requirements.lock +++ b/requirements.lock @@ -30,9 +30,9 @@ httpx==0.25.2 idna==3.4 # via anyio # via httpx -pydantic==2.9.2 +pydantic==2.10.3 # via increase -pydantic-core==2.23.4 +pydantic-core==2.27.1 # via pydantic sniffio==1.3.0 # via anyio diff --git a/src/increase/_types.py b/src/increase/_types.py index 71290311..dac505fb 100644 --- a/src/increase/_types.py +++ b/src/increase/_types.py @@ -192,10 +192,8 @@ def get(self, __key: str) -> str | None: ... StrBytesIntFloat = Union[str, bytes, int, float] # Note: copied from Pydantic -# https://github.com/pydantic/pydantic/blob/32ea570bf96e84234d2992e1ddf40ab8a565925a/pydantic/main.py#L49 -IncEx: TypeAlias = Union[ - Set[int], Set[str], Mapping[int, Union["IncEx", Literal[True]]], Mapping[str, Union["IncEx", Literal[True]]] -] +# https://github.com/pydantic/pydantic/blob/6f31f8f68ef011f84357330186f603ff295312fd/pydantic/main.py#L79 +IncEx: TypeAlias = Union[Set[int], Set[str], Mapping[int, Union["IncEx", bool]], Mapping[str, Union["IncEx", bool]]] PostParser = Callable[[Any], Any] From 426b32c2e60f38f123d05d40a3a8ec5db4fc0aee Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 18:15:16 +0000 Subject: [PATCH 2/4] docs(readme): fix http client proxies example (#861) --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 064156d1..3bd7faa6 100644 --- a/README.md +++ b/README.md @@ -386,18 +386,19 @@ can also get all the extra fields on the Pydantic model as a dict with You can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including: -- Support for proxies -- Custom transports +- Support for [proxies](https://www.python-httpx.org/advanced/proxies/) +- Custom [transports](https://www.python-httpx.org/advanced/transports/) - Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality ```python +import httpx from increase import Increase, DefaultHttpxClient client = Increase( # Or use the `INCREASE_BASE_URL` env var base_url="http://my.test.server.example.com:8083", http_client=DefaultHttpxClient( - proxies="http://my.test.proxy.example.com", + proxy="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0"), ), ) From 16f7ea203f2a33d3b9f40a7d2a71c535c78d2536 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 23:29:49 +0000 Subject: [PATCH 3/4] feat(api): api update (#862) --- .stats.yml | 2 +- src/increase/resources/bookkeeping_entries.py | 8 ++++++++ src/increase/types/bookkeeping_entry_list_params.py | 3 +++ tests/api_resources/test_bookkeeping_entries.py | 2 ++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index bf1915dc..1b56b62b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-120670f0bcb7ab318b5b09e639e25e243d2cb7a630a27aebb4f94395b1fc337b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-92b3218777bbba277b31ea137f39b68f565e6ad3c653aca0f2d30db51e5fe3c7.yml diff --git a/src/increase/resources/bookkeeping_entries.py b/src/increase/resources/bookkeeping_entries.py index be096e4c..dbeb8d91 100644 --- a/src/increase/resources/bookkeeping_entries.py +++ b/src/increase/resources/bookkeeping_entries.py @@ -82,6 +82,7 @@ def retrieve( def list( self, *, + account_id: str | NotGiven = NOT_GIVEN, cursor: 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. @@ -95,6 +96,8 @@ def list( List Bookkeeping Entries Args: + account_id: The identifier for the Bookkeeping Account to filter by. + cursor: Return the page of entries after this one. limit: Limit the size of the list that is returned. The default (and maximum) is 100 @@ -118,6 +121,7 @@ def list( timeout=timeout, query=maybe_transform( { + "account_id": account_id, "cursor": cursor, "limit": limit, }, @@ -188,6 +192,7 @@ async def retrieve( def list( self, *, + account_id: str | NotGiven = NOT_GIVEN, cursor: 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. @@ -201,6 +206,8 @@ def list( List Bookkeeping Entries Args: + account_id: The identifier for the Bookkeeping Account to filter by. + cursor: Return the page of entries after this one. limit: Limit the size of the list that is returned. The default (and maximum) is 100 @@ -224,6 +231,7 @@ def list( timeout=timeout, query=maybe_transform( { + "account_id": account_id, "cursor": cursor, "limit": limit, }, diff --git a/src/increase/types/bookkeeping_entry_list_params.py b/src/increase/types/bookkeeping_entry_list_params.py index c0550e5a..243b9bf9 100644 --- a/src/increase/types/bookkeeping_entry_list_params.py +++ b/src/increase/types/bookkeeping_entry_list_params.py @@ -8,6 +8,9 @@ class BookkeepingEntryListParams(TypedDict, total=False): + account_id: str + """The identifier for the Bookkeeping Account to filter by.""" + cursor: str """Return the page of entries after this one.""" diff --git a/tests/api_resources/test_bookkeeping_entries.py b/tests/api_resources/test_bookkeeping_entries.py index 8d7b8942..4d48e6d3 100644 --- a/tests/api_resources/test_bookkeeping_entries.py +++ b/tests/api_resources/test_bookkeeping_entries.py @@ -64,6 +64,7 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: bookkeeping_entry = client.bookkeeping_entries.list( + account_id="account_id", cursor="cursor", limit=1, ) @@ -139,6 +140,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: bookkeeping_entry = await async_client.bookkeeping_entries.list( + account_id="account_id", cursor="cursor", limit=1, ) From 2f6082c4708a07d09a8070647d154a09c844756d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 23:30:13 +0000 Subject: [PATCH 4/4] release: 0.167.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 18 ++++++++++++++++++ pyproject.toml | 2 +- src/increase/_version.py | 2 +- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bc66e223..17511e3d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.166.0" + ".": "0.167.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index ed9e403b..92f8559e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## 0.167.0 (2024-12-09) + +Full Changelog: [v0.166.0...v0.167.0](https://github.com/Increase/increase-python/compare/v0.166.0...v0.167.0) + +### Features + +* **api:** api update ([#862](https://github.com/Increase/increase-python/issues/862)) ([16f7ea2](https://github.com/Increase/increase-python/commit/16f7ea203f2a33d3b9f40a7d2a71c535c78d2536)) + + +### Chores + +* **internal:** bump pydantic dependency ([#859](https://github.com/Increase/increase-python/issues/859)) ([9671540](https://github.com/Increase/increase-python/commit/96715402bb54430a3e37a000f9fa3a092e310e9e)) + + +### Documentation + +* **readme:** fix http client proxies example ([#861](https://github.com/Increase/increase-python/issues/861)) ([426b32c](https://github.com/Increase/increase-python/commit/426b32c2e60f38f123d05d40a3a8ec5db4fc0aee)) + ## 0.166.0 (2024-12-04) Full Changelog: [v0.165.1...v0.166.0](https://github.com/Increase/increase-python/compare/v0.165.1...v0.166.0) diff --git a/pyproject.toml b/pyproject.toml index 5256f366..59acf8f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.166.0" +version = "0.167.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 34fb8ca2..8768317b 100644 --- a/src/increase/_version.py +++ b/src/increase/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "increase" -__version__ = "0.166.0" # x-release-please-version +__version__ = "0.167.0" # x-release-please-version