diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ec2e07d..0a8072d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,14 @@ name: CI on: push: - branches-ignore: - - 'generated' - - 'codegen/**' - - 'integrated/**' - - 'stl-preview-head/**' - - 'stl-preview-base/**' + branches: + - '**' + - '!integrated/**' + - '!stl-preview-head/**' + - '!stl-preview-base/**' + - '!generated' + - '!codegen/**' + - 'codegen/stl/**' pull_request: branches-ignore: - 'stl-preview-head/**' diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 617f7502..124b9841 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.118.0" + ".": "0.119.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 1259727d..46156227 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 189 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-e88a4837037207e9591d48d534bd61acca57ca6e7c59ec0d4fdcf6e05288cc6d.yml -openapi_spec_hash: fd8bbc173d1b6dafd117fb1a3a3d446c -config_hash: 3005e2502301e77754e5e1455584525b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-5bb8d2bedef02f07498de3f252fa6da1393d2fb59f727b05828804cea9aded30.yml +openapi_spec_hash: d1f260252b3bb7ebc77fa7134db6c65d +config_hash: 400b9afe0f7f7b7d96177d05950775f9 diff --git a/CHANGELOG.md b/CHANGELOG.md index 45ef6455..b64673d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # Changelog +## 0.119.0 (2026-03-17) + +Full Changelog: [v0.118.0...v0.119.0](https://github.com/lithic-com/lithic-python/compare/v0.118.0...v0.119.0) + +### Features + +* **api:** add remittance_information field to payment wire attributes ([669e335](https://github.com/lithic-com/lithic-python/commit/669e335cc6b256343053ec177256d9a60819a287)) + + +### Bug Fixes + +* **deps:** bump minimum typing-extensions version ([26fb17c](https://github.com/lithic-com/lithic-python/commit/26fb17c88ea9eaf9158c44f8b75263fe0de3d08d)) +* **pydantic:** do not pass `by_alias` unless set ([cf205ce](https://github.com/lithic-com/lithic-python/commit/cf205ce9ac4e93542db0a9efcc5456f4e5f1774b)) +* **types:** make address/dob/email/government_id optional in KYB delegated types ([d2345a0](https://github.com/lithic-com/lithic-python/commit/d2345a077dc90995f973163c25ee898d5ac92195)) + + +### Chores + +* **internal:** tweak CI branches ([d18bbc8](https://github.com/lithic-com/lithic-python/commit/d18bbc894b759ff8c066403d21d195aa67468441)) + + +### Documentation + +* **api:** add pdf to supported file types for account holders document upload ([afcb77c](https://github.com/lithic-com/lithic-python/commit/afcb77c4ebd2bab497a04a2ecd112247f2c1215e)) + ## 0.118.0 (2026-03-16) Full Changelog: [v0.117.0...v0.118.0](https://github.com/lithic-com/lithic-python/compare/v0.117.0...v0.118.0) diff --git a/pyproject.toml b/pyproject.toml index 9df22bbb..28959094 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "lithic" -version = "0.118.0" +version = "0.119.0" description = "The official Python library for the lithic API" dynamic = ["readme"] license = "Apache-2.0" @@ -11,7 +11,7 @@ authors = [ dependencies = [ "httpx>=0.23.0, <1", "pydantic>=1.9.0, <3", - "typing-extensions>=4.10, <5", + "typing-extensions>=4.14, <5", "anyio>=3.5.0, <5", "distro>=1.7.0, <2", "sniffio", diff --git a/src/lithic/_compat.py b/src/lithic/_compat.py index 786ff42a..e6690a4f 100644 --- a/src/lithic/_compat.py +++ b/src/lithic/_compat.py @@ -2,7 +2,7 @@ from typing import TYPE_CHECKING, Any, Union, Generic, TypeVar, Callable, cast, overload from datetime import date, datetime -from typing_extensions import Self, Literal +from typing_extensions import Self, Literal, TypedDict import pydantic from pydantic.fields import FieldInfo @@ -131,6 +131,10 @@ def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str: return model.model_dump_json(indent=indent) +class _ModelDumpKwargs(TypedDict, total=False): + by_alias: bool + + def model_dump( model: pydantic.BaseModel, *, @@ -142,6 +146,9 @@ def model_dump( by_alias: bool | None = None, ) -> dict[str, Any]: if (not PYDANTIC_V1) or hasattr(model, "model_dump"): + kwargs: _ModelDumpKwargs = {} + if by_alias is not None: + kwargs["by_alias"] = by_alias return model.model_dump( mode=mode, exclude=exclude, @@ -149,7 +156,7 @@ def model_dump( exclude_defaults=exclude_defaults, # warnings are not supported in Pydantic v1 warnings=True if PYDANTIC_V1 else warnings, - by_alias=by_alias, + **kwargs, ) return cast( "dict[str, Any]", diff --git a/src/lithic/_version.py b/src/lithic/_version.py index 86511f28..e18b73b4 100644 --- a/src/lithic/_version.py +++ b/src/lithic/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "lithic" -__version__ = "0.118.0" # x-release-please-version +__version__ = "0.119.0" # x-release-please-version diff --git a/src/lithic/resources/account_holders/account_holders.py b/src/lithic/resources/account_holders/account_holders.py index a4de68a6..11a6c508 100644 --- a/src/lithic/resources/account_holders/account_holders.py +++ b/src/lithic/resources/account_holders/account_holders.py @@ -1078,8 +1078,8 @@ def upload_document( This endpoint is only valid for evaluations in a `PENDING_DOCUMENT` state. - Uploaded images must either be a `jpg` or `png` file, and each must be less than - 15 MiB. Once both required uploads have been successfully completed, your + Supported file types include `jpg`, `png`, and `pdf`. Each file must be less + than 15 MiB. Once both required uploads have been successfully completed, your document will be run through KYC verification. If you have registered a webhook, you will receive evaluation updates for any @@ -2156,8 +2156,8 @@ async def upload_document( This endpoint is only valid for evaluations in a `PENDING_DOCUMENT` state. - Uploaded images must either be a `jpg` or `png` file, and each must be less than - 15 MiB. Once both required uploads have been successfully completed, your + Supported file types include `jpg`, `png`, and `pdf`. Each file must be less + than 15 MiB. Once both required uploads have been successfully completed, your document will be run through KYC verification. If you have registered a webhook, you will receive evaluation updates for any diff --git a/src/lithic/types/account_holder_create_params.py b/src/lithic/types/account_holder_create_params.py index fca3dbe3..e227f2c3 100644 --- a/src/lithic/types/account_holder_create_params.py +++ b/src/lithic/types/account_holder_create_params.py @@ -301,27 +301,33 @@ class KYBDelegatedBusinessEntity(TypedDict, total=False): class KYBDelegatedBeneficialOwnerIndividual(TypedDict, total=False): - """Individuals associated with a KYB application. Phone number is optional.""" + """Individuals associated with a KYB_DELEGATED application. - address: Required[Address] + Only first and last name are required. + """ + + first_name: Required[str] + """Individual's first name, as it appears on government-issued identity documents.""" + + last_name: Required[str] + """Individual's last name, as it appears on government-issued identity documents.""" + + address: Address """ Individual's current address - PO boxes, UPS drops, and FedEx drops are not acceptable; APO/FPO are acceptable. Only USA addresses are currently supported. """ - dob: Required[str] + dob: str """Individual's date of birth, as an RFC 3339 date.""" - email: Required[str] + email: str """ Individual's email address. If utilizing Lithic for chargeback processing, this customer email address may be used to communicate dispute status and resolution. """ - first_name: Required[str] - """Individual's first name, as it appears on government-issued identity documents.""" - - government_id: Required[str] + government_id: str """ Government-issued identification number (required for identity verification and compliance with banking regulations). Social Security Numbers (SSN) and @@ -329,9 +335,6 @@ class KYBDelegatedBeneficialOwnerIndividual(TypedDict, total=False): entered as full nine-digits, with or without hyphens """ - last_name: Required[str] - """Individual's last name, as it appears on government-issued identity documents.""" - phone_number: str """Individual's phone number, entered in E.164 format.""" @@ -344,25 +347,28 @@ class KYBDelegatedControlPerson(TypedDict, total=False): See [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf) (Section II) for more background. """ - address: Required[Address] + first_name: Required[str] + """Individual's first name, as it appears on government-issued identity documents.""" + + last_name: Required[str] + """Individual's last name, as it appears on government-issued identity documents.""" + + address: Address """ Individual's current address - PO boxes, UPS drops, and FedEx drops are not acceptable; APO/FPO are acceptable. Only USA addresses are currently supported. """ - dob: Required[str] + dob: str """Individual's date of birth, as an RFC 3339 date.""" - email: Required[str] + email: str """ Individual's email address. If utilizing Lithic for chargeback processing, this customer email address may be used to communicate dispute status and resolution. """ - first_name: Required[str] - """Individual's first name, as it appears on government-issued identity documents.""" - - government_id: Required[str] + government_id: str """ Government-issued identification number (required for identity verification and compliance with banking regulations). Social Security Numbers (SSN) and @@ -370,9 +376,6 @@ class KYBDelegatedControlPerson(TypedDict, total=False): entered as full nine-digits, with or without hyphens """ - last_name: Required[str] - """Individual's last name, as it appears on government-issued identity documents.""" - phone_number: str """Individual's phone number, entered in E.164 format.""" diff --git a/src/lithic/types/payment.py b/src/lithic/types/payment.py index cec6116f..28463417 100644 --- a/src/lithic/types/payment.py +++ b/src/lithic/types/payment.py @@ -187,6 +187,9 @@ class MethodAttributesWireMethodAttributes(BaseModel): for tracking the message through the Fedwire system """ + remittance_information: Optional[str] = None + """Payment details or invoice reference""" + MethodAttributes: TypeAlias = Union[MethodAttributesACHMethodAttributes, MethodAttributesWireMethodAttributes] diff --git a/tests/api_resources/test_account_holders.py b/tests/api_resources/test_account_holders.py index e95517f1..5bd8e016 100644 --- a/tests/api_resources/test_account_holders.py +++ b/tests/api_resources/test_account_holders.py @@ -287,6 +287,8 @@ def test_method_create_with_all_params_overload_2(self, client: Lithic) -> None: }, beneficial_owner_individuals=[ { + "first_name": "Tom", + "last_name": "Bombadil", "address": { "address1": "123 Old Forest Way", "city": "Omaha", @@ -297,13 +299,13 @@ def test_method_create_with_all_params_overload_2(self, client: Lithic) -> None: }, "dob": "1991-03-08 08:00:00", "email": "tom@middle-earth.com", - "first_name": "Tom", "government_id": "111-23-1412", - "last_name": "Bombadil", "phone_number": "+15555555555", } ], control_person={ + "first_name": "Tom", + "last_name": "Bombadil", "address": { "address1": "123 Old Forest Way", "city": "Omaha", @@ -314,9 +316,7 @@ def test_method_create_with_all_params_overload_2(self, client: Lithic) -> None: }, "dob": "1991-03-08 08:00:00", "email": "tom@middle-earth.com", - "first_name": "Tom", "government_id": "111-23-1412", - "last_name": "Bombadil", "phone_number": "+15555555555", }, external_id="external_id", @@ -1344,6 +1344,8 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn }, beneficial_owner_individuals=[ { + "first_name": "Tom", + "last_name": "Bombadil", "address": { "address1": "123 Old Forest Way", "city": "Omaha", @@ -1354,13 +1356,13 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn }, "dob": "1991-03-08 08:00:00", "email": "tom@middle-earth.com", - "first_name": "Tom", "government_id": "111-23-1412", - "last_name": "Bombadil", "phone_number": "+15555555555", } ], control_person={ + "first_name": "Tom", + "last_name": "Bombadil", "address": { "address1": "123 Old Forest Way", "city": "Omaha", @@ -1371,9 +1373,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn }, "dob": "1991-03-08 08:00:00", "email": "tom@middle-earth.com", - "first_name": "Tom", "government_id": "111-23-1412", - "last_name": "Bombadil", "phone_number": "+15555555555", }, external_id="external_id",