Skip to content

Commit 2a4cbcc

Browse files
feat(api): Add naics_code to account holder requests/responses
1 parent be4daa0 commit 2a4cbcc

File tree

4 files changed

+67
-18
lines changed

4 files changed

+67
-18
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 176
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-ce2adff9b644ed4562b5342a4a43d0b40c98d43b4e063b4626f4ca5d342f1b92.yml
3-
openapi_spec_hash: fbc84b866ce96457261ac58b4e75c71d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-05d665e9c7e81d85c0d6629bf3898e2eb221268d677b772ef3da3891b25d8346.yml
3+
openapi_spec_hash: fd8900412ab9a393719dba3669d44d3a
44
config_hash: faacaff68ffb3a4d051f0a7b8442e099

accountholder.go

Lines changed: 47 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,9 @@ type AccountHolder struct {
262262
// Only present when user_type == "INDIVIDUAL". Information about the individual
263263
// for which the account is being opened and KYC is being run.
264264
Individual AccountHolderIndividual `json:"individual"`
265+
// Only present when user_type == "BUSINESS". 6-digit North American Industry
266+
// Classification System (NAICS) code for the business.
267+
NaicsCode string `json:"naics_code"`
265268
// Only present when user_type == "BUSINESS". User-submitted description of the
266269
// business.
267270
NatureOfBusiness string `json:"nature_of_business"`
@@ -286,8 +289,8 @@ type AccountHolder struct {
286289
StatusReasons []AccountHolderStatusReason `json:"status_reasons"`
287290
// The type of Account Holder. If the type is "INDIVIDUAL", the "individual"
288291
// attribute will be present. If the type is "BUSINESS" then the "business_entity",
289-
// "control_person", "beneficial_owner_individuals", "nature_of_business", and
290-
// "website_url" attributes will be present.
292+
// "control_person", "beneficial_owner_individuals", "naics_code",
293+
// "nature_of_business", and "website_url" attributes will be present.
291294
UserType AccountHolderUserType `json:"user_type"`
292295
// Information about the most recent identity verification attempt
293296
VerificationApplication AccountHolderVerificationApplication `json:"verification_application"`
@@ -310,6 +313,7 @@ type accountHolderJSON struct {
310313
ExemptionType apijson.Field
311314
ExternalID apijson.Field
312315
Individual apijson.Field
316+
NaicsCode apijson.Field
313317
NatureOfBusiness apijson.Field
314318
PhoneNumber apijson.Field
315319
RequiredDocuments apijson.Field
@@ -620,8 +624,8 @@ func (r AccountHolderStatusReason) IsKnown() bool {
620624

621625
// The type of Account Holder. If the type is "INDIVIDUAL", the "individual"
622626
// attribute will be present. If the type is "BUSINESS" then the "business_entity",
623-
// "control_person", "beneficial_owner_individuals", "nature_of_business", and
624-
// "website_url" attributes will be present.
627+
// "control_person", "beneficial_owner_individuals", "naics_code",
628+
// "nature_of_business", and "website_url" attributes will be present.
625629
type AccountHolderUserType string
626630

627631
const (
@@ -783,6 +787,9 @@ type KYBParam struct {
783787
//
784788
// This field is required only if workflow type is `KYB_BYO`.
785789
KYBPassedTimestamp param.Field[string] `json:"kyb_passed_timestamp"`
790+
// 6-digit North American Industry Classification System (NAICS) code for the
791+
// business.
792+
NaicsCode param.Field[string] `json:"naics_code"`
786793
// Company website URL.
787794
WebsiteURL param.Field[string] `json:"website_url"`
788795
}
@@ -1317,6 +1324,9 @@ type AccountHolderUpdateResponse struct {
13171324
LastName string `json:"last_name"`
13181325
// The legal business name for the account holder
13191326
LegalBusinessName string `json:"legal_business_name"`
1327+
// Only present when user_type == "BUSINESS". 6-digit North American Industry
1328+
// Classification System (NAICS) code for the business.
1329+
NaicsCode string `json:"naics_code"`
13201330
// Only present when user_type == "BUSINESS". User-submitted description of the
13211331
// business.
13221332
NatureOfBusiness string `json:"nature_of_business"`
@@ -1339,8 +1349,8 @@ type AccountHolderUpdateResponse struct {
13391349
// attribute will be present.
13401350
//
13411351
// If the type is "BUSINESS" then the "business_entity", "control_person",
1342-
// "beneficial_owner_individuals", "nature_of_business", and "website_url"
1343-
// attributes will be present.
1352+
// "beneficial_owner_individuals", "naics_code", "nature_of_business", and
1353+
// "website_url" attributes will be present.
13441354
UserType AccountHolderUpdateResponseUserType `json:"user_type"`
13451355
// This field can have the runtime type of
13461356
// [AccountHolderUpdateResponseKYBKYCPatchResponseVerificationApplication].
@@ -1370,6 +1380,7 @@ type accountHolderUpdateResponseJSON struct {
13701380
Individual apijson.Field
13711381
LastName apijson.Field
13721382
LegalBusinessName apijson.Field
1383+
NaicsCode apijson.Field
13731384
NatureOfBusiness apijson.Field
13741385
PhoneNumber apijson.Field
13751386
RequiredDocuments apijson.Field
@@ -1474,6 +1485,9 @@ type AccountHolderUpdateResponseKYBKYCPatchResponse struct {
14741485
// Only present when user_type == "INDIVIDUAL". Information about the individual
14751486
// for which the account is being opened and KYC is being run.
14761487
Individual AccountHolderUpdateResponseKYBKYCPatchResponseIndividual `json:"individual"`
1488+
// Only present when user_type == "BUSINESS". 6-digit North American Industry
1489+
// Classification System (NAICS) code for the business.
1490+
NaicsCode string `json:"naics_code"`
14771491
// Only present when user_type == "BUSINESS". User-submitted description of the
14781492
// business.
14791493
NatureOfBusiness string `json:"nature_of_business"`
@@ -1497,8 +1511,8 @@ type AccountHolderUpdateResponseKYBKYCPatchResponse struct {
14971511
// attribute will be present.
14981512
//
14991513
// If the type is "BUSINESS" then the "business_entity", "control_person",
1500-
// "beneficial_owner_individuals", "nature_of_business", and "website_url"
1501-
// attributes will be present.
1514+
// "beneficial_owner_individuals", "naics_code", "nature_of_business", and
1515+
// "website_url" attributes will be present.
15021516
UserType AccountHolderUpdateResponseKYBKYCPatchResponseUserType `json:"user_type"`
15031517
// Information about the most recent identity verification attempt
15041518
VerificationApplication AccountHolderUpdateResponseKYBKYCPatchResponseVerificationApplication `json:"verification_application"`
@@ -1522,6 +1536,7 @@ type accountHolderUpdateResponseKybkycPatchResponseJSON struct {
15221536
ExemptionType apijson.Field
15231537
ExternalID apijson.Field
15241538
Individual apijson.Field
1539+
NaicsCode apijson.Field
15251540
NatureOfBusiness apijson.Field
15261541
PhoneNumber apijson.Field
15271542
RequiredDocuments apijson.Field
@@ -1887,8 +1902,8 @@ func (r AccountHolderUpdateResponseKybkycPatchResponseStatusReason) IsKnown() bo
18871902
// attribute will be present.
18881903
//
18891904
// If the type is "BUSINESS" then the "business_entity", "control_person",
1890-
// "beneficial_owner_individuals", "nature_of_business", and "website_url"
1891-
// attributes will be present.
1905+
// "beneficial_owner_individuals", "naics_code", "nature_of_business", and
1906+
// "website_url" attributes will be present.
18921907
type AccountHolderUpdateResponseKYBKYCPatchResponseUserType string
18931908

18941909
const (
@@ -2132,8 +2147,8 @@ func (r AccountHolderUpdateResponseStatus) IsKnown() bool {
21322147
// attribute will be present.
21332148
//
21342149
// If the type is "BUSINESS" then the "business_entity", "control_person",
2135-
// "beneficial_owner_individuals", "nature_of_business", and "website_url"
2136-
// attributes will be present.
2150+
// "beneficial_owner_individuals", "naics_code", "nature_of_business", and
2151+
// "website_url" attributes will be present.
21372152
type AccountHolderUpdateResponseUserType string
21382153

21392154
const (
@@ -2218,6 +2233,9 @@ type AccountHolderSimulateEnrollmentReviewResponse struct {
22182233
// Only present when user_type == "INDIVIDUAL". Information about the individual
22192234
// for which the account is being opened and KYC is being run.
22202235
Individual AccountHolderSimulateEnrollmentReviewResponseIndividual `json:"individual"`
2236+
// Only present when user_type == "BUSINESS". 6-digit North American Industry
2237+
// Classification System (NAICS) code for the business.
2238+
NaicsCode string `json:"naics_code"`
22212239
// Only present when user_type == "BUSINESS". User-submitted description of the
22222240
// business.
22232241
NatureOfBusiness string `json:"nature_of_business"`
@@ -2241,8 +2259,8 @@ type AccountHolderSimulateEnrollmentReviewResponse struct {
22412259
// attribute will be present.
22422260
//
22432261
// If the type is "BUSINESS" then the "business_entity", "control_person",
2244-
// "beneficial_owner_individuals", "nature_of_business", and "website_url"
2245-
// attributes will be present.
2262+
// "beneficial_owner_individuals", "naics_code", "nature_of_business", and
2263+
// "website_url" attributes will be present.
22462264
UserType AccountHolderSimulateEnrollmentReviewResponseUserType `json:"user_type"`
22472265
// Information about the most recent identity verification attempt
22482266
VerificationApplication AccountHolderSimulateEnrollmentReviewResponseVerificationApplication `json:"verification_application"`
@@ -2266,6 +2284,7 @@ type accountHolderSimulateEnrollmentReviewResponseJSON struct {
22662284
ExemptionType apijson.Field
22672285
ExternalID apijson.Field
22682286
Individual apijson.Field
2287+
NaicsCode apijson.Field
22692288
NatureOfBusiness apijson.Field
22702289
PhoneNumber apijson.Field
22712290
RequiredDocuments apijson.Field
@@ -2629,8 +2648,8 @@ func (r AccountHolderSimulateEnrollmentReviewResponseStatusReason) IsKnown() boo
26292648
// attribute will be present.
26302649
//
26312650
// If the type is "BUSINESS" then the "business_entity", "control_person",
2632-
// "beneficial_owner_individuals", "nature_of_business", and "website_url"
2633-
// attributes will be present.
2651+
// "beneficial_owner_individuals", "naics_code", "nature_of_business", and
2652+
// "website_url" attributes will be present.
26342653
type AccountHolderSimulateEnrollmentReviewResponseUserType string
26352654

26362655
const (
@@ -2787,6 +2806,9 @@ type AccountHolderNewParamsBody struct {
27872806
KYCPassedTimestamp param.Field[string] `json:"kyc_passed_timestamp"`
27882807
// The KYC Exempt user's last name
27892808
LastName param.Field[string] `json:"last_name"`
2809+
// 6-digit North American Industry Classification System (NAICS) code for the
2810+
// business.
2811+
NaicsCode param.Field[string] `json:"naics_code"`
27902812
// Short description of the company's line of business (i.e., what does the company
27912813
// do?).
27922814
NatureOfBusiness param.Field[string] `json:"nature_of_business"`
@@ -2836,6 +2858,9 @@ type AccountHolderNewParamsBodyKYBDelegated struct {
28362858
// A user provided id that can be used to link an account holder with an external
28372859
// system
28382860
ExternalID param.Field[string] `json:"external_id"`
2861+
// 6-digit North American Industry Classification System (NAICS) code for the
2862+
// business.
2863+
NaicsCode param.Field[string] `json:"naics_code"`
28392864
// Short description of the company's line of business (i.e., what does the company
28402865
// do?).
28412866
NatureOfBusiness param.Field[string] `json:"nature_of_business"`
@@ -3026,6 +3051,9 @@ type AccountHolderUpdateParamsBody struct {
30263051
LastName param.Field[string] `json:"last_name"`
30273052
// Allowed for BYO-KYB. Legal business name of the account holder.
30283053
LegalBusinessName param.Field[string] `json:"legal_business_name"`
3054+
// 6-digit North American Industry Classification System (NAICS) code for the
3055+
// business.
3056+
NaicsCode param.Field[string] `json:"naics_code"`
30293057
// Short description of the company's line of business (i.e., what does the company
30303058
// do?).
30313059
NatureOfBusiness param.Field[string] `json:"nature_of_business"`
@@ -3080,6 +3108,9 @@ type AccountHolderUpdateParamsBodyKYBPatchRequest struct {
30803108
// A user provided id that can be used to link an account holder with an external
30813109
// system
30823110
ExternalID param.Field[string] `json:"external_id"`
3111+
// 6-digit North American Industry Classification System (NAICS) code for the
3112+
// business.
3113+
NaicsCode param.Field[string] `json:"naics_code"`
30833114
// Short description of the company's line of business (i.e., what does the company
30843115
// do?).
30853116
NatureOfBusiness param.Field[string] `json:"nature_of_business"`

accountholder_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ func TestAccountHolderNewWithOptionalParams(t *testing.T) {
9696
}}),
9797
ExternalID: lithic.F("external_id"),
9898
KYBPassedTimestamp: lithic.F("2022-03-08T08:00:00Z"),
99+
NaicsCode: lithic.F("541512"),
99100
WebsiteURL: lithic.F("https://www.mybusiness.com"),
100101
},
101102
})
@@ -214,6 +215,7 @@ func TestAccountHolderUpdateWithOptionalParams(t *testing.T) {
214215
PhoneNumber: lithic.F("+15555555555"),
215216
}),
216217
ExternalID: lithic.F("external_id"),
218+
NaicsCode: lithic.F("541512"),
217219
NatureOfBusiness: lithic.F("Software company selling solutions to the restaurant industry"),
218220
WebsiteURL: lithic.F("https://www.mynewbusiness.com"),
219221
},

webhook.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ type AccountHolderUpdatedWebhookEvent struct {
172172
LastName string `json:"last_name"`
173173
// If applicable, represents the account_holder's business name.
174174
LegalBusinessName string `json:"legal_business_name"`
175+
// 6-digit North American Industry Classification System (NAICS) code for the
176+
// business. Only present if naics_code was included in the update request.
177+
NaicsCode string `json:"naics_code"`
175178
// Short description of the company's line of business (i.e., what does the company
176179
// do?).
177180
NatureOfBusiness string `json:"nature_of_business"`
@@ -200,6 +203,7 @@ type accountHolderUpdatedWebhookEventJSON struct {
200203
FirstName apijson.Field
201204
LastName apijson.Field
202205
LegalBusinessName apijson.Field
206+
NaicsCode apijson.Field
203207
NatureOfBusiness apijson.Field
204208
PhoneNumber apijson.Field
205209
UpdateRequest apijson.Field
@@ -271,6 +275,9 @@ type AccountHolderUpdatedWebhookEventKYBPayload struct {
271275
// A user provided id that can be used to link an account holder with an external
272276
// system
273277
ExternalID string `json:"external_id"`
278+
// 6-digit North American Industry Classification System (NAICS) code for the
279+
// business. Only present if naics_code was included in the update request.
280+
NaicsCode string `json:"naics_code"`
274281
// Short description of the company's line of business (i.e., what does the company
275282
// do?).
276283
NatureOfBusiness string `json:"nature_of_business"`
@@ -286,6 +293,7 @@ type accountHolderUpdatedWebhookEventKYBPayloadJSON struct {
286293
UpdateRequest apijson.Field
287294
EventType apijson.Field
288295
ExternalID apijson.Field
296+
NaicsCode apijson.Field
289297
NatureOfBusiness apijson.Field
290298
WebsiteURL apijson.Field
291299
raw string
@@ -5187,6 +5195,9 @@ type ParsedWebhookEvent struct {
51875195
MethodAttributes interface{} `json:"method_attributes"`
51885196
// This field can have the runtime type of [LoanTapeMinimumPaymentBalance].
51895197
MinimumPaymentBalance interface{} `json:"minimum_payment_balance"`
5198+
// 6-digit North American Industry Classification System (NAICS) code for the
5199+
// business. Only present if naics_code was included in the update request.
5200+
NaicsCode string `json:"naics_code"`
51905201
// The nickname for this External Bank Account
51915202
Name string `json:"name,nullable"`
51925203
// Short description of the company's line of business (i.e., what does the company
@@ -5587,6 +5598,7 @@ type parsedWebhookEventJSON struct {
55875598
Method apijson.Field
55885599
MethodAttributes apijson.Field
55895600
MinimumPaymentBalance apijson.Field
5601+
NaicsCode apijson.Field
55905602
Name apijson.Field
55915603
NatureOfBusiness apijson.Field
55925604
Network apijson.Field
@@ -6044,6 +6056,9 @@ type ParsedWebhookEventKYBPayload struct {
60446056
// A user provided id that can be used to link an account holder with an external
60456057
// system
60466058
ExternalID string `json:"external_id"`
6059+
// 6-digit North American Industry Classification System (NAICS) code for the
6060+
// business. Only present if naics_code was included in the update request.
6061+
NaicsCode string `json:"naics_code"`
60476062
// Short description of the company's line of business (i.e., what does the company
60486063
// do?).
60496064
NatureOfBusiness string `json:"nature_of_business"`
@@ -6059,6 +6074,7 @@ type parsedWebhookEventKYBPayloadJSON struct {
60596074
UpdateRequest apijson.Field
60606075
EventType apijson.Field
60616076
ExternalID apijson.Field
6077+
NaicsCode apijson.Field
60626078
NatureOfBusiness apijson.Field
60636079
WebsiteURL apijson.Field
60646080
raw string

0 commit comments

Comments
 (0)