From 8b181ca9ab1e09309d22f0c2de9ec41cb6b448dc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2024 15:28:45 +0000 Subject: [PATCH] feat(api)!: removes AccountHolder `resubmit` endpoint and `KYC_ADVANCED` workflow (#659) --- .stats.yml | 2 +- api.md | 1 - src/lithic/resources/account_holders.py | 153 +----------- src/lithic/resources/cards/cards.py | 16 +- src/lithic/types/__init__.py | 1 - src/lithic/types/account_holder.py | 6 +- .../types/account_holder_create_params.py | 2 +- .../types/account_holder_create_response.py | 4 +- .../types/account_holder_resubmit_params.py | 60 ----- src/lithic/types/kyc_param.py | 2 +- src/lithic/types/transaction.py | 29 ++- tests/api_resources/test_account_holders.py | 228 +----------------- 12 files changed, 43 insertions(+), 461 deletions(-) delete mode 100644 src/lithic/types/account_holder_resubmit_params.py diff --git a/.stats.yml b/.stats.yml index d831e60e..8d78762c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1 +1 @@ -configured_endpoints: 153 +configured_endpoints: 152 diff --git a/api.md b/api.md index 338cf798..d76ba71d 100644 --- a/api.md +++ b/api.md @@ -67,7 +67,6 @@ Methods: - client.account_holders.update(account_holder_token, \*\*params) -> AccountHolderUpdateResponse - client.account_holders.list(\*\*params) -> SyncSinglePage[AccountHolder] - client.account_holders.list_documents(account_holder_token) -> AccountHolderListDocumentsResponse -- client.account_holders.resubmit(account_holder_token, \*\*params) -> AccountHolder - client.account_holders.retrieve_document(document_token, \*, account_holder_token) -> Document - client.account_holders.simulate_enrollment_document_review(\*\*params) -> Document - client.account_holders.simulate_enrollment_review(\*\*params) -> AccountHolderSimulateEnrollmentReviewResponse diff --git a/src/lithic/resources/account_holders.py b/src/lithic/resources/account_holders.py index fc225ac8..9c4d1eb2 100644 --- a/src/lithic/resources/account_holders.py +++ b/src/lithic/resources/account_holders.py @@ -13,7 +13,6 @@ account_holder_list_params, account_holder_create_params, account_holder_update_params, - account_holder_resubmit_params, account_holder_upload_document_params, account_holder_simulate_enrollment_review_params, account_holder_simulate_enrollment_document_review_params, @@ -155,7 +154,7 @@ def create( *, individual: account_holder_create_params.KYCIndividual, tos_timestamp: str, - workflow: Literal["KYC_ADVANCED", "KYC_BASIC", "KYC_BYO"], + workflow: Literal["KYC_BASIC", "KYC_BYO"], external_id: str | NotGiven = NOT_GIVEN, kyc_passed_timestamp: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -286,9 +285,7 @@ def create( control_person: account_holder_create_params.KYBControlPerson | NotGiven = NOT_GIVEN, nature_of_business: str | NotGiven = NOT_GIVEN, tos_timestamp: str | NotGiven = NOT_GIVEN, - workflow: Literal["KYB_BASIC", "KYB_BYO"] - | Literal["KYC_ADVANCED", "KYC_BASIC", "KYC_BYO"] - | Literal["KYC_EXEMPT"], + workflow: Literal["KYB_BASIC", "KYB_BYO"] | Literal["KYC_BASIC", "KYC_BYO"] | Literal["KYC_EXEMPT"], external_id: str | NotGiven = NOT_GIVEN, kyb_passed_timestamp: str | NotGiven = NOT_GIVEN, website_url: str | NotGiven = NOT_GIVEN, @@ -577,67 +574,6 @@ def list_documents( cast_to=AccountHolderListDocumentsResponse, ) - def resubmit( - self, - account_holder_token: str, - *, - individual: account_holder_resubmit_params.Individual, - tos_timestamp: str, - workflow: Literal["KYC_ADVANCED"], - # 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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccountHolder: - """Resubmit a KYC submission. - - This endpoint should be used in cases where a KYC - submission returned a `PENDING_RESUBMIT` result, meaning one or more critical - KYC fields may have been mis-entered and the individual's identity has not yet - been successfully verified. This step must be completed in order to proceed with - the KYC evaluation. - - Two resubmission attempts are permitted via this endpoint before a `REJECTED` - status is returned and the account creation process is ended. - - Args: - individual: Information on individual for whom the account is being opened and KYC is being - re-run. - - tos_timestamp: An RFC 3339 timestamp indicating when the account holder accepted the applicable - legal agreements (e.g., cardholder terms) as agreed upon during API customer's - implementation with Lithic. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_holder_token: - raise ValueError( - f"Expected a non-empty value for `account_holder_token` but received {account_holder_token!r}" - ) - return self._post( - f"/v1/account_holders/{account_holder_token}/resubmit", - body=maybe_transform( - { - "individual": individual, - "tos_timestamp": tos_timestamp, - "workflow": workflow, - }, - account_holder_resubmit_params.AccountHolderResubmitParams, - ), - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=AccountHolder, - ) - def retrieve_document( self, document_token: str, @@ -791,8 +727,7 @@ def simulate_enrollment_review( """Simulates an enrollment review for an account holder. This endpoint is only - applicable for workflows that may required intervention such as `KYB_BASIC` or - `KYC_ADVANCED`. + applicable for workflows that may required intervention such as `KYB_BASIC`. Args: account_holder_token: The account holder which to perform the simulation upon. @@ -1024,7 +959,7 @@ async def create( *, individual: account_holder_create_params.KYCIndividual, tos_timestamp: str, - workflow: Literal["KYC_ADVANCED", "KYC_BASIC", "KYC_BYO"], + workflow: Literal["KYC_BASIC", "KYC_BYO"], external_id: str | NotGiven = NOT_GIVEN, kyc_passed_timestamp: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -1155,9 +1090,7 @@ async def create( control_person: account_holder_create_params.KYBControlPerson | NotGiven = NOT_GIVEN, nature_of_business: str | NotGiven = NOT_GIVEN, tos_timestamp: str | NotGiven = NOT_GIVEN, - workflow: Literal["KYB_BASIC", "KYB_BYO"] - | Literal["KYC_ADVANCED", "KYC_BASIC", "KYC_BYO"] - | Literal["KYC_EXEMPT"], + workflow: Literal["KYB_BASIC", "KYB_BYO"] | Literal["KYC_BASIC", "KYC_BYO"] | Literal["KYC_EXEMPT"], external_id: str | NotGiven = NOT_GIVEN, kyb_passed_timestamp: str | NotGiven = NOT_GIVEN, website_url: str | NotGiven = NOT_GIVEN, @@ -1446,67 +1379,6 @@ async def list_documents( cast_to=AccountHolderListDocumentsResponse, ) - async def resubmit( - self, - account_holder_token: str, - *, - individual: account_holder_resubmit_params.Individual, - tos_timestamp: str, - workflow: Literal["KYC_ADVANCED"], - # 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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccountHolder: - """Resubmit a KYC submission. - - This endpoint should be used in cases where a KYC - submission returned a `PENDING_RESUBMIT` result, meaning one or more critical - KYC fields may have been mis-entered and the individual's identity has not yet - been successfully verified. This step must be completed in order to proceed with - the KYC evaluation. - - Two resubmission attempts are permitted via this endpoint before a `REJECTED` - status is returned and the account creation process is ended. - - Args: - individual: Information on individual for whom the account is being opened and KYC is being - re-run. - - tos_timestamp: An RFC 3339 timestamp indicating when the account holder accepted the applicable - legal agreements (e.g., cardholder terms) as agreed upon during API customer's - implementation with Lithic. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account_holder_token: - raise ValueError( - f"Expected a non-empty value for `account_holder_token` but received {account_holder_token!r}" - ) - return await self._post( - f"/v1/account_holders/{account_holder_token}/resubmit", - body=await async_maybe_transform( - { - "individual": individual, - "tos_timestamp": tos_timestamp, - "workflow": workflow, - }, - account_holder_resubmit_params.AccountHolderResubmitParams, - ), - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=AccountHolder, - ) - async def retrieve_document( self, document_token: str, @@ -1660,8 +1532,7 @@ async def simulate_enrollment_review( """Simulates an enrollment review for an account holder. This endpoint is only - applicable for workflows that may required intervention such as `KYB_BASIC` or - `KYC_ADVANCED`. + applicable for workflows that may required intervention such as `KYB_BASIC`. Args: account_holder_token: The account holder which to perform the simulation upon. @@ -1799,9 +1670,6 @@ def __init__(self, account_holders: AccountHolders) -> None: self.list_documents = _legacy_response.to_raw_response_wrapper( account_holders.list_documents, ) - self.resubmit = _legacy_response.to_raw_response_wrapper( - account_holders.resubmit, - ) self.retrieve_document = _legacy_response.to_raw_response_wrapper( account_holders.retrieve_document, ) @@ -1835,9 +1703,6 @@ def __init__(self, account_holders: AsyncAccountHolders) -> None: self.list_documents = _legacy_response.async_to_raw_response_wrapper( account_holders.list_documents, ) - self.resubmit = _legacy_response.async_to_raw_response_wrapper( - account_holders.resubmit, - ) self.retrieve_document = _legacy_response.async_to_raw_response_wrapper( account_holders.retrieve_document, ) @@ -1871,9 +1736,6 @@ def __init__(self, account_holders: AccountHolders) -> None: self.list_documents = to_streamed_response_wrapper( account_holders.list_documents, ) - self.resubmit = to_streamed_response_wrapper( - account_holders.resubmit, - ) self.retrieve_document = to_streamed_response_wrapper( account_holders.retrieve_document, ) @@ -1907,9 +1769,6 @@ def __init__(self, account_holders: AsyncAccountHolders) -> None: self.list_documents = async_to_streamed_response_wrapper( account_holders.list_documents, ) - self.resubmit = async_to_streamed_response_wrapper( - account_holders.resubmit, - ) self.retrieve_document = async_to_streamed_response_wrapper( account_holders.retrieve_document, ) diff --git a/src/lithic/resources/cards/cards.py b/src/lithic/resources/cards/cards.py index 62deb93c..cae45aa7 100644 --- a/src/lithic/resources/cards/cards.py +++ b/src/lithic/resources/cards/cards.py @@ -850,8 +850,9 @@ def reissue( card is physically damaged). The PAN, expiry, and CVC2 will remain the same and the - original card can continue to be used until the new card is activated. A card - can be reissued a maximum of 8 times. Only applies to cards of type `PHYSICAL`. + original card can continue to be used until the new card is activated. Only + applies to cards of type `PHYSICAL`. A card can be replaced or renewed a total + of 8 times. Args: carrier: If omitted, the previous carrier will be used. @@ -925,7 +926,8 @@ def renew( code. The original card will keep working for card-present transactions until the new card is activated. For card-not-present transactions, the original card details (expiry, CVC2) will also keep working until the new card is activated. - Applies to card types `PHYSICAL` and `VIRTUAL`. + Applies to card types `PHYSICAL` and `VIRTUAL`. A card can be replaced or + renewed a total of 8 times. Args: shipping_address: The shipping address this card will be sent to. @@ -1831,8 +1833,9 @@ async def reissue( card is physically damaged). The PAN, expiry, and CVC2 will remain the same and the - original card can continue to be used until the new card is activated. A card - can be reissued a maximum of 8 times. Only applies to cards of type `PHYSICAL`. + original card can continue to be used until the new card is activated. Only + applies to cards of type `PHYSICAL`. A card can be replaced or renewed a total + of 8 times. Args: carrier: If omitted, the previous carrier will be used. @@ -1906,7 +1909,8 @@ async def renew( code. The original card will keep working for card-present transactions until the new card is activated. For card-not-present transactions, the original card details (expiry, CVC2) will also keep working until the new card is activated. - Applies to card types `PHYSICAL` and `VIRTUAL`. + Applies to card types `PHYSICAL` and `VIRTUAL`. A card can be replaced or + renewed a total of 8 times. Args: shipping_address: The shipping address this card will be sent to. diff --git a/src/lithic/types/__init__.py b/src/lithic/types/__init__.py index a0952a7e..78f27e6d 100644 --- a/src/lithic/types/__init__.py +++ b/src/lithic/types/__init__.py @@ -92,7 +92,6 @@ from .external_bank_account_address import ExternalBankAccountAddress as ExternalBankAccountAddress from .financial_account_list_params import FinancialAccountListParams as FinancialAccountListParams from .account_holder_create_response import AccountHolderCreateResponse as AccountHolderCreateResponse -from .account_holder_resubmit_params import AccountHolderResubmitParams as AccountHolderResubmitParams from .account_holder_update_response import AccountHolderUpdateResponse as AccountHolderUpdateResponse from .external_payment_cancel_params import ExternalPaymentCancelParams as ExternalPaymentCancelParams from .external_payment_create_params import ExternalPaymentCreateParams as ExternalPaymentCreateParams diff --git a/src/lithic/types/account_holder.py b/src/lithic/types/account_holder.py index c45dcdfb..c21958f4 100644 --- a/src/lithic/types/account_holder.py +++ b/src/lithic/types/account_holder.py @@ -169,8 +169,6 @@ class VerificationApplication(BaseModel): Note: - - `PENDING_RESUBMIT` and `PENDING_DOCUMENT` are only applicable for the - `KYC_ADVANCED` workflow. - `PENDING_REVIEW` is only applicable for the `KYB_BASIC` workflow. """ @@ -282,7 +280,7 @@ class AccountHolder(BaseModel): """ required_documents: Optional[List[RequiredDocument]] = None - """Only present for "KYB_BASIC" and "KYC_ADVANCED" workflows. + """Only present for "KYB_BASIC" workflow. A list of documents required for the account holder to be approved. """ @@ -294,8 +292,6 @@ class AccountHolder(BaseModel): Note: - - `PENDING_RESUBMIT` and `PENDING_DOCUMENT` are only applicable for the - `KYC_ADVANCED` workflow. - `PENDING_REVIEW` is only applicable for the `KYB_BASIC` workflow. """ diff --git a/src/lithic/types/account_holder_create_params.py b/src/lithic/types/account_holder_create_params.py index 191ddc03..b87e4166 100644 --- a/src/lithic/types/account_holder_create_params.py +++ b/src/lithic/types/account_holder_create_params.py @@ -243,7 +243,7 @@ class KYC(TypedDict, total=False): implementation with Lithic. """ - workflow: Required[Literal["KYC_ADVANCED", "KYC_BASIC", "KYC_BYO"]] + workflow: Required[Literal["KYC_BASIC", "KYC_BYO"]] """Specifies the type of KYC workflow to run.""" external_id: str diff --git a/src/lithic/types/account_holder_create_response.py b/src/lithic/types/account_holder_create_response.py index 51d854c5..e3245796 100644 --- a/src/lithic/types/account_holder_create_response.py +++ b/src/lithic/types/account_holder_create_response.py @@ -22,8 +22,6 @@ class AccountHolderCreateResponse(BaseModel): Note: - - `PENDING_RESUBMIT` and `PENDING_DOCUMENT` are only applicable for the - `KYC_ADVANCED` workflow. - `PENDING_REVIEW` is only applicable for the `KYB_BASIC` workflow. """ @@ -67,7 +65,7 @@ class AccountHolderCreateResponse(BaseModel): """ required_documents: Optional[List[RequiredDocument]] = None - """Only present for "KYB_BASIC" and "KYC_ADVANCED" workflows. + """Only present for "KYB_BASIC" workflow. A list of documents required for the account holder to be approved. """ diff --git a/src/lithic/types/account_holder_resubmit_params.py b/src/lithic/types/account_holder_resubmit_params.py deleted file mode 100644 index 69d85226..00000000 --- a/src/lithic/types/account_holder_resubmit_params.py +++ /dev/null @@ -1,60 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -from .shared_params.address import Address - -__all__ = ["AccountHolderResubmitParams", "Individual"] - - -class AccountHolderResubmitParams(TypedDict, total=False): - individual: Required[Individual] - """ - Information on individual for whom the account is being opened and KYC is being - re-run. - """ - - tos_timestamp: Required[str] - """ - An RFC 3339 timestamp indicating when the account holder accepted the applicable - legal agreements (e.g., cardholder terms) as agreed upon during API customer's - implementation with Lithic. - """ - - workflow: Required[Literal["KYC_ADVANCED"]] - - -class Individual(TypedDict, total=False): - address: Required[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] - """Individual's date of birth, as an RFC 3339 date.""" - - email: Required[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-issued identification number (required for identity verification and - compliance with banking regulations). Social Security Numbers (SSN) and - Individual Taxpayer Identification Numbers (ITIN) are currently supported, - 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: Required[str] - """Individual's phone number, entered in E.164 format.""" diff --git a/src/lithic/types/kyc_param.py b/src/lithic/types/kyc_param.py index 4089af2b..fef6b452 100644 --- a/src/lithic/types/kyc_param.py +++ b/src/lithic/types/kyc_param.py @@ -57,7 +57,7 @@ class KYCParam(TypedDict, total=False): implementation with Lithic. """ - workflow: Required[Literal["KYC_ADVANCED", "KYC_BASIC", "KYC_BYO"]] + workflow: Required[Literal["KYC_BASIC", "KYC_BYO"]] """Specifies the type of KYC workflow to run.""" external_id: str diff --git a/src/lithic/types/transaction.py b/src/lithic/types/transaction.py index a1ccb5d0..4b824902 100644 --- a/src/lithic/types/transaction.py +++ b/src/lithic/types/transaction.py @@ -480,6 +480,7 @@ class EventRuleResult(BaseModel): "UNAUTHORIZED_MERCHANT", "VEHICLE_NUMBER_INVALID", ] + """The detailed_result associated with this rule's decline.""" class Event(BaseModel): @@ -554,6 +555,17 @@ class Event(BaseModel): effective_polarity: Literal["CREDIT", "DEBIT"] """Indicates whether the transaction event is a credit or debit to the account.""" + network_info: Optional[EventNetworkInfo] = None + """Information provided by the card network in each event. + + This includes common identifiers shared between you, Lithic, the card network + and in some cases the acquirer. These identifiers often link together events + within the same transaction lifecycle and can be used to locate a particular + transaction, such as during processing of disputes. Not all fields are available + in all events, and the presence of these fields is dependent on the card network + and the event type. + """ + result: Literal[ "ACCOUNT_STATE_TRANSACTION_FAIL", "APPROVED", @@ -580,6 +592,8 @@ class Event(BaseModel): "USER_TRANSACTION_LIMIT", ] + rule_results: List[EventRuleResult] + type: Literal[ "AUTHORIZATION", "AUTHORIZATION_ADVICE", @@ -598,21 +612,6 @@ class Event(BaseModel): ] """Type of transaction event""" - network_info: Optional[EventNetworkInfo] = None - """Information provided by the card network in each event. - - This includes common identifiers shared between you, Lithic, the card network - and in some cases the acquirer. These identifiers often link together events - within the same transaction lifecycle and can be used to locate a particular - transaction, such as during processing of disputes. Not all fields are available - in all events, and the presence of these fields is dependent on the card network - and the event type. - - Now available in sandbox, and available in production on December 17th, 2024. - """ - - rule_results: Optional[List[EventRuleResult]] = None - class Transaction(BaseModel): token: str diff --git a/tests/api_resources/test_account_holders.py b/tests/api_resources/test_account_holders.py index 8048ea86..00290d6a 100644 --- a/tests/api_resources/test_account_holders.py +++ b/tests/api_resources/test_account_holders.py @@ -328,7 +328,7 @@ def test_method_create_overload_2(self, client: Lithic) -> None: "phone_number": "+15555555555", }, tos_timestamp="tos_timestamp", - workflow="KYC_ADVANCED", + workflow="KYC_BASIC", ) assert_matches_type(AccountHolderCreateResponse, account_holder, path=["response"]) @@ -352,7 +352,7 @@ def test_method_create_with_all_params_overload_2(self, client: Lithic) -> None: "phone_number": "+15555555555", }, tos_timestamp="tos_timestamp", - workflow="KYC_ADVANCED", + workflow="KYC_BASIC", external_id="external_id", kyc_passed_timestamp="kyc_passed_timestamp", ) @@ -377,7 +377,7 @@ def test_raw_response_create_overload_2(self, client: Lithic) -> None: "phone_number": "+15555555555", }, tos_timestamp="tos_timestamp", - workflow="KYC_ADVANCED", + workflow="KYC_BASIC", ) assert response.is_closed is True @@ -404,7 +404,7 @@ def test_streaming_response_create_overload_2(self, client: Lithic) -> None: "phone_number": "+15555555555", }, tos_timestamp="tos_timestamp", - workflow="KYC_ADVANCED", + workflow="KYC_BASIC", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -669,112 +669,6 @@ def test_path_params_list_documents(self, client: Lithic) -> None: "", ) - @parametrize - def test_method_resubmit(self, client: Lithic) -> None: - account_holder = client.account_holders.resubmit( - account_holder_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - individual={ - "address": { - "address1": "123 Old Forest Way", - "city": "Omaha", - "country": "USA", - "postal_code": "68022", - "state": "NE", - }, - "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", - }, - tos_timestamp="2018-05-29T21:16:05Z", - workflow="KYC_ADVANCED", - ) - assert_matches_type(AccountHolder, account_holder, path=["response"]) - - @parametrize - def test_raw_response_resubmit(self, client: Lithic) -> None: - response = client.account_holders.with_raw_response.resubmit( - account_holder_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - individual={ - "address": { - "address1": "123 Old Forest Way", - "city": "Omaha", - "country": "USA", - "postal_code": "68022", - "state": "NE", - }, - "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", - }, - tos_timestamp="2018-05-29T21:16:05Z", - workflow="KYC_ADVANCED", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_holder = response.parse() - assert_matches_type(AccountHolder, account_holder, path=["response"]) - - @parametrize - def test_streaming_response_resubmit(self, client: Lithic) -> None: - with client.account_holders.with_streaming_response.resubmit( - account_holder_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - individual={ - "address": { - "address1": "123 Old Forest Way", - "city": "Omaha", - "country": "USA", - "postal_code": "68022", - "state": "NE", - }, - "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", - }, - tos_timestamp="2018-05-29T21:16:05Z", - workflow="KYC_ADVANCED", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - account_holder = response.parse() - assert_matches_type(AccountHolder, account_holder, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_resubmit(self, client: Lithic) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_holder_token` but received ''"): - client.account_holders.with_raw_response.resubmit( - account_holder_token="", - individual={ - "address": { - "address1": "123 Old Forest Way", - "city": "Omaha", - "country": "USA", - "postal_code": "68022", - "state": "NE", - }, - "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", - }, - tos_timestamp="2018-05-29T21:16:05Z", - workflow="KYC_ADVANCED", - ) - @parametrize def test_method_retrieve_document(self, client: Lithic) -> None: account_holder = client.account_holders.retrieve_document( @@ -1253,7 +1147,7 @@ async def test_method_create_overload_2(self, async_client: AsyncLithic) -> None "phone_number": "+15555555555", }, tos_timestamp="tos_timestamp", - workflow="KYC_ADVANCED", + workflow="KYC_BASIC", ) assert_matches_type(AccountHolderCreateResponse, account_holder, path=["response"]) @@ -1277,7 +1171,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn "phone_number": "+15555555555", }, tos_timestamp="tos_timestamp", - workflow="KYC_ADVANCED", + workflow="KYC_BASIC", external_id="external_id", kyc_passed_timestamp="kyc_passed_timestamp", ) @@ -1302,7 +1196,7 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncLithic) - "phone_number": "+15555555555", }, tos_timestamp="tos_timestamp", - workflow="KYC_ADVANCED", + workflow="KYC_BASIC", ) assert response.is_closed is True @@ -1329,7 +1223,7 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncLit "phone_number": "+15555555555", }, tos_timestamp="tos_timestamp", - workflow="KYC_ADVANCED", + workflow="KYC_BASIC", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1594,112 +1488,6 @@ async def test_path_params_list_documents(self, async_client: AsyncLithic) -> No "", ) - @parametrize - async def test_method_resubmit(self, async_client: AsyncLithic) -> None: - account_holder = await async_client.account_holders.resubmit( - account_holder_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - individual={ - "address": { - "address1": "123 Old Forest Way", - "city": "Omaha", - "country": "USA", - "postal_code": "68022", - "state": "NE", - }, - "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", - }, - tos_timestamp="2018-05-29T21:16:05Z", - workflow="KYC_ADVANCED", - ) - assert_matches_type(AccountHolder, account_holder, path=["response"]) - - @parametrize - async def test_raw_response_resubmit(self, async_client: AsyncLithic) -> None: - response = await async_client.account_holders.with_raw_response.resubmit( - account_holder_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - individual={ - "address": { - "address1": "123 Old Forest Way", - "city": "Omaha", - "country": "USA", - "postal_code": "68022", - "state": "NE", - }, - "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", - }, - tos_timestamp="2018-05-29T21:16:05Z", - workflow="KYC_ADVANCED", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_holder = response.parse() - assert_matches_type(AccountHolder, account_holder, path=["response"]) - - @parametrize - async def test_streaming_response_resubmit(self, async_client: AsyncLithic) -> None: - async with async_client.account_holders.with_streaming_response.resubmit( - account_holder_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - individual={ - "address": { - "address1": "123 Old Forest Way", - "city": "Omaha", - "country": "USA", - "postal_code": "68022", - "state": "NE", - }, - "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", - }, - tos_timestamp="2018-05-29T21:16:05Z", - workflow="KYC_ADVANCED", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - account_holder = await response.parse() - assert_matches_type(AccountHolder, account_holder, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_resubmit(self, async_client: AsyncLithic) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_holder_token` but received ''"): - await async_client.account_holders.with_raw_response.resubmit( - account_holder_token="", - individual={ - "address": { - "address1": "123 Old Forest Way", - "city": "Omaha", - "country": "USA", - "postal_code": "68022", - "state": "NE", - }, - "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", - }, - tos_timestamp="2018-05-29T21:16:05Z", - workflow="KYC_ADVANCED", - ) - @parametrize async def test_method_retrieve_document(self, async_client: AsyncLithic) -> None: account_holder = await async_client.account_holders.retrieve_document(