Skip to content

Commit 8b181ca

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api)!: removes AccountHolder resubmit endpoint and KYC_ADVANCED workflow (#659)
1 parent 79baa5d commit 8b181ca

File tree

12 files changed

+43
-461
lines changed

12 files changed

+43
-461
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
configured_endpoints: 153
1+
configured_endpoints: 152

api.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ Methods:
6767
- <code title="patch /v1/account_holders/{account_holder_token}">client.account_holders.<a href="./src/lithic/resources/account_holders.py">update</a>(account_holder_token, \*\*<a href="src/lithic/types/account_holder_update_params.py">params</a>) -> <a href="./src/lithic/types/account_holder_update_response.py">AccountHolderUpdateResponse</a></code>
6868
- <code title="get /v1/account_holders">client.account_holders.<a href="./src/lithic/resources/account_holders.py">list</a>(\*\*<a href="src/lithic/types/account_holder_list_params.py">params</a>) -> <a href="./src/lithic/types/account_holder.py">SyncSinglePage[AccountHolder]</a></code>
6969
- <code title="get /v1/account_holders/{account_holder_token}/documents">client.account_holders.<a href="./src/lithic/resources/account_holders.py">list_documents</a>(account_holder_token) -> <a href="./src/lithic/types/account_holder_list_documents_response.py">AccountHolderListDocumentsResponse</a></code>
70-
- <code title="post /v1/account_holders/{account_holder_token}/resubmit">client.account_holders.<a href="./src/lithic/resources/account_holders.py">resubmit</a>(account_holder_token, \*\*<a href="src/lithic/types/account_holder_resubmit_params.py">params</a>) -> <a href="./src/lithic/types/account_holder.py">AccountHolder</a></code>
7170
- <code title="get /v1/account_holders/{account_holder_token}/documents/{document_token}">client.account_holders.<a href="./src/lithic/resources/account_holders.py">retrieve_document</a>(document_token, \*, account_holder_token) -> <a href="./src/lithic/types/shared/document.py">Document</a></code>
7271
- <code title="post /v1/simulate/account_holders/enrollment_document_review">client.account_holders.<a href="./src/lithic/resources/account_holders.py">simulate_enrollment_document_review</a>(\*\*<a href="src/lithic/types/account_holder_simulate_enrollment_document_review_params.py">params</a>) -> <a href="./src/lithic/types/shared/document.py">Document</a></code>
7372
- <code title="post /v1/simulate/account_holders/enrollment_review">client.account_holders.<a href="./src/lithic/resources/account_holders.py">simulate_enrollment_review</a>(\*\*<a href="src/lithic/types/account_holder_simulate_enrollment_review_params.py">params</a>) -> <a href="./src/lithic/types/account_holder_simulate_enrollment_review_response.py">AccountHolderSimulateEnrollmentReviewResponse</a></code>

src/lithic/resources/account_holders.py

Lines changed: 6 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
account_holder_list_params,
1414
account_holder_create_params,
1515
account_holder_update_params,
16-
account_holder_resubmit_params,
1716
account_holder_upload_document_params,
1817
account_holder_simulate_enrollment_review_params,
1918
account_holder_simulate_enrollment_document_review_params,
@@ -155,7 +154,7 @@ def create(
155154
*,
156155
individual: account_holder_create_params.KYCIndividual,
157156
tos_timestamp: str,
158-
workflow: Literal["KYC_ADVANCED", "KYC_BASIC", "KYC_BYO"],
157+
workflow: Literal["KYC_BASIC", "KYC_BYO"],
159158
external_id: str | NotGiven = NOT_GIVEN,
160159
kyc_passed_timestamp: str | NotGiven = NOT_GIVEN,
161160
# 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(
286285
control_person: account_holder_create_params.KYBControlPerson | NotGiven = NOT_GIVEN,
287286
nature_of_business: str | NotGiven = NOT_GIVEN,
288287
tos_timestamp: str | NotGiven = NOT_GIVEN,
289-
workflow: Literal["KYB_BASIC", "KYB_BYO"]
290-
| Literal["KYC_ADVANCED", "KYC_BASIC", "KYC_BYO"]
291-
| Literal["KYC_EXEMPT"],
288+
workflow: Literal["KYB_BASIC", "KYB_BYO"] | Literal["KYC_BASIC", "KYC_BYO"] | Literal["KYC_EXEMPT"],
292289
external_id: str | NotGiven = NOT_GIVEN,
293290
kyb_passed_timestamp: str | NotGiven = NOT_GIVEN,
294291
website_url: str | NotGiven = NOT_GIVEN,
@@ -577,67 +574,6 @@ def list_documents(
577574
cast_to=AccountHolderListDocumentsResponse,
578575
)
579576

580-
def resubmit(
581-
self,
582-
account_holder_token: str,
583-
*,
584-
individual: account_holder_resubmit_params.Individual,
585-
tos_timestamp: str,
586-
workflow: Literal["KYC_ADVANCED"],
587-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
588-
# The extra values given here take precedence over values defined on the client or passed to this method.
589-
extra_headers: Headers | None = None,
590-
extra_query: Query | None = None,
591-
extra_body: Body | None = None,
592-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
593-
) -> AccountHolder:
594-
"""Resubmit a KYC submission.
595-
596-
This endpoint should be used in cases where a KYC
597-
submission returned a `PENDING_RESUBMIT` result, meaning one or more critical
598-
KYC fields may have been mis-entered and the individual's identity has not yet
599-
been successfully verified. This step must be completed in order to proceed with
600-
the KYC evaluation.
601-
602-
Two resubmission attempts are permitted via this endpoint before a `REJECTED`
603-
status is returned and the account creation process is ended.
604-
605-
Args:
606-
individual: Information on individual for whom the account is being opened and KYC is being
607-
re-run.
608-
609-
tos_timestamp: An RFC 3339 timestamp indicating when the account holder accepted the applicable
610-
legal agreements (e.g., cardholder terms) as agreed upon during API customer's
611-
implementation with Lithic.
612-
613-
extra_headers: Send extra headers
614-
615-
extra_query: Add additional query parameters to the request
616-
617-
extra_body: Add additional JSON properties to the request
618-
619-
timeout: Override the client-level default timeout for this request, in seconds
620-
"""
621-
if not account_holder_token:
622-
raise ValueError(
623-
f"Expected a non-empty value for `account_holder_token` but received {account_holder_token!r}"
624-
)
625-
return self._post(
626-
f"/v1/account_holders/{account_holder_token}/resubmit",
627-
body=maybe_transform(
628-
{
629-
"individual": individual,
630-
"tos_timestamp": tos_timestamp,
631-
"workflow": workflow,
632-
},
633-
account_holder_resubmit_params.AccountHolderResubmitParams,
634-
),
635-
options=make_request_options(
636-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
637-
),
638-
cast_to=AccountHolder,
639-
)
640-
641577
def retrieve_document(
642578
self,
643579
document_token: str,
@@ -791,8 +727,7 @@ def simulate_enrollment_review(
791727
"""Simulates an enrollment review for an account holder.
792728
793729
This endpoint is only
794-
applicable for workflows that may required intervention such as `KYB_BASIC` or
795-
`KYC_ADVANCED`.
730+
applicable for workflows that may required intervention such as `KYB_BASIC`.
796731
797732
Args:
798733
account_holder_token: The account holder which to perform the simulation upon.
@@ -1024,7 +959,7 @@ async def create(
1024959
*,
1025960
individual: account_holder_create_params.KYCIndividual,
1026961
tos_timestamp: str,
1027-
workflow: Literal["KYC_ADVANCED", "KYC_BASIC", "KYC_BYO"],
962+
workflow: Literal["KYC_BASIC", "KYC_BYO"],
1028963
external_id: str | NotGiven = NOT_GIVEN,
1029964
kyc_passed_timestamp: str | NotGiven = NOT_GIVEN,
1030965
# 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(
11551090
control_person: account_holder_create_params.KYBControlPerson | NotGiven = NOT_GIVEN,
11561091
nature_of_business: str | NotGiven = NOT_GIVEN,
11571092
tos_timestamp: str | NotGiven = NOT_GIVEN,
1158-
workflow: Literal["KYB_BASIC", "KYB_BYO"]
1159-
| Literal["KYC_ADVANCED", "KYC_BASIC", "KYC_BYO"]
1160-
| Literal["KYC_EXEMPT"],
1093+
workflow: Literal["KYB_BASIC", "KYB_BYO"] | Literal["KYC_BASIC", "KYC_BYO"] | Literal["KYC_EXEMPT"],
11611094
external_id: str | NotGiven = NOT_GIVEN,
11621095
kyb_passed_timestamp: str | NotGiven = NOT_GIVEN,
11631096
website_url: str | NotGiven = NOT_GIVEN,
@@ -1446,67 +1379,6 @@ async def list_documents(
14461379
cast_to=AccountHolderListDocumentsResponse,
14471380
)
14481381

1449-
async def resubmit(
1450-
self,
1451-
account_holder_token: str,
1452-
*,
1453-
individual: account_holder_resubmit_params.Individual,
1454-
tos_timestamp: str,
1455-
workflow: Literal["KYC_ADVANCED"],
1456-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1457-
# The extra values given here take precedence over values defined on the client or passed to this method.
1458-
extra_headers: Headers | None = None,
1459-
extra_query: Query | None = None,
1460-
extra_body: Body | None = None,
1461-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1462-
) -> AccountHolder:
1463-
"""Resubmit a KYC submission.
1464-
1465-
This endpoint should be used in cases where a KYC
1466-
submission returned a `PENDING_RESUBMIT` result, meaning one or more critical
1467-
KYC fields may have been mis-entered and the individual's identity has not yet
1468-
been successfully verified. This step must be completed in order to proceed with
1469-
the KYC evaluation.
1470-
1471-
Two resubmission attempts are permitted via this endpoint before a `REJECTED`
1472-
status is returned and the account creation process is ended.
1473-
1474-
Args:
1475-
individual: Information on individual for whom the account is being opened and KYC is being
1476-
re-run.
1477-
1478-
tos_timestamp: An RFC 3339 timestamp indicating when the account holder accepted the applicable
1479-
legal agreements (e.g., cardholder terms) as agreed upon during API customer's
1480-
implementation with Lithic.
1481-
1482-
extra_headers: Send extra headers
1483-
1484-
extra_query: Add additional query parameters to the request
1485-
1486-
extra_body: Add additional JSON properties to the request
1487-
1488-
timeout: Override the client-level default timeout for this request, in seconds
1489-
"""
1490-
if not account_holder_token:
1491-
raise ValueError(
1492-
f"Expected a non-empty value for `account_holder_token` but received {account_holder_token!r}"
1493-
)
1494-
return await self._post(
1495-
f"/v1/account_holders/{account_holder_token}/resubmit",
1496-
body=await async_maybe_transform(
1497-
{
1498-
"individual": individual,
1499-
"tos_timestamp": tos_timestamp,
1500-
"workflow": workflow,
1501-
},
1502-
account_holder_resubmit_params.AccountHolderResubmitParams,
1503-
),
1504-
options=make_request_options(
1505-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1506-
),
1507-
cast_to=AccountHolder,
1508-
)
1509-
15101382
async def retrieve_document(
15111383
self,
15121384
document_token: str,
@@ -1660,8 +1532,7 @@ async def simulate_enrollment_review(
16601532
"""Simulates an enrollment review for an account holder.
16611533
16621534
This endpoint is only
1663-
applicable for workflows that may required intervention such as `KYB_BASIC` or
1664-
`KYC_ADVANCED`.
1535+
applicable for workflows that may required intervention such as `KYB_BASIC`.
16651536
16661537
Args:
16671538
account_holder_token: The account holder which to perform the simulation upon.
@@ -1799,9 +1670,6 @@ def __init__(self, account_holders: AccountHolders) -> None:
17991670
self.list_documents = _legacy_response.to_raw_response_wrapper(
18001671
account_holders.list_documents,
18011672
)
1802-
self.resubmit = _legacy_response.to_raw_response_wrapper(
1803-
account_holders.resubmit,
1804-
)
18051673
self.retrieve_document = _legacy_response.to_raw_response_wrapper(
18061674
account_holders.retrieve_document,
18071675
)
@@ -1835,9 +1703,6 @@ def __init__(self, account_holders: AsyncAccountHolders) -> None:
18351703
self.list_documents = _legacy_response.async_to_raw_response_wrapper(
18361704
account_holders.list_documents,
18371705
)
1838-
self.resubmit = _legacy_response.async_to_raw_response_wrapper(
1839-
account_holders.resubmit,
1840-
)
18411706
self.retrieve_document = _legacy_response.async_to_raw_response_wrapper(
18421707
account_holders.retrieve_document,
18431708
)
@@ -1871,9 +1736,6 @@ def __init__(self, account_holders: AccountHolders) -> None:
18711736
self.list_documents = to_streamed_response_wrapper(
18721737
account_holders.list_documents,
18731738
)
1874-
self.resubmit = to_streamed_response_wrapper(
1875-
account_holders.resubmit,
1876-
)
18771739
self.retrieve_document = to_streamed_response_wrapper(
18781740
account_holders.retrieve_document,
18791741
)
@@ -1907,9 +1769,6 @@ def __init__(self, account_holders: AsyncAccountHolders) -> None:
19071769
self.list_documents = async_to_streamed_response_wrapper(
19081770
account_holders.list_documents,
19091771
)
1910-
self.resubmit = async_to_streamed_response_wrapper(
1911-
account_holders.resubmit,
1912-
)
19131772
self.retrieve_document = async_to_streamed_response_wrapper(
19141773
account_holders.retrieve_document,
19151774
)

src/lithic/resources/cards/cards.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -850,8 +850,9 @@ def reissue(
850850
851851
card is
852852
physically damaged). The PAN, expiry, and CVC2 will remain the same and the
853-
original card can continue to be used until the new card is activated. A card
854-
can be reissued a maximum of 8 times. Only applies to cards of type `PHYSICAL`.
853+
original card can continue to be used until the new card is activated. Only
854+
applies to cards of type `PHYSICAL`. A card can be replaced or renewed a total
855+
of 8 times.
855856
856857
Args:
857858
carrier: If omitted, the previous carrier will be used.
@@ -925,7 +926,8 @@ def renew(
925926
code. The original card will keep working for card-present transactions until
926927
the new card is activated. For card-not-present transactions, the original card
927928
details (expiry, CVC2) will also keep working until the new card is activated.
928-
Applies to card types `PHYSICAL` and `VIRTUAL`.
929+
Applies to card types `PHYSICAL` and `VIRTUAL`. A card can be replaced or
930+
renewed a total of 8 times.
929931
930932
Args:
931933
shipping_address: The shipping address this card will be sent to.
@@ -1831,8 +1833,9 @@ async def reissue(
18311833
18321834
card is
18331835
physically damaged). The PAN, expiry, and CVC2 will remain the same and the
1834-
original card can continue to be used until the new card is activated. A card
1835-
can be reissued a maximum of 8 times. Only applies to cards of type `PHYSICAL`.
1836+
original card can continue to be used until the new card is activated. Only
1837+
applies to cards of type `PHYSICAL`. A card can be replaced or renewed a total
1838+
of 8 times.
18361839
18371840
Args:
18381841
carrier: If omitted, the previous carrier will be used.
@@ -1906,7 +1909,8 @@ async def renew(
19061909
code. The original card will keep working for card-present transactions until
19071910
the new card is activated. For card-not-present transactions, the original card
19081911
details (expiry, CVC2) will also keep working until the new card is activated.
1909-
Applies to card types `PHYSICAL` and `VIRTUAL`.
1912+
Applies to card types `PHYSICAL` and `VIRTUAL`. A card can be replaced or
1913+
renewed a total of 8 times.
19101914
19111915
Args:
19121916
shipping_address: The shipping address this card will be sent to.

src/lithic/types/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@
9292
from .external_bank_account_address import ExternalBankAccountAddress as ExternalBankAccountAddress
9393
from .financial_account_list_params import FinancialAccountListParams as FinancialAccountListParams
9494
from .account_holder_create_response import AccountHolderCreateResponse as AccountHolderCreateResponse
95-
from .account_holder_resubmit_params import AccountHolderResubmitParams as AccountHolderResubmitParams
9695
from .account_holder_update_response import AccountHolderUpdateResponse as AccountHolderUpdateResponse
9796
from .external_payment_cancel_params import ExternalPaymentCancelParams as ExternalPaymentCancelParams
9897
from .external_payment_create_params import ExternalPaymentCreateParams as ExternalPaymentCreateParams

src/lithic/types/account_holder.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,6 @@ class VerificationApplication(BaseModel):
169169
170170
Note:
171171
172-
- `PENDING_RESUBMIT` and `PENDING_DOCUMENT` are only applicable for the
173-
`KYC_ADVANCED` workflow.
174172
- `PENDING_REVIEW` is only applicable for the `KYB_BASIC` workflow.
175173
"""
176174

@@ -282,7 +280,7 @@ class AccountHolder(BaseModel):
282280
"""
283281

284282
required_documents: Optional[List[RequiredDocument]] = None
285-
"""Only present for "KYB_BASIC" and "KYC_ADVANCED" workflows.
283+
"""Only present for "KYB_BASIC" workflow.
286284
287285
A list of documents required for the account holder to be approved.
288286
"""
@@ -294,8 +292,6 @@ class AccountHolder(BaseModel):
294292
295293
Note:
296294
297-
- `PENDING_RESUBMIT` and `PENDING_DOCUMENT` are only applicable for the
298-
`KYC_ADVANCED` workflow.
299295
- `PENDING_REVIEW` is only applicable for the `KYB_BASIC` workflow.
300296
"""
301297

src/lithic/types/account_holder_create_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ class KYC(TypedDict, total=False):
243243
implementation with Lithic.
244244
"""
245245

246-
workflow: Required[Literal["KYC_ADVANCED", "KYC_BASIC", "KYC_BYO"]]
246+
workflow: Required[Literal["KYC_BASIC", "KYC_BYO"]]
247247
"""Specifies the type of KYC workflow to run."""
248248

249249
external_id: str

src/lithic/types/account_holder_create_response.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ class AccountHolderCreateResponse(BaseModel):
2222
2323
Note:
2424
25-
- `PENDING_RESUBMIT` and `PENDING_DOCUMENT` are only applicable for the
26-
`KYC_ADVANCED` workflow.
2725
- `PENDING_REVIEW` is only applicable for the `KYB_BASIC` workflow.
2826
"""
2927

@@ -67,7 +65,7 @@ class AccountHolderCreateResponse(BaseModel):
6765
"""
6866

6967
required_documents: Optional[List[RequiredDocument]] = None
70-
"""Only present for "KYB_BASIC" and "KYC_ADVANCED" workflows.
68+
"""Only present for "KYB_BASIC" workflow.
7169
7270
A list of documents required for the account holder to be approved.
7371
"""

0 commit comments

Comments
 (0)