diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c8ed07941..a587f67dd 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.265.0" + ".": "0.266.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 076aae75a..b26d90908 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c9d527ceb849bd9a01edc968016381f25fcc375a1409eb113d7e876ae0f2f529.yml -openapi_spec_hash: c7820089282fc6db267d08eaa465075f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7f26440e2137fb4f39521c361e76d56bad7c56d81cd06d0677d7735e73f7c160.yml +openapi_spec_hash: aa475d425f493e41eb8485ae17a3d0f9 config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c5604f00..4f2c486af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 0.266.0 (2025-07-18) + +Full Changelog: [v0.265.0...v0.266.0](https://github.com/Increase/increase-python/compare/v0.265.0...v0.266.0) + +### Features + +* **api:** api update ([57fbc26](https://github.com/Increase/increase-python/commit/57fbc268c42bf896250f2e3222392c420eb4f91d)) +* clean up environment call outs ([a83de7e](https://github.com/Increase/increase-python/commit/a83de7ed9822100c5391c7af937accbba3bfdb23)) + ## 0.265.0 (2025-07-11) Full Changelog: [v0.264.0...v0.265.0](https://github.com/Increase/increase-python/compare/v0.264.0...v0.265.0) diff --git a/README.md b/README.md index 16abab576..0bac60aee 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,6 @@ pip install increase[aiohttp] Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`: ```python -import os import asyncio from increase import DefaultAioHttpClient from increase import AsyncIncrease @@ -97,7 +96,7 @@ from increase import AsyncIncrease async def main() -> None: async with AsyncIncrease( - api_key=os.environ.get("INCREASE_API_KEY"), # This is the default and can be omitted + api_key="My API Key", http_client=DefaultAioHttpClient(), ) as client: account = await client.accounts.create( diff --git a/pyproject.toml b/pyproject.toml index 3df61dac1..60ab96bed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.265.0" +version = "0.266.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 478d15b2e..243a8bbe0 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.265.0" # x-release-please-version +__version__ = "0.266.0" # x-release-please-version diff --git a/src/increase/resources/accounts.py b/src/increase/resources/accounts.py index c524fd217..b3a417e50 100644 --- a/src/increase/resources/accounts.py +++ b/src/increase/resources/accounts.py @@ -145,6 +145,7 @@ def update( self, account_id: str, *, + credit_limit: int | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, # 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. @@ -160,6 +161,9 @@ def update( Args: account_id: The identifier of the Account to update. + credit_limit: The new credit limit of the Account, if and only if the Account is a loan + account. + name: The new name of the Account. extra_headers: Send extra headers @@ -176,7 +180,13 @@ def update( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._patch( f"/accounts/{account_id}", - body=maybe_transform({"name": name}, account_update_params.AccountUpdateParams), + body=maybe_transform( + { + "credit_limit": credit_limit, + "name": name, + }, + account_update_params.AccountUpdateParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -464,6 +474,7 @@ async def update( self, account_id: str, *, + credit_limit: int | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, # 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. @@ -479,6 +490,9 @@ async def update( Args: account_id: The identifier of the Account to update. + credit_limit: The new credit limit of the Account, if and only if the Account is a loan + account. + name: The new name of the Account. extra_headers: Send extra headers @@ -495,7 +509,13 @@ async def update( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return await self._patch( f"/accounts/{account_id}", - body=await async_maybe_transform({"name": name}, account_update_params.AccountUpdateParams), + body=await async_maybe_transform( + { + "credit_limit": credit_limit, + "name": name, + }, + account_update_params.AccountUpdateParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/types/account_update_params.py b/src/increase/types/account_update_params.py index 86ec914d0..32eaaba0f 100644 --- a/src/increase/types/account_update_params.py +++ b/src/increase/types/account_update_params.py @@ -8,5 +8,11 @@ class AccountUpdateParams(TypedDict, total=False): + credit_limit: int + """ + The new credit limit of the Account, if and only if the Account is a loan + account. + """ + name: str """The new name of the Account.""" diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index f87c593ed..d445753d8 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -112,6 +112,7 @@ def test_method_update(self, client: Increase) -> None: def test_method_update_with_all_params(self, client: Increase) -> None: account = client.accounts.update( account_id="account_in71c4amph0vgo2qllky", + credit_limit=0, name="My renamed account", ) assert_matches_type(Account, account, path=["response"]) @@ -371,6 +372,7 @@ async def test_method_update(self, async_client: AsyncIncrease) -> None: async def test_method_update_with_all_params(self, async_client: AsyncIncrease) -> None: account = await async_client.accounts.update( account_id="account_in71c4amph0vgo2qllky", + credit_limit=0, name="My renamed account", ) assert_matches_type(Account, account, path=["response"])