diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 72584123a..dfd2bb98a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.274.0" + ".": "0.275.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 931309613..00b0b5aa0 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-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 diff --git a/CHANGELOG.md b/CHANGELOG.md index f1a72d6c3..abcb505b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/pyproject.toml b/pyproject.toml index eb172cd7f..af1e7dca8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index a488ab79b..fd9e31201 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -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) diff --git a/src/increase/_files.py b/src/increase/_files.py index e0ed1db41..08afe4fac 100644 --- a/src/increase/_files.py +++ b/src/increase/_files.py @@ -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 @@ -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() diff --git a/src/increase/_version.py b/src/increase/_version.py index ace0261ad..9a933941f 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.274.0" # x-release-please-version +__version__ = "0.275.0" # x-release-please-version diff --git a/src/increase/resources/physical_card_profiles.py b/src/increase/resources/physical_card_profiles.py index 6b7c2b39a..e12191d9d 100644 --- a/src/increase/resources/physical_card_profiles.py +++ b/src/increase/resources/physical_card_profiles.py @@ -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, @@ -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 @@ -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, ), @@ -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, @@ -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 @@ -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, ), diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index 46c10eba8..4fdaeebb4 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -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 diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index bf2ea8aae..47559b358 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -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] diff --git a/src/increase/types/physical_card_profile_clone_params.py b/src/increase/types/physical_card_profile_clone_params.py index 3be52b966..917b9becf 100644 --- a/src/increase/types/physical_card_profile_clone_params.py +++ b/src/increase/types/physical_card_profile_clone_params.py @@ -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] diff --git a/tests/api_resources/test_physical_card_profiles.py b/tests/api_resources/test_physical_card_profiles.py index 1a0ebb7af..1e86b92f3 100644 --- a/tests/api_resources/test_physical_card_profiles.py +++ b/tests/api_resources/test_physical_card_profiles.py @@ -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"]) @@ -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"])