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.274.0"
".": "0.275.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-743c412709d3e4ca1ed8b1e2107036c9658afe40dd538c0576f64ae302087b4f.yml
openapi_spec_hash: 2a5da3cdf8dfb91dbd0f875cc180a3a1
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5afe14a5606cebef2ccc6c4781d566b43509e01513e8e02e41adbdeaf3275f48.yml
openapi_spec_hash: 56857e37c0c6131096bf519d91ef76d2
config_hash: a185e9a72778cc4658ea73fb3a7f1354
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 0.275.0 (2025-08-01)

Full Changelog: [v0.274.0...v0.275.0](https://github.com/Increase/increase-python/compare/v0.274.0...v0.275.0)

### Features

* **api:** api update ([26aebdf](https://github.com/Increase/increase-python/commit/26aebdfc0bf005510b59bbb1b84cfff9974880f0))
* **api:** api update ([c6db894](https://github.com/Increase/increase-python/commit/c6db8947279f38f9b8f9ba4013ec8667af887581))
* **client:** support file upload requests ([f173973](https://github.com/Increase/increase-python/commit/f1739736717c6518de436f9122e22a2758a20a72))

## 0.274.0 (2025-07-29)

Full Changelog: [v0.273.0...v0.274.0](https://github.com/Increase/increase-python/compare/v0.273.0...v0.274.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "increase"
version = "0.274.0"
version = "0.275.0"
description = "The official Python library for the increase API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
5 changes: 4 additions & 1 deletion src/increase/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,10 @@ def _build_request(
is_body_allowed = options.method.lower() != "get"

if is_body_allowed:
kwargs["json"] = json_data if is_given(json_data) else None
if isinstance(json_data, bytes):
kwargs["content"] = json_data
else:
kwargs["json"] = json_data if is_given(json_data) else None
kwargs["files"] = files
else:
headers.pop("Content-Type", None)
Expand Down
8 changes: 4 additions & 4 deletions src/increase/_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ def _transform_file(file: FileTypes) -> HttpxFileTypes:
return file

if is_tuple_t(file):
return (file[0], _read_file_content(file[1]), *file[2:])
return (file[0], read_file_content(file[1]), *file[2:])

raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple")


def _read_file_content(file: FileContent) -> HttpxFileContent:
def read_file_content(file: FileContent) -> HttpxFileContent:
if isinstance(file, os.PathLike):
return pathlib.Path(file).read_bytes()
return file
Expand Down Expand Up @@ -111,12 +111,12 @@ async def _async_transform_file(file: FileTypes) -> HttpxFileTypes:
return file

if is_tuple_t(file):
return (file[0], await _async_read_file_content(file[1]), *file[2:])
return (file[0], await async_read_file_content(file[1]), *file[2:])

raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple")


async def _async_read_file_content(file: FileContent) -> HttpxFileContent:
async def async_read_file_content(file: FileContent) -> HttpxFileContent:
if isinstance(file, os.PathLike):
return await anyio.Path(file).read_bytes()

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.274.0" # x-release-please-version
__version__ = "0.275.0" # x-release-please-version
8 changes: 8 additions & 0 deletions src/increase/resources/physical_card_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ def clone(
description: str | NotGiven = NOT_GIVEN,
front_image_file_id: str | NotGiven = NOT_GIVEN,
front_text: physical_card_profile_clone_params.FrontText | NotGiven = NOT_GIVEN,
program_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.
extra_headers: Headers | None = None,
Expand All @@ -285,6 +286,8 @@ def clone(
front_text: Text printed on the front of the card. Reach out to
[support@increase.com](mailto:support@increase.com) for more information.

program_id: The identifier of the Program to use for the cloned Physical Card Profile.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -308,6 +311,7 @@ def clone(
"description": description,
"front_image_file_id": front_image_file_id,
"front_text": front_text,
"program_id": program_id,
},
physical_card_profile_clone_params.PhysicalCardProfileCloneParams,
),
Expand Down Expand Up @@ -556,6 +560,7 @@ async def clone(
description: str | NotGiven = NOT_GIVEN,
front_image_file_id: str | NotGiven = NOT_GIVEN,
front_text: physical_card_profile_clone_params.FrontText | NotGiven = NOT_GIVEN,
program_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.
extra_headers: Headers | None = None,
Expand All @@ -581,6 +586,8 @@ async def clone(
front_text: Text printed on the front of the card. Reach out to
[support@increase.com](mailto:support@increase.com) for more information.

program_id: The identifier of the Program to use for the cloned Physical Card Profile.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -604,6 +611,7 @@ async def clone(
"description": description,
"front_image_file_id": front_image_file_id,
"front_text": front_text,
"program_id": program_id,
},
physical_card_profile_clone_params.PhysicalCardProfileCloneParams,
),
Expand Down
7 changes: 5 additions & 2 deletions src/increase/types/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,13 @@ class GovernmentAuthority(BaseModel):
authorized_persons: List[GovernmentAuthorityAuthorizedPerson]
"""The identifying details of authorized persons of the government authority."""

category: Literal["municipality"]
category: Literal["municipality", "state_agency", "state_government", "federal_agency"]
"""The category of the government authority.

- `municipality` - The Public Entity is a Municipality.
- `municipality` - A municipality.
- `state_agency` - A state agency.
- `state_government` - A state government.
- `federal_agency` - A federal agency.
"""

name: str
Expand Down
7 changes: 5 additions & 2 deletions src/increase/types/entity_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,13 @@ class GovernmentAuthority(TypedDict, total=False):
authorized_persons: Required[Iterable[GovernmentAuthorityAuthorizedPerson]]
"""The identifying details of authorized officials acting on the entity's behalf."""

category: Required[Literal["municipality"]]
category: Required[Literal["municipality", "state_agency", "state_government", "federal_agency"]]
"""The category of the government authority.

- `municipality` - The Public Entity is a Municipality.
- `municipality` - A municipality.
- `state_agency` - A state agency.
- `state_government` - A state government.
- `federal_agency` - A federal agency.
"""

name: Required[str]
Expand Down
3 changes: 3 additions & 0 deletions src/increase/types/physical_card_profile_clone_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ class PhysicalCardProfileCloneParams(TypedDict, total=False):
information.
"""

program_id: str
"""The identifier of the Program to use for the cloned Physical Card Profile."""


class FrontText(TypedDict, total=False):
line1: Required[str]
Expand Down
2 changes: 2 additions & 0 deletions tests/api_resources/test_physical_card_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ def test_method_clone_with_all_params(self, client: Increase) -> None:
"line1": "x",
"line2": "x",
},
program_id="program_id",
)
assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"])

Expand Down Expand Up @@ -446,6 +447,7 @@ async def test_method_clone_with_all_params(self, async_client: AsyncIncrease) -
"line1": "x",
"line2": "x",
},
program_id="program_id",
)
assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"])

Expand Down