From a1c98cf2de62f4bdbe49722d4760588557097822 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Apr 2025 13:23:09 +0000 Subject: [PATCH 1/2] feat(api): introduce TransactionSeries and update ShippingMethod fields (#732) - Add new `transaction_series` schema and fields for Transaction events - Add `expected_release_date` property to Payments - Deprecate various business entity fields and improve documentation - Add new `LOSS_WRITE_OFF` transaction type --- .stats.yml | 4 +- src/lithic/resources/account_holders.py | 52 +++++++------------ src/lithic/types/account_holder.py | 15 +++--- .../types/account_holder_create_params.py | 6 +-- ...der_simulate_enrollment_review_response.py | 16 +++--- .../types/account_holder_update_params.py | 24 +++------ .../types/account_holder_update_response.py | 16 +++--- .../statements/statement_line_items.py | 1 + src/lithic/types/financial_transaction.py | 1 + src/lithic/types/kyb_param.py | 6 +-- .../types/management_operation_transaction.py | 12 ++++- src/lithic/types/payment.py | 5 +- 12 files changed, 75 insertions(+), 83 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1d9cb822..c5254b76 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 156 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-179992b114ffada2cdd2d9d56a8a25e0683bec2297606d32d0f0006b9eb9f21d.yml -openapi_spec_hash: a111418d378ea248892306c81b00f8c8 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-18973e063e9e9233433290bb4d641df8e17e1f21f5b1ec57e00182f0a48dbdec.yml +openapi_spec_hash: ab503dc3772f962b603ade7b91b8534c config_hash: 6729d695e399d14fff4891b6b82ec86c diff --git a/src/lithic/resources/account_holders.py b/src/lithic/resources/account_holders.py index bee201ca..c4379897 100644 --- a/src/lithic/resources/account_holders.py +++ b/src/lithic/resources/account_holders.py @@ -94,8 +94,8 @@ def create( accounts that are part of the program that the calling API key manages. Args: - beneficial_owner_individuals: List of all direct and indirect individuals with >25% ownership in the company. - If no individual owns >25% of the company, please identify the largest + beneficial_owner_individuals: List of all direct and indirect individuals with 25% or more ownership in the + company. If no individual owns 25% of the company, please identify the largest shareholder in this field. See [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf) (Section I) for more background on individuals that should be included. @@ -404,21 +404,13 @@ def update( accounts that are part of the program that the calling API key manages. Args: - beneficial_owner_entities: List of all entities with >25% ownership in the company. If no entity or - individual owns >25% of the company, and the largest shareholder is an entity, - please identify them in this field. See - [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf)(Section - I) for more background. If no business owner is an entity, pass in an empty - list. However, either this parameter or `beneficial_owner_individuals` must be - populated. on entities that should be included. - - beneficial_owner_individuals: List of all individuals with >25% ownership in the company. If no entity or - individual owns >25% of the company, and the largest shareholder is an - individual, please identify them in this field. See - [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf)(Section - I) for more background on individuals that should be included. If no individual - is an entity, pass in an empty list. However, either this parameter or - `beneficial_owner_entities` must be populated. + beneficial_owner_entities: Deprecated. + + beneficial_owner_individuals: List of all direct and indirect individuals with 25% or more ownership in the + company. If no individual owns 25% of the company, please identify the largest + shareholder in this field. See + [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf) + (Section I) for more background on individuals that should be included. business_entity: Information for business for which the account is being opened and KYB is being run. @@ -1083,8 +1075,8 @@ async def create( accounts that are part of the program that the calling API key manages. Args: - beneficial_owner_individuals: List of all direct and indirect individuals with >25% ownership in the company. - If no individual owns >25% of the company, please identify the largest + beneficial_owner_individuals: List of all direct and indirect individuals with 25% or more ownership in the + company. If no individual owns 25% of the company, please identify the largest shareholder in this field. See [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf) (Section I) for more background on individuals that should be included. @@ -1393,21 +1385,13 @@ async def update( accounts that are part of the program that the calling API key manages. Args: - beneficial_owner_entities: List of all entities with >25% ownership in the company. If no entity or - individual owns >25% of the company, and the largest shareholder is an entity, - please identify them in this field. See - [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf)(Section - I) for more background. If no business owner is an entity, pass in an empty - list. However, either this parameter or `beneficial_owner_individuals` must be - populated. on entities that should be included. - - beneficial_owner_individuals: List of all individuals with >25% ownership in the company. If no entity or - individual owns >25% of the company, and the largest shareholder is an - individual, please identify them in this field. See - [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf)(Section - I) for more background on individuals that should be included. If no individual - is an entity, pass in an empty list. However, either this parameter or - `beneficial_owner_entities` must be populated. + beneficial_owner_entities: Deprecated. + + beneficial_owner_individuals: List of all direct and indirect individuals with 25% or more ownership in the + company. If no individual owns 25% of the company, please identify the largest + shareholder in this field. See + [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf) + (Section I) for more background on individuals that should be included. business_entity: Information for business for which the account is being opened and KYB is being run. diff --git a/src/lithic/types/account_holder.py b/src/lithic/types/account_holder.py index 627df7fc..9c30be34 100644 --- a/src/lithic/types/account_holder.py +++ b/src/lithic/types/account_holder.py @@ -206,12 +206,15 @@ class AccountHolder(BaseModel): """Globally unique identifier for the account.""" beneficial_owner_entities: Optional[List[BeneficialOwnerEntity]] = None - """Deprecated. Only present when user_type == "BUSINESS".""" + """Deprecated.""" beneficial_owner_individuals: Optional[List[BeneficialOwnerIndividual]] = None - """Only present when user_type == "BUSINESS". - - List of all individuals with >25% ownership in the company. + """ + Only present when user_type == "BUSINESS". List of all direct and indirect + individuals with 25% or more ownership in the company. If no individual owns 25% + of the company, please identify the largest shareholder in this field. See + [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf) + (Section I) for more background on individuals that should be included. """ business_account_token: Optional[str] = None @@ -319,8 +322,8 @@ class AccountHolder(BaseModel): If the type is "INDIVIDUAL", the "individual" attribute will be present. If the type is "BUSINESS" then the "business_entity", "control_person", - "beneficial_owner_individuals", "beneficial_owner_entities", - "nature_of_business", and "website_url" attributes will be present. + "beneficial_owner_individuals", "nature_of_business", and "website_url" + attributes will be present. """ verification_application: Optional[VerificationApplication] = None diff --git a/src/lithic/types/account_holder_create_params.py b/src/lithic/types/account_holder_create_params.py index 4a328871..eb5939dc 100644 --- a/src/lithic/types/account_holder_create_params.py +++ b/src/lithic/types/account_holder_create_params.py @@ -22,9 +22,9 @@ class KYB(TypedDict, total=False): beneficial_owner_individuals: Required[Iterable[KYBBeneficialOwnerIndividual]] - """List of all direct and indirect individuals with >25% ownership in the company. - - If no individual owns >25% of the company, please identify the largest + """ + List of all direct and indirect individuals with 25% or more ownership in the + company. If no individual owns 25% of the company, please identify the largest shareholder in this field. See [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf) (Section I) for more background on individuals that should be included. diff --git a/src/lithic/types/account_holder_simulate_enrollment_review_response.py b/src/lithic/types/account_holder_simulate_enrollment_review_response.py index ae15bc3d..7a95e2a2 100644 --- a/src/lithic/types/account_holder_simulate_enrollment_review_response.py +++ b/src/lithic/types/account_holder_simulate_enrollment_review_response.py @@ -250,15 +250,16 @@ class AccountHolderSimulateEnrollmentReviewResponse(BaseModel): """Globally unique identifier for the account.""" beneficial_owner_entities: Optional[List[KYBBusinessEntity]] = None - """Only present when user_type == "BUSINESS". - - List of all entities with >25% ownership in the company. - """ + """Deprecated.""" beneficial_owner_individuals: Optional[List[BeneficialOwnerIndividual]] = None """Only present when user_type == "BUSINESS". - List of all individuals with >25% ownership in the company. + List of all direct and indirect individuals with 25% or more ownership in the + company. If no individual owns 25% of the company, please identify the largest + shareholder in this field. See + [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf) + (Section I) for more background on individuals that should be included. """ business_account_token: Optional[str] = None @@ -389,9 +390,8 @@ class AccountHolderSimulateEnrollmentReviewResponse(BaseModel): If the type is "INDIVIDUAL", the "individual" attribute will be present. If the type is "BUSINESS" then the "business_entity", "control_person", - "beneficial_owner_individuals", "beneficial_owner_entities", - - "nature_of_business", and "website_url" attributes will be present. + "beneficial_owner_individuals", "nature_of_business", and "website_url" + attributes will be present. """ verification_application: Optional[VerificationApplication] = None diff --git a/src/lithic/types/account_holder_update_params.py b/src/lithic/types/account_holder_update_params.py index 62453efd..51e97a84 100644 --- a/src/lithic/types/account_holder_update_params.py +++ b/src/lithic/types/account_holder_update_params.py @@ -22,25 +22,15 @@ class KYBPatchRequest(TypedDict, total=False): beneficial_owner_entities: Iterable[KYBPatchRequestBeneficialOwnerEntity] - """List of all entities with >25% ownership in the company. - - If no entity or individual owns >25% of the company, and the largest shareholder - is an entity, please identify them in this field. See - [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf)(Section - I) for more background. If no business owner is an entity, pass in an empty - list. However, either this parameter or `beneficial_owner_individuals` must be - populated. on entities that should be included. - """ + """Deprecated.""" beneficial_owner_individuals: Iterable[KYBPatchRequestBeneficialOwnerIndividual] - """List of all individuals with >25% ownership in the company. - - If no entity or individual owns >25% of the company, and the largest shareholder - is an individual, please identify them in this field. See - [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf)(Section - I) for more background on individuals that should be included. If no individual - is an entity, pass in an empty list. However, either this parameter or - `beneficial_owner_entities` must be populated. + """ + List of all direct and indirect individuals with 25% or more ownership in the + company. If no individual owns 25% of the company, please identify the largest + shareholder in this field. See + [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf) + (Section I) for more background on individuals that should be included. """ business_entity: KYBPatchRequestBusinessEntity diff --git a/src/lithic/types/account_holder_update_response.py b/src/lithic/types/account_holder_update_response.py index 2c0bddfb..d6e436fb 100644 --- a/src/lithic/types/account_holder_update_response.py +++ b/src/lithic/types/account_holder_update_response.py @@ -253,15 +253,16 @@ class KYBKYCPatchResponse(BaseModel): """Globally unique identifier for the account.""" beneficial_owner_entities: Optional[List[KYBBusinessEntity]] = None - """Only present when user_type == "BUSINESS". - - List of all entities with >25% ownership in the company. - """ + """Deprecated.""" beneficial_owner_individuals: Optional[List[KybkycPatchResponseBeneficialOwnerIndividual]] = None """Only present when user_type == "BUSINESS". - List of all individuals with >25% ownership in the company. + List of all direct and indirect individuals with 25% or more ownership in the + company. If no individual owns 25% of the company, please identify the largest + shareholder in this field. See + [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf) + (Section I) for more background on individuals that should be included. """ business_account_token: Optional[str] = None @@ -392,9 +393,8 @@ class KYBKYCPatchResponse(BaseModel): If the type is "INDIVIDUAL", the "individual" attribute will be present. If the type is "BUSINESS" then the "business_entity", "control_person", - "beneficial_owner_individuals", "beneficial_owner_entities", - - "nature_of_business", and "website_url" attributes will be present. + "beneficial_owner_individuals", "nature_of_business", and "website_url" + attributes will be present. """ verification_application: Optional[KYBKYCPatchResponseVerificationApplication] = None diff --git a/src/lithic/types/financial_accounts/statements/statement_line_items.py b/src/lithic/types/financial_accounts/statements/statement_line_items.py index ae7da003..1269fb72 100644 --- a/src/lithic/types/financial_accounts/statements/statement_line_items.py +++ b/src/lithic/types/financial_accounts/statements/statement_line_items.py @@ -99,6 +99,7 @@ class Data(BaseModel): "INTERNAL_ADJUSTMENT", "LATE_PAYMENT", "LATE_PAYMENT_REVERSAL", + "LOSS_WRITE_OFF", "PROVISIONAL_CREDIT", "PROVISIONAL_CREDIT_REVERSAL", "RETURN", diff --git a/src/lithic/types/financial_transaction.py b/src/lithic/types/financial_transaction.py index 4aad3c42..0f4a21ee 100644 --- a/src/lithic/types/financial_transaction.py +++ b/src/lithic/types/financial_transaction.py @@ -86,6 +86,7 @@ class Event(BaseModel): "INTERNAL_ADJUSTMENT", "LATE_PAYMENT", "LATE_PAYMENT_REVERSAL", + "LOSS_WRITE_OFF", "PROVISIONAL_CREDIT", "PROVISIONAL_CREDIT_REVERSAL", "RETURN", diff --git a/src/lithic/types/kyb_param.py b/src/lithic/types/kyb_param.py index 864902a9..46944344 100644 --- a/src/lithic/types/kyb_param.py +++ b/src/lithic/types/kyb_param.py @@ -146,9 +146,9 @@ class BeneficialOwnerEntity(TypedDict, total=False): class KYBParam(TypedDict, total=False): beneficial_owner_individuals: Required[Iterable[BeneficialOwnerIndividual]] - """List of all direct and indirect individuals with >25% ownership in the company. - - If no individual owns >25% of the company, please identify the largest + """ + List of all direct and indirect individuals with 25% or more ownership in the + company. If no individual owns 25% of the company, please identify the largest shareholder in this field. See [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf) (Section I) for more background on individuals that should be included. diff --git a/src/lithic/types/management_operation_transaction.py b/src/lithic/types/management_operation_transaction.py index df533665..e115eb40 100644 --- a/src/lithic/types/management_operation_transaction.py +++ b/src/lithic/types/management_operation_transaction.py @@ -6,7 +6,7 @@ from .._models import BaseModel -__all__ = ["ManagementOperationTransaction", "Event"] +__all__ = ["ManagementOperationTransaction", "Event", "TransactionSeries"] class Event(BaseModel): @@ -45,6 +45,14 @@ class Event(BaseModel): subtype: Optional[str] = None +class TransactionSeries(BaseModel): + related_transaction_event_token: Optional[str] = None + + related_transaction_token: Optional[str] = None + + type: str + + class ManagementOperationTransaction(BaseModel): token: str @@ -68,6 +76,8 @@ class ManagementOperationTransaction(BaseModel): status: Literal["PENDING", "SETTLED", "DECLINED", "REVERSED", "CANCELED"] + transaction_series: Optional[TransactionSeries] = None + updated: datetime user_defined_id: Optional[str] = None diff --git a/src/lithic/types/payment.py b/src/lithic/types/payment.py index ebbf6893..7d58e7af 100644 --- a/src/lithic/types/payment.py +++ b/src/lithic/types/payment.py @@ -1,7 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import List, Optional -from datetime import datetime +from datetime import date, datetime from typing_extensions import Literal from .._models import BaseModel @@ -158,3 +158,6 @@ class Payment(BaseModel): """Date and time when the financial transaction was last updated. UTC time zone.""" user_defined_id: Optional[str] = None + + expected_release_date: Optional[date] = None + """Date when the financial transaction expected to be released after settlement""" From e39be76ab63e400c1ad669f701c4a490fd0dd88c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Apr 2025 13:23:36 +0000 Subject: [PATCH 2/2] release: 0.89.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/lithic/_version.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d80a91e2..6af24e3d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.88.0" + ".": "0.89.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index cd1c020c..95273778 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.89.0 (2025-04-08) + +Full Changelog: [v0.88.0...v0.89.0](https://github.com/lithic-com/lithic-python/compare/v0.88.0...v0.89.0) + +### Features + +* **api:** introduce TransactionSeries and update ShippingMethod fields ([#732](https://github.com/lithic-com/lithic-python/issues/732)) ([a1c98cf](https://github.com/lithic-com/lithic-python/commit/a1c98cf2de62f4bdbe49722d4760588557097822)) + ## 0.88.0 (2025-04-07) Full Changelog: [v0.87.1...v0.88.0](https://github.com/lithic-com/lithic-python/compare/v0.87.1...v0.88.0) diff --git a/pyproject.toml b/pyproject.toml index 88de6f19..9fb31ec0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "lithic" -version = "0.88.0" +version = "0.89.0" description = "The official Python library for the lithic API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/lithic/_version.py b/src/lithic/_version.py index 2cf6d98e..1307f0dd 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.88.0" # x-release-please-version +__version__ = "0.89.0" # x-release-please-version