Skip to content

Commit b0677ec

Browse files
feat(api): new resend endpoint for Event Subscriptions (#729)
- Add new endpoint for resending events to event subscriptions - Refactor shipping method into reusable schema component (CardShippingMethod) - Deprecate `BeneficialOwnerEntities` in favor of BeneficialOwnerIndividuals` - Enhance card renewal documentation with details on PHYSICAL vs VIRTUAL card behavior - Rename `FinancialAccount.status_change_reason` to `substatus`
1 parent b0b7621 commit b0677ec

22 files changed

+544
-320
lines changed

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 155
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-fe97f820471b725722897539252e7444af7490c5a444a2e9304f5e6eec5513f3.yml
3-
openapi_spec_hash: 7e6a5737901cef39499bf749a17d9939
4-
config_hash: 4ad881d1e70144d965fd188c40350add
1+
configured_endpoints: 156
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-179992b114ffada2cdd2d9d56a8a25e0683bec2297606d32d0f0006b9eb9f21d.yml
3+
openapi_spec_hash: a111418d378ea248892306c81b00f8c8
4+
config_hash: 6729d695e399d14fff4891b6b82ec86c

api.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,12 @@ Methods:
315315
- <code title="post /v1/event_subscriptions/{event_subscription_token}/secret/rotate">client.events.subscriptions.<a href="./src/lithic/resources/events/subscriptions.py">rotate_secret</a>(event_subscription_token) -> None</code>
316316
- <code title="post /v1/simulate/event_subscriptions/{event_subscription_token}/send_example">client.events.subscriptions.<a href="./src/lithic/resources/events/subscriptions.py">send_simulated_example</a>(event_subscription_token, \*\*<a href="src/lithic/types/events/subscription_send_simulated_example_params.py">params</a>) -> None</code>
317317

318+
## EventSubscriptions
319+
320+
Methods:
321+
322+
- <code title="post /v1/events/{event_token}/event_subscriptions/{event_subscription_token}/resend">client.events.event_subscriptions.<a href="./src/lithic/resources/events/event_subscriptions.py">resend</a>(event_subscription_token, \*, event_token) -> None</code>
323+
318324
# FinancialAccounts
319325

320326
Types:

src/lithic/resources/account_holders.py

Lines changed: 20 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,14 @@ def with_streaming_response(self) -> AccountHoldersWithStreamingResponse:
6666
def create(
6767
self,
6868
*,
69-
beneficial_owner_entities: Iterable[account_holder_create_params.KYBBeneficialOwnerEntity],
7069
beneficial_owner_individuals: Iterable[account_holder_create_params.KYBBeneficialOwnerIndividual],
7170
business_entity: account_holder_create_params.KYBBusinessEntity,
7271
control_person: account_holder_create_params.KYBControlPerson,
7372
nature_of_business: str,
7473
tos_timestamp: str,
7574
workflow: Literal["KYB_BASIC", "KYB_BYO"],
75+
beneficial_owner_entities: Iterable[account_holder_create_params.KYBBeneficialOwnerEntity]
76+
| NotGiven = NOT_GIVEN,
7677
external_id: str | NotGiven = NOT_GIVEN,
7778
kyb_passed_timestamp: str | NotGiven = NOT_GIVEN,
7879
website_url: str | NotGiven = NOT_GIVEN,
@@ -93,21 +94,11 @@ def create(
9394
accounts that are part of the program that the calling API key manages.
9495
9596
Args:
96-
beneficial_owner_entities: List of all entities with >25% ownership in the company. If no entity or
97-
individual owns >25% of the company, and the largest shareholder is an entity,
98-
please identify them in this field. See
99-
[FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf)
100-
(Section I) for more background. If no business owner is an entity, pass in an
101-
empty list. However, either this parameter or `beneficial_owner_individuals`
102-
must be populated. on entities that should be included.
103-
10497
beneficial_owner_individuals: List of all direct and indirect individuals with >25% ownership in the company.
105-
If no entity or individual owns >25% of the company, and the largest shareholder
106-
is an individual, please identify them in this field. See
98+
If no individual owns >25% of the company, please identify the largest
99+
shareholder in this field. See
107100
[FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf)
108-
(Section I) for more background on individuals that should be included. If no
109-
individual is an entity, pass in an empty list. However, either this parameter
110-
or `beneficial_owner_entities` must be populated.
101+
(Section I) for more background on individuals that should be included.
111102
112103
business_entity: Information for business for which the account is being opened and KYB is being
113104
run.
@@ -130,6 +121,8 @@ def create(
130121
131122
workflow: Specifies the type of KYB workflow to run.
132123
124+
beneficial_owner_entities: Deprecated.
125+
133126
external_id: A user provided id that can be used to link an account holder with an external
134127
system
135128
@@ -267,7 +260,6 @@ def create(
267260

268261
@required_args(
269262
[
270-
"beneficial_owner_entities",
271263
"beneficial_owner_individuals",
272264
"business_entity",
273265
"control_person",
@@ -281,15 +273,15 @@ def create(
281273
def create(
282274
self,
283275
*,
284-
beneficial_owner_entities: Iterable[account_holder_create_params.KYBBeneficialOwnerEntity]
285-
| NotGiven = NOT_GIVEN,
286276
beneficial_owner_individuals: Iterable[account_holder_create_params.KYBBeneficialOwnerIndividual]
287277
| NotGiven = NOT_GIVEN,
288278
business_entity: account_holder_create_params.KYBBusinessEntity | NotGiven = NOT_GIVEN,
289279
control_person: account_holder_create_params.KYBControlPerson | NotGiven = NOT_GIVEN,
290280
nature_of_business: str | NotGiven = NOT_GIVEN,
291281
tos_timestamp: str | NotGiven = NOT_GIVEN,
292282
workflow: Literal["KYB_BASIC", "KYB_BYO"] | Literal["KYC_BASIC", "KYC_BYO"] | Literal["KYC_EXEMPT"],
283+
beneficial_owner_entities: Iterable[account_holder_create_params.KYBBeneficialOwnerEntity]
284+
| NotGiven = NOT_GIVEN,
293285
external_id: str | NotGiven = NOT_GIVEN,
294286
kyb_passed_timestamp: str | NotGiven = NOT_GIVEN,
295287
website_url: str | NotGiven = NOT_GIVEN,
@@ -315,13 +307,13 @@ def create(
315307
"/v1/account_holders",
316308
body=maybe_transform(
317309
{
318-
"beneficial_owner_entities": beneficial_owner_entities,
319310
"beneficial_owner_individuals": beneficial_owner_individuals,
320311
"business_entity": business_entity,
321312
"control_person": control_person,
322313
"nature_of_business": nature_of_business,
323314
"tos_timestamp": tos_timestamp,
324315
"workflow": workflow,
316+
"beneficial_owner_entities": beneficial_owner_entities,
325317
"external_id": external_id,
326318
"kyb_passed_timestamp": kyb_passed_timestamp,
327319
"website_url": website_url,
@@ -1063,13 +1055,14 @@ def with_streaming_response(self) -> AsyncAccountHoldersWithStreamingResponse:
10631055
async def create(
10641056
self,
10651057
*,
1066-
beneficial_owner_entities: Iterable[account_holder_create_params.KYBBeneficialOwnerEntity],
10671058
beneficial_owner_individuals: Iterable[account_holder_create_params.KYBBeneficialOwnerIndividual],
10681059
business_entity: account_holder_create_params.KYBBusinessEntity,
10691060
control_person: account_holder_create_params.KYBControlPerson,
10701061
nature_of_business: str,
10711062
tos_timestamp: str,
10721063
workflow: Literal["KYB_BASIC", "KYB_BYO"],
1064+
beneficial_owner_entities: Iterable[account_holder_create_params.KYBBeneficialOwnerEntity]
1065+
| NotGiven = NOT_GIVEN,
10731066
external_id: str | NotGiven = NOT_GIVEN,
10741067
kyb_passed_timestamp: str | NotGiven = NOT_GIVEN,
10751068
website_url: str | NotGiven = NOT_GIVEN,
@@ -1090,21 +1083,11 @@ async def create(
10901083
accounts that are part of the program that the calling API key manages.
10911084
10921085
Args:
1093-
beneficial_owner_entities: List of all entities with >25% ownership in the company. If no entity or
1094-
individual owns >25% of the company, and the largest shareholder is an entity,
1095-
please identify them in this field. See
1096-
[FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf)
1097-
(Section I) for more background. If no business owner is an entity, pass in an
1098-
empty list. However, either this parameter or `beneficial_owner_individuals`
1099-
must be populated. on entities that should be included.
1100-
11011086
beneficial_owner_individuals: List of all direct and indirect individuals with >25% ownership in the company.
1102-
If no entity or individual owns >25% of the company, and the largest shareholder
1103-
is an individual, please identify them in this field. See
1087+
If no individual owns >25% of the company, please identify the largest
1088+
shareholder in this field. See
11041089
[FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf)
1105-
(Section I) for more background on individuals that should be included. If no
1106-
individual is an entity, pass in an empty list. However, either this parameter
1107-
or `beneficial_owner_entities` must be populated.
1090+
(Section I) for more background on individuals that should be included.
11081091
11091092
business_entity: Information for business for which the account is being opened and KYB is being
11101093
run.
@@ -1127,6 +1110,8 @@ async def create(
11271110
11281111
workflow: Specifies the type of KYB workflow to run.
11291112
1113+
beneficial_owner_entities: Deprecated.
1114+
11301115
external_id: A user provided id that can be used to link an account holder with an external
11311116
system
11321117
@@ -1264,7 +1249,6 @@ async def create(
12641249

12651250
@required_args(
12661251
[
1267-
"beneficial_owner_entities",
12681252
"beneficial_owner_individuals",
12691253
"business_entity",
12701254
"control_person",
@@ -1278,15 +1262,15 @@ async def create(
12781262
async def create(
12791263
self,
12801264
*,
1281-
beneficial_owner_entities: Iterable[account_holder_create_params.KYBBeneficialOwnerEntity]
1282-
| NotGiven = NOT_GIVEN,
12831265
beneficial_owner_individuals: Iterable[account_holder_create_params.KYBBeneficialOwnerIndividual]
12841266
| NotGiven = NOT_GIVEN,
12851267
business_entity: account_holder_create_params.KYBBusinessEntity | NotGiven = NOT_GIVEN,
12861268
control_person: account_holder_create_params.KYBControlPerson | NotGiven = NOT_GIVEN,
12871269
nature_of_business: str | NotGiven = NOT_GIVEN,
12881270
tos_timestamp: str | NotGiven = NOT_GIVEN,
12891271
workflow: Literal["KYB_BASIC", "KYB_BYO"] | Literal["KYC_BASIC", "KYC_BYO"] | Literal["KYC_EXEMPT"],
1272+
beneficial_owner_entities: Iterable[account_holder_create_params.KYBBeneficialOwnerEntity]
1273+
| NotGiven = NOT_GIVEN,
12901274
external_id: str | NotGiven = NOT_GIVEN,
12911275
kyb_passed_timestamp: str | NotGiven = NOT_GIVEN,
12921276
website_url: str | NotGiven = NOT_GIVEN,
@@ -1312,13 +1296,13 @@ async def create(
13121296
"/v1/account_holders",
13131297
body=await async_maybe_transform(
13141298
{
1315-
"beneficial_owner_entities": beneficial_owner_entities,
13161299
"beneficial_owner_individuals": beneficial_owner_individuals,
13171300
"business_entity": business_entity,
13181301
"control_person": control_person,
13191302
"nature_of_business": nature_of_business,
13201303
"tos_timestamp": tos_timestamp,
13211304
"workflow": workflow,
1305+
"beneficial_owner_entities": beneficial_owner_entities,
13221306
"external_id": external_id,
13231307
"kyb_passed_timestamp": kyb_passed_timestamp,
13241308
"website_url": website_url,

0 commit comments

Comments
 (0)