-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconnectionlegalentity.go
659 lines (579 loc) · 42.8 KB
/
connectionlegalentity.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
package moderntreasury
import (
"context"
"errors"
"fmt"
"net/http"
"net/url"
"time"
"github.com/Modern-Treasury/modern-treasury-go/v2/internal/apijson"
"github.com/Modern-Treasury/modern-treasury-go/v2/internal/apiquery"
"github.com/Modern-Treasury/modern-treasury-go/v2/internal/param"
"github.com/Modern-Treasury/modern-treasury-go/v2/internal/requestconfig"
"github.com/Modern-Treasury/modern-treasury-go/v2/option"
"github.com/Modern-Treasury/modern-treasury-go/v2/packages/pagination"
)
// ConnectionLegalEntityService contains methods and other services that help with
// interacting with the Modern Treasury API.
//
// Note, unlike clients, this service does not read variables from the environment
// automatically. You should not instantiate this service directly, and instead use
// the [NewConnectionLegalEntityService] method instead.
type ConnectionLegalEntityService struct {
Options []option.RequestOption
}
// NewConnectionLegalEntityService generates a new service that applies the given
// options to each request. These options are applied after the parent client's
// options (if there is one), and before any request-specific options.
func NewConnectionLegalEntityService(opts ...option.RequestOption) (r *ConnectionLegalEntityService) {
r = &ConnectionLegalEntityService{}
r.Options = opts
return
}
// Create a connection legal entity.
func (r *ConnectionLegalEntityService) New(ctx context.Context, body ConnectionLegalEntityNewParams, opts ...option.RequestOption) (res *ConnectionLegalEntity, err error) {
opts = append(r.Options[:], opts...)
path := "api/connection_legal_entities"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...)
return
}
// Get details on a single connection legal entity.
func (r *ConnectionLegalEntityService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *ConnectionLegalEntity, err error) {
opts = append(r.Options[:], opts...)
if id == "" {
err = errors.New("missing required id parameter")
return
}
path := fmt.Sprintf("api/connection_legal_entities/%s", id)
err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}
// Update a connection legal entity.
func (r *ConnectionLegalEntityService) Update(ctx context.Context, id string, body ConnectionLegalEntityUpdateParams, opts ...option.RequestOption) (res *ConnectionLegalEntity, err error) {
opts = append(r.Options[:], opts...)
if id == "" {
err = errors.New("missing required id parameter")
return
}
path := fmt.Sprintf("api/connection_legal_entities/%s", id)
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...)
return
}
// Get a list of all connection legal entities.
func (r *ConnectionLegalEntityService) List(ctx context.Context, query ConnectionLegalEntityListParams, opts ...option.RequestOption) (res *pagination.Page[ConnectionLegalEntity], err error) {
var raw *http.Response
opts = append(r.Options[:], opts...)
opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...)
path := "api/connection_legal_entities"
cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...)
if err != nil {
return nil, err
}
err = cfg.Execute()
if err != nil {
return nil, err
}
res.SetPageConfig(cfg, raw)
return res, nil
}
// Get a list of all connection legal entities.
func (r *ConnectionLegalEntityService) ListAutoPaging(ctx context.Context, query ConnectionLegalEntityListParams, opts ...option.RequestOption) *pagination.PageAutoPager[ConnectionLegalEntity] {
return pagination.NewPageAutoPager(r.List(ctx, query, opts...))
}
type ConnectionLegalEntity struct {
ID string `json:"id,required" format:"uuid"`
// The ID of the connection.
ConnectionID string `json:"connection_id,required"`
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
DiscardedAt time.Time `json:"discarded_at,required,nullable" format:"date-time"`
// The ID of the legal entity.
LegalEntityID string `json:"legal_entity_id,required"`
// This field will be true if this object exists in the live environment or false
// if it exists in the test environment.
LiveMode bool `json:"live_mode,required"`
Object string `json:"object,required"`
// The status of the connection legal entity.
Status ConnectionLegalEntityStatus `json:"status,required"`
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
// The ID of the legal entity at the vendor.
VendorID string `json:"vendor_id,required"`
JSON connectionLegalEntityJSON `json:"-"`
}
// connectionLegalEntityJSON contains the JSON metadata for the struct
// [ConnectionLegalEntity]
type connectionLegalEntityJSON struct {
ID apijson.Field
ConnectionID apijson.Field
CreatedAt apijson.Field
DiscardedAt apijson.Field
LegalEntityID apijson.Field
LiveMode apijson.Field
Object apijson.Field
Status apijson.Field
UpdatedAt apijson.Field
VendorID apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ConnectionLegalEntity) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r connectionLegalEntityJSON) RawJSON() string {
return r.raw
}
// The status of the connection legal entity.
type ConnectionLegalEntityStatus string
const (
ConnectionLegalEntityStatusCompleted ConnectionLegalEntityStatus = "completed"
ConnectionLegalEntityStatusDenied ConnectionLegalEntityStatus = "denied"
ConnectionLegalEntityStatusFailed ConnectionLegalEntityStatus = "failed"
ConnectionLegalEntityStatusProcessing ConnectionLegalEntityStatus = "processing"
)
func (r ConnectionLegalEntityStatus) IsKnown() bool {
switch r {
case ConnectionLegalEntityStatusCompleted, ConnectionLegalEntityStatusDenied, ConnectionLegalEntityStatusFailed, ConnectionLegalEntityStatusProcessing:
return true
}
return false
}
type ConnectionLegalEntityNewParams struct {
// The ID of the connection.
ConnectionID param.Field[string] `json:"connection_id,required"`
// The legal entity.
LegalEntity param.Field[ConnectionLegalEntityNewParamsLegalEntity] `json:"legal_entity"`
// The ID of the legal entity.
LegalEntityID param.Field[string] `json:"legal_entity_id"`
}
func (r ConnectionLegalEntityNewParams) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
// The legal entity.
type ConnectionLegalEntityNewParamsLegalEntity struct {
// A list of addresses for the entity.
Addresses param.Field[[]ConnectionLegalEntityNewParamsLegalEntityAddress] `json:"addresses"`
BankSettings param.Field[BankSettingsParam] `json:"bank_settings"`
// The business's legal business name.
BusinessName param.Field[string] `json:"business_name"`
// The country of citizenship for an individual.
CitizenshipCountry param.Field[string] `json:"citizenship_country"`
// A business's formation date (YYYY-MM-DD).
DateFormed param.Field[time.Time] `json:"date_formed" format:"date"`
// An individual's date of birth (YYYY-MM-DD).
DateOfBirth param.Field[time.Time] `json:"date_of_birth" format:"date"`
DoingBusinessAsNames param.Field[[]string] `json:"doing_business_as_names"`
// The entity's primary email.
Email param.Field[string] `json:"email"`
// An individual's first name.
FirstName param.Field[string] `json:"first_name"`
// A list of identifications for the legal entity.
Identifications param.Field[[]ConnectionLegalEntityNewParamsLegalEntityIdentification] `json:"identifications"`
// An individual's last name.
LastName param.Field[string] `json:"last_name"`
// The legal entity associations and its child legal entities.
LegalEntityAssociations param.Field[[]ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociation] `json:"legal_entity_associations"`
// The type of legal entity.
LegalEntityType param.Field[ConnectionLegalEntityNewParamsLegalEntityLegalEntityType] `json:"legal_entity_type"`
// The business's legal structure.
LegalStructure param.Field[ConnectionLegalEntityNewParamsLegalEntityLegalStructure] `json:"legal_structure"`
// Additional data represented as key-value pairs. Both the key and value must be
// strings.
Metadata param.Field[map[string]string] `json:"metadata"`
// An individual's middle name.
MiddleName param.Field[string] `json:"middle_name"`
PhoneNumbers param.Field[[]ConnectionLegalEntityNewParamsLegalEntityPhoneNumber] `json:"phone_numbers"`
// Whether the individual is a politically exposed person.
PoliticallyExposedPerson param.Field[bool] `json:"politically_exposed_person"`
// An individual's preferred name.
PreferredName param.Field[string] `json:"preferred_name"`
// An individual's prefix.
Prefix param.Field[string] `json:"prefix"`
// The risk rating of the legal entity. One of low, medium, high.
RiskRating param.Field[ConnectionLegalEntityNewParamsLegalEntityRiskRating] `json:"risk_rating"`
// An individual's suffix.
Suffix param.Field[string] `json:"suffix"`
WealthAndEmploymentDetails param.Field[WealthAndEmploymentDetailsParam] `json:"wealth_and_employment_details"`
// The entity's primary website URL.
Website param.Field[string] `json:"website"`
}
func (r ConnectionLegalEntityNewParamsLegalEntity) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
type ConnectionLegalEntityNewParamsLegalEntityAddress struct {
// Country code conforms to [ISO 3166-1 alpha-2]
Country param.Field[string] `json:"country,required"`
Line1 param.Field[string] `json:"line1,required"`
// Locality or City.
Locality param.Field[string] `json:"locality,required"`
// The postal code of the address.
PostalCode param.Field[string] `json:"postal_code,required"`
// Region or State.
Region param.Field[string] `json:"region,required"`
// The types of this address.
AddressTypes param.Field[[]ConnectionLegalEntityNewParamsLegalEntityAddressesAddressType] `json:"address_types"`
Line2 param.Field[string] `json:"line2"`
}
func (r ConnectionLegalEntityNewParamsLegalEntityAddress) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
type ConnectionLegalEntityNewParamsLegalEntityAddressesAddressType string
const (
ConnectionLegalEntityNewParamsLegalEntityAddressesAddressTypeBusiness ConnectionLegalEntityNewParamsLegalEntityAddressesAddressType = "business"
ConnectionLegalEntityNewParamsLegalEntityAddressesAddressTypeMailing ConnectionLegalEntityNewParamsLegalEntityAddressesAddressType = "mailing"
ConnectionLegalEntityNewParamsLegalEntityAddressesAddressTypeOther ConnectionLegalEntityNewParamsLegalEntityAddressesAddressType = "other"
ConnectionLegalEntityNewParamsLegalEntityAddressesAddressTypePoBox ConnectionLegalEntityNewParamsLegalEntityAddressesAddressType = "po_box"
ConnectionLegalEntityNewParamsLegalEntityAddressesAddressTypeResidential ConnectionLegalEntityNewParamsLegalEntityAddressesAddressType = "residential"
)
func (r ConnectionLegalEntityNewParamsLegalEntityAddressesAddressType) IsKnown() bool {
switch r {
case ConnectionLegalEntityNewParamsLegalEntityAddressesAddressTypeBusiness, ConnectionLegalEntityNewParamsLegalEntityAddressesAddressTypeMailing, ConnectionLegalEntityNewParamsLegalEntityAddressesAddressTypeOther, ConnectionLegalEntityNewParamsLegalEntityAddressesAddressTypePoBox, ConnectionLegalEntityNewParamsLegalEntityAddressesAddressTypeResidential:
return true
}
return false
}
type ConnectionLegalEntityNewParamsLegalEntityIdentification struct {
// The ID number of identification document.
IDNumber param.Field[string] `json:"id_number,required"`
// The type of ID number.
IDType param.Field[ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDType] `json:"id_type,required"`
// The ISO 3166-1 alpha-2 country code of the country that issued the
// identification
IssuingCountry param.Field[string] `json:"issuing_country"`
}
func (r ConnectionLegalEntityNewParamsLegalEntityIdentification) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
// The type of ID number.
type ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDType string
const (
ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeArCuil ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDType = "ar_cuil"
ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeArCuit ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDType = "ar_cuit"
ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeBrCnpj ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDType = "br_cnpj"
ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeBrCpf ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDType = "br_cpf"
ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeClRun ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDType = "cl_run"
ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeClRut ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDType = "cl_rut"
ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeCoCedulas ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDType = "co_cedulas"
ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeCoNit ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDType = "co_nit"
ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeHnID ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDType = "hn_id"
ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeHnRtn ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDType = "hn_rtn"
ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeInLei ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDType = "in_lei"
ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeKrBrn ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDType = "kr_brn"
ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeKrCrn ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDType = "kr_crn"
ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeKrRrn ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDType = "kr_rrn"
ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypePassport ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDType = "passport"
ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeSaTin ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDType = "sa_tin"
ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeSaVat ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDType = "sa_vat"
ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeUsEin ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDType = "us_ein"
ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeUsItin ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDType = "us_itin"
ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeUsSsn ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDType = "us_ssn"
ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeVnTin ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDType = "vn_tin"
)
func (r ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDType) IsKnown() bool {
switch r {
case ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeArCuil, ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeArCuit, ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeBrCnpj, ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeBrCpf, ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeClRun, ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeClRut, ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeCoCedulas, ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeCoNit, ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeHnID, ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeHnRtn, ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeInLei, ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeKrBrn, ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeKrCrn, ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeKrRrn, ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypePassport, ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeSaTin, ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeSaVat, ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeUsEin, ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeUsItin, ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeUsSsn, ConnectionLegalEntityNewParamsLegalEntityIdentificationsIDTypeVnTin:
return true
}
return false
}
type ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociation struct {
RelationshipTypes param.Field[[]ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsRelationshipType] `json:"relationship_types,required"`
// The child legal entity.
ChildLegalEntity param.Field[ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntity] `json:"child_legal_entity"`
// The ID of the child legal entity.
ChildLegalEntityID param.Field[string] `json:"child_legal_entity_id"`
// The child entity's ownership percentage iff they are a beneficial owner.
OwnershipPercentage param.Field[int64] `json:"ownership_percentage"`
// The job title of the child entity at the parent entity.
Title param.Field[string] `json:"title"`
}
func (r ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociation) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
// A list of relationship types for how the child entity relates to parent entity.
type ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsRelationshipType string
const (
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsRelationshipTypeBeneficialOwner ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsRelationshipType = "beneficial_owner"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsRelationshipTypeControlPerson ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsRelationshipType = "control_person"
)
func (r ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsRelationshipType) IsKnown() bool {
switch r {
case ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsRelationshipTypeBeneficialOwner, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsRelationshipTypeControlPerson:
return true
}
return false
}
// The child legal entity.
type ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntity struct {
// A list of addresses for the entity.
Addresses param.Field[[]ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddress] `json:"addresses"`
BankSettings param.Field[BankSettingsParam] `json:"bank_settings"`
// The business's legal business name.
BusinessName param.Field[string] `json:"business_name"`
// The country of citizenship for an individual.
CitizenshipCountry param.Field[string] `json:"citizenship_country"`
// A business's formation date (YYYY-MM-DD).
DateFormed param.Field[time.Time] `json:"date_formed" format:"date"`
// An individual's date of birth (YYYY-MM-DD).
DateOfBirth param.Field[time.Time] `json:"date_of_birth" format:"date"`
DoingBusinessAsNames param.Field[[]string] `json:"doing_business_as_names"`
// The entity's primary email.
Email param.Field[string] `json:"email"`
// An individual's first name.
FirstName param.Field[string] `json:"first_name"`
// A list of identifications for the legal entity.
Identifications param.Field[[]ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentification] `json:"identifications"`
// An individual's last name.
LastName param.Field[string] `json:"last_name"`
// The type of legal entity.
LegalEntityType param.Field[ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalEntityType] `json:"legal_entity_type"`
// The business's legal structure.
LegalStructure param.Field[ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructure] `json:"legal_structure"`
// Additional data represented as key-value pairs. Both the key and value must be
// strings.
Metadata param.Field[map[string]string] `json:"metadata"`
// An individual's middle name.
MiddleName param.Field[string] `json:"middle_name"`
PhoneNumbers param.Field[[]ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityPhoneNumber] `json:"phone_numbers"`
// Whether the individual is a politically exposed person.
PoliticallyExposedPerson param.Field[bool] `json:"politically_exposed_person"`
// An individual's preferred name.
PreferredName param.Field[string] `json:"preferred_name"`
// An individual's prefix.
Prefix param.Field[string] `json:"prefix"`
// The risk rating of the legal entity. One of low, medium, high.
RiskRating param.Field[ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityRiskRating] `json:"risk_rating"`
// An individual's suffix.
Suffix param.Field[string] `json:"suffix"`
WealthAndEmploymentDetails param.Field[WealthAndEmploymentDetailsParam] `json:"wealth_and_employment_details"`
// The entity's primary website URL.
Website param.Field[string] `json:"website"`
}
func (r ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntity) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
type ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddress struct {
// Country code conforms to [ISO 3166-1 alpha-2]
Country param.Field[string] `json:"country,required"`
Line1 param.Field[string] `json:"line1,required"`
// Locality or City.
Locality param.Field[string] `json:"locality,required"`
// The postal code of the address.
PostalCode param.Field[string] `json:"postal_code,required"`
// Region or State.
Region param.Field[string] `json:"region,required"`
// The types of this address.
AddressTypes param.Field[[]ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType] `json:"address_types"`
Line2 param.Field[string] `json:"line2"`
}
func (r ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddress) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
type ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType string
const (
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType = "business"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType = "mailing"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType = "other"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypePoBox ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType = "po_box"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeResidential ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType = "residential"
)
func (r ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressType) IsKnown() bool {
switch r {
case ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeBusiness, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeMailing, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeOther, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypePoBox, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityAddressesAddressTypeResidential:
return true
}
return false
}
type ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentification struct {
// The ID number of identification document.
IDNumber param.Field[string] `json:"id_number,required"`
// The type of ID number.
IDType param.Field[ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDType] `json:"id_type,required"`
// The ISO 3166-1 alpha-2 country code of the country that issued the
// identification
IssuingCountry param.Field[string] `json:"issuing_country"`
}
func (r ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentification) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
// The type of ID number.
type ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDType string
const (
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDType = "ar_cuil"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuit ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDType = "ar_cuit"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeBrCnpj ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDType = "br_cnpj"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeBrCpf ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDType = "br_cpf"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeClRun ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDType = "cl_run"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeClRut ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDType = "cl_rut"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeCoCedulas ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDType = "co_cedulas"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeCoNit ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDType = "co_nit"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeHnID ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDType = "hn_id"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeHnRtn ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDType = "hn_rtn"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeInLei ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDType = "in_lei"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeKrBrn ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDType = "kr_brn"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeKrCrn ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDType = "kr_crn"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeKrRrn ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDType = "kr_rrn"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypePassport ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDType = "passport"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeSaTin ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDType = "sa_tin"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeSaVat ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDType = "sa_vat"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeUsEin ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDType = "us_ein"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeUsItin ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDType = "us_itin"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeUsSsn ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDType = "us_ssn"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeVnTin ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDType = "vn_tin"
)
func (r ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDType) IsKnown() bool {
switch r {
case ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuil, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeArCuit, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeBrCnpj, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeBrCpf, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeClRun, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeClRut, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeCoCedulas, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeCoNit, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeHnID, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeHnRtn, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeInLei, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeKrBrn, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeKrCrn, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeKrRrn, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypePassport, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeSaTin, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeSaVat, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeUsEin, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeUsItin, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeUsSsn, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityIdentificationsIDTypeVnTin:
return true
}
return false
}
// The type of legal entity.
type ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalEntityType string
const (
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalEntityTypeBusiness ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalEntityType = "business"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalEntityTypeIndividual ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalEntityType = "individual"
)
func (r ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalEntityType) IsKnown() bool {
switch r {
case ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalEntityTypeBusiness, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalEntityTypeIndividual:
return true
}
return false
}
// The business's legal structure.
type ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructure string
const (
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructureCorporation ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructure = "corporation"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructureLlc ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructure = "llc"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructureNonProfit ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructure = "non_profit"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructurePartnership ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructure = "partnership"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructureSoleProprietorship ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructure = "sole_proprietorship"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructureTrust ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructure = "trust"
)
func (r ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructure) IsKnown() bool {
switch r {
case ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructureCorporation, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructureLlc, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructureNonProfit, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructurePartnership, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructureSoleProprietorship, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityLegalStructureTrust:
return true
}
return false
}
// A list of phone numbers in E.164 format.
type ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityPhoneNumber struct {
PhoneNumber param.Field[string] `json:"phone_number"`
}
func (r ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityPhoneNumber) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
// The risk rating of the legal entity. One of low, medium, high.
type ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityRiskRating string
const (
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityRiskRatingLow ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityRiskRating = "low"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityRiskRatingMedium ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityRiskRating = "medium"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityRiskRatingHigh ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityRiskRating = "high"
)
func (r ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityRiskRating) IsKnown() bool {
switch r {
case ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityRiskRatingLow, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityRiskRatingMedium, ConnectionLegalEntityNewParamsLegalEntityLegalEntityAssociationsChildLegalEntityRiskRatingHigh:
return true
}
return false
}
// The type of legal entity.
type ConnectionLegalEntityNewParamsLegalEntityLegalEntityType string
const (
ConnectionLegalEntityNewParamsLegalEntityLegalEntityTypeBusiness ConnectionLegalEntityNewParamsLegalEntityLegalEntityType = "business"
ConnectionLegalEntityNewParamsLegalEntityLegalEntityTypeIndividual ConnectionLegalEntityNewParamsLegalEntityLegalEntityType = "individual"
)
func (r ConnectionLegalEntityNewParamsLegalEntityLegalEntityType) IsKnown() bool {
switch r {
case ConnectionLegalEntityNewParamsLegalEntityLegalEntityTypeBusiness, ConnectionLegalEntityNewParamsLegalEntityLegalEntityTypeIndividual:
return true
}
return false
}
// The business's legal structure.
type ConnectionLegalEntityNewParamsLegalEntityLegalStructure string
const (
ConnectionLegalEntityNewParamsLegalEntityLegalStructureCorporation ConnectionLegalEntityNewParamsLegalEntityLegalStructure = "corporation"
ConnectionLegalEntityNewParamsLegalEntityLegalStructureLlc ConnectionLegalEntityNewParamsLegalEntityLegalStructure = "llc"
ConnectionLegalEntityNewParamsLegalEntityLegalStructureNonProfit ConnectionLegalEntityNewParamsLegalEntityLegalStructure = "non_profit"
ConnectionLegalEntityNewParamsLegalEntityLegalStructurePartnership ConnectionLegalEntityNewParamsLegalEntityLegalStructure = "partnership"
ConnectionLegalEntityNewParamsLegalEntityLegalStructureSoleProprietorship ConnectionLegalEntityNewParamsLegalEntityLegalStructure = "sole_proprietorship"
ConnectionLegalEntityNewParamsLegalEntityLegalStructureTrust ConnectionLegalEntityNewParamsLegalEntityLegalStructure = "trust"
)
func (r ConnectionLegalEntityNewParamsLegalEntityLegalStructure) IsKnown() bool {
switch r {
case ConnectionLegalEntityNewParamsLegalEntityLegalStructureCorporation, ConnectionLegalEntityNewParamsLegalEntityLegalStructureLlc, ConnectionLegalEntityNewParamsLegalEntityLegalStructureNonProfit, ConnectionLegalEntityNewParamsLegalEntityLegalStructurePartnership, ConnectionLegalEntityNewParamsLegalEntityLegalStructureSoleProprietorship, ConnectionLegalEntityNewParamsLegalEntityLegalStructureTrust:
return true
}
return false
}
// A list of phone numbers in E.164 format.
type ConnectionLegalEntityNewParamsLegalEntityPhoneNumber struct {
PhoneNumber param.Field[string] `json:"phone_number"`
}
func (r ConnectionLegalEntityNewParamsLegalEntityPhoneNumber) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
// The risk rating of the legal entity. One of low, medium, high.
type ConnectionLegalEntityNewParamsLegalEntityRiskRating string
const (
ConnectionLegalEntityNewParamsLegalEntityRiskRatingLow ConnectionLegalEntityNewParamsLegalEntityRiskRating = "low"
ConnectionLegalEntityNewParamsLegalEntityRiskRatingMedium ConnectionLegalEntityNewParamsLegalEntityRiskRating = "medium"
ConnectionLegalEntityNewParamsLegalEntityRiskRatingHigh ConnectionLegalEntityNewParamsLegalEntityRiskRating = "high"
)
func (r ConnectionLegalEntityNewParamsLegalEntityRiskRating) IsKnown() bool {
switch r {
case ConnectionLegalEntityNewParamsLegalEntityRiskRatingLow, ConnectionLegalEntityNewParamsLegalEntityRiskRatingMedium, ConnectionLegalEntityNewParamsLegalEntityRiskRatingHigh:
return true
}
return false
}
type ConnectionLegalEntityUpdateParams struct {
// The status of the connection legal entity.
Status param.Field[ConnectionLegalEntityUpdateParamsStatus] `json:"status"`
}
func (r ConnectionLegalEntityUpdateParams) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
// The status of the connection legal entity.
type ConnectionLegalEntityUpdateParamsStatus string
const (
ConnectionLegalEntityUpdateParamsStatusProcessing ConnectionLegalEntityUpdateParamsStatus = "processing"
)
func (r ConnectionLegalEntityUpdateParamsStatus) IsKnown() bool {
switch r {
case ConnectionLegalEntityUpdateParamsStatusProcessing:
return true
}
return false
}
type ConnectionLegalEntityListParams struct {
AfterCursor param.Field[string] `query:"after_cursor"`
ConnectionID param.Field[string] `query:"connection_id"`
LegalEntityID param.Field[string] `query:"legal_entity_id"`
PerPage param.Field[int64] `query:"per_page"`
Status param.Field[ConnectionLegalEntityListParamsStatus] `query:"status"`
}
// URLQuery serializes [ConnectionLegalEntityListParams]'s query parameters as
// `url.Values`.
func (r ConnectionLegalEntityListParams) URLQuery() (v url.Values) {
return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{
ArrayFormat: apiquery.ArrayQueryFormatBrackets,
NestedFormat: apiquery.NestedQueryFormatBrackets,
})
}
type ConnectionLegalEntityListParamsStatus string
const (
ConnectionLegalEntityListParamsStatusCompleted ConnectionLegalEntityListParamsStatus = "completed"
ConnectionLegalEntityListParamsStatusDenied ConnectionLegalEntityListParamsStatus = "denied"
ConnectionLegalEntityListParamsStatusFailed ConnectionLegalEntityListParamsStatus = "failed"
ConnectionLegalEntityListParamsStatusProcessing ConnectionLegalEntityListParamsStatus = "processing"
)
func (r ConnectionLegalEntityListParamsStatus) IsKnown() bool {
switch r {
case ConnectionLegalEntityListParamsStatusCompleted, ConnectionLegalEntityListParamsStatusDenied, ConnectionLegalEntityListParamsStatusFailed, ConnectionLegalEntityListParamsStatusProcessing:
return true
}
return false
}