Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.264.0"
".": "0.265.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 202
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f0b14ed0b6857930b2bbb80a8a0580dff2aad5510240f608ea9385a8b1d1b66b.yml
openapi_spec_hash: ea869bb98167424f60f8ef006da70945
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c9d527ceb849bd9a01edc968016381f25fcc375a1409eb113d7e876ae0f2f529.yml
openapi_spec_hash: c7820089282fc6db267d08eaa465075f
config_hash: a185e9a72778cc4658ea73fb3a7f1354
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 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)

### Features

* **api:** api update ([be16bbc](https://github.com/Increase/increase-python/commit/be16bbced78ed0b436c24b7ccd50196c1c0fbf45))


### Bug Fixes

* **client:** don't send Content-Type header on GET requests ([da21209](https://github.com/Increase/increase-python/commit/da21209f9c88bcc9874f8c63ab7385c644c946a0))

## 0.264.0 (2025-07-10)

Full Changelog: [v0.263.0...v0.264.0](https://github.com/Increase/increase-python/compare/v0.263.0...v0.264.0)
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "increase"
version = "0.264.0"
version = "0.265.0"
description = "The official Python library for the increase API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down Expand Up @@ -39,7 +39,7 @@ Homepage = "https://github.com/Increase/increase-python"
Repository = "https://github.com/Increase/increase-python"

[project.optional-dependencies]
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.6"]
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]

[tool.rye]
managed = true
Expand Down
11 changes: 9 additions & 2 deletions src/increase/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,15 @@ def _build_request(
# work around https://github.com/encode/httpx/discussions/2880
kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")}

is_body_allowed = options.method.lower() != "get"

if is_body_allowed:
kwargs["json"] = json_data if is_given(json_data) else None
kwargs["files"] = files
else:
headers.pop("Content-Type", None)
kwargs.pop("data", None)

# TODO: report this error to httpx
return self._client.build_request( # pyright: ignore[reportUnknownMemberType]
headers=headers,
Expand All @@ -540,8 +549,6 @@ def _build_request(
# so that passing a `TypedDict` doesn't cause an error.
# https://github.com/microsoft/pyright/issues/3526#event-6715453066
params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None,
json=json_data if is_given(json_data) else None,
files=files,
**kwargs,
)

Expand Down
2 changes: 1 addition & 1 deletion src/increase/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "increase"
__version__ = "0.264.0" # x-release-please-version
__version__ = "0.265.0" # x-release-please-version
28 changes: 28 additions & 0 deletions src/increase/resources/simulations/programs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from __future__ import annotations

from typing_extensions import Literal

import httpx

from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
Expand Down Expand Up @@ -45,6 +47,10 @@ def create(
self,
*,
name: str,
bank: Literal[
"blue_ridge_bank", "core_bank", "first_internet_bank", "global_innovations_bank", "grasshopper_bank"
]
| NotGiven = NOT_GIVEN,
reserve_account_id: 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.
Expand All @@ -64,6 +70,14 @@ def create(
Args:
name: The name of the program being added.

bank: The bank for the program's accounts, defaults to First Internet Bank.

- `blue_ridge_bank` - Blue Ridge Bank, N.A.
- `core_bank` - Core Bank
- `first_internet_bank` - First Internet Bank of Indiana
- `global_innovations_bank` - Global Innovations Bank
- `grasshopper_bank` - Grasshopper Bank

reserve_account_id: The identifier of the Account the Program should be added to is for.

extra_headers: Send extra headers
Expand All @@ -81,6 +95,7 @@ def create(
body=maybe_transform(
{
"name": name,
"bank": bank,
"reserve_account_id": reserve_account_id,
},
program_create_params.ProgramCreateParams,
Expand Down Expand Up @@ -120,6 +135,10 @@ async def create(
self,
*,
name: str,
bank: Literal[
"blue_ridge_bank", "core_bank", "first_internet_bank", "global_innovations_bank", "grasshopper_bank"
]
| NotGiven = NOT_GIVEN,
reserve_account_id: 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.
Expand All @@ -139,6 +158,14 @@ async def create(
Args:
name: The name of the program being added.

bank: The bank for the program's accounts, defaults to First Internet Bank.

- `blue_ridge_bank` - Blue Ridge Bank, N.A.
- `core_bank` - Core Bank
- `first_internet_bank` - First Internet Bank of Indiana
- `global_innovations_bank` - Global Innovations Bank
- `grasshopper_bank` - Grasshopper Bank

reserve_account_id: The identifier of the Account the Program should be added to is for.

extra_headers: Send extra headers
Expand All @@ -156,6 +183,7 @@ async def create(
body=await async_maybe_transform(
{
"name": name,
"bank": bank,
"reserve_account_id": reserve_account_id,
},
program_create_params.ProgramCreateParams,
Expand Down
12 changes: 11 additions & 1 deletion src/increase/types/simulations/program_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing_extensions import Required, TypedDict
from typing_extensions import Literal, Required, TypedDict

__all__ = ["ProgramCreateParams"]

Expand All @@ -11,5 +11,15 @@ class ProgramCreateParams(TypedDict, total=False):
name: Required[str]
"""The name of the program being added."""

bank: Literal["blue_ridge_bank", "core_bank", "first_internet_bank", "global_innovations_bank", "grasshopper_bank"]
"""The bank for the program's accounts, defaults to First Internet Bank.

- `blue_ridge_bank` - Blue Ridge Bank, N.A.
- `core_bank` - Core Bank
- `first_internet_bank` - First Internet Bank of Indiana
- `global_innovations_bank` - Global Innovations Bank
- `grasshopper_bank` - Grasshopper Bank
"""

reserve_account_id: str
"""The identifier of the Account the Program should be added to is for."""
2 changes: 2 additions & 0 deletions tests/api_resources/simulations/test_programs.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def test_method_create(self, client: Increase) -> None:
def test_method_create_with_all_params(self, client: Increase) -> None:
program = client.simulations.programs.create(
name="For Benefit Of",
bank="blue_ridge_bank",
reserve_account_id="reserve_account_id",
)
assert_matches_type(Program, program, path=["response"])
Expand Down Expand Up @@ -73,6 +74,7 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None:
async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None:
program = await async_client.simulations.programs.create(
name="For Benefit Of",
bank="blue_ridge_bank",
reserve_account_id="reserve_account_id",
)
assert_matches_type(Program, program, path=["response"])
Expand Down
4 changes: 2 additions & 2 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def test_request_extra_query(self) -> None:
def test_multipart_repeating_array(self, client: Increase) -> None:
request = client._build_request(
FinalRequestOptions.construct(
method="get",
method="post",
url="/foo",
headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"},
json_data={"array": ["foo", "bar"]},
Expand Down Expand Up @@ -1310,7 +1310,7 @@ def test_request_extra_query(self) -> None:
def test_multipart_repeating_array(self, async_client: AsyncIncrease) -> None:
request = async_client._build_request(
FinalRequestOptions.construct(
method="get",
method="post",
url="/foo",
headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"},
json_data={"array": ["foo", "bar"]},
Expand Down