Skip to content

Commit 90cfd94

Browse files
feat(api): api update
1 parent 575cec5 commit 90cfd94

File tree

3 files changed

+171
-6
lines changed

3 files changed

+171
-6
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: 236
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5c95dd79214af830e2e7fb34ab05f98bde9213311d5e2d59f9a816a8e0369b85.yml
3-
openapi_spec_hash: ec66c2961a8b90e06ea57f934d8d75db
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6cc15216773be06ef5899a9f805480d69ba2e610a3746bb638c7773baa10c407.yml
3+
openapi_spec_hash: c24d9a85acb17d73e8d6434d7c907d40
44
config_hash: 25d7d7aa4882db6189b4b53e8e249e80

beneficialowner.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,8 @@ type EntityBeneficialOwner struct {
128128
Prongs []EntityBeneficialOwnerProng `json:"prongs" api:"required"`
129129
// A constant representing the object's type. For this resource it will always be
130130
// `entity_beneficial_owner`.
131-
Type EntityBeneficialOwnerType `json:"type" api:"required"`
132-
ExtraFields map[string]interface{} `json:"-" api:"extrafields"`
133-
JSON entityBeneficialOwnerJSON `json:"-"`
131+
Type EntityBeneficialOwnerType `json:"type" api:"required"`
132+
JSON entityBeneficialOwnerJSON `json:"-"`
134133
}
135134

136135
// entityBeneficialOwnerJSON contains the JSON metadata for the struct

entity.go

Lines changed: 167 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ type EntityCorporation struct {
198198
Address EntityCorporationAddress `json:"address" api:"required"`
199199
// The identifying details of anyone controlling or owning 25% or more of the
200200
// corporation.
201-
BeneficialOwners []EntityBeneficialOwner `json:"beneficial_owners" api:"required"`
201+
BeneficialOwners []EntityCorporationBeneficialOwner `json:"beneficial_owners" api:"required"`
202202
// An email address for the business.
203203
Email string `json:"email" api:"required,nullable"`
204204
// The two-letter United States Postal Service (USPS) abbreviation for the
@@ -275,6 +275,172 @@ func (r entityCorporationAddressJSON) RawJSON() string {
275275
return r.raw
276276
}
277277

278+
type EntityCorporationBeneficialOwner struct {
279+
// The identifier of this beneficial owner.
280+
ID string `json:"id" api:"required"`
281+
// This person's role or title within the entity.
282+
CompanyTitle string `json:"company_title" api:"required,nullable"`
283+
// Personal details for the beneficial owner.
284+
Individual EntityCorporationBeneficialOwnersIndividual `json:"individual" api:"required"`
285+
// Why this person is considered a beneficial owner of the entity.
286+
Prongs []EntityCorporationBeneficialOwnersProng `json:"prongs" api:"required"`
287+
ExtraFields map[string]interface{} `json:"-" api:"extrafields"`
288+
JSON entityCorporationBeneficialOwnerJSON `json:"-"`
289+
}
290+
291+
// entityCorporationBeneficialOwnerJSON contains the JSON metadata for the struct
292+
// [EntityCorporationBeneficialOwner]
293+
type entityCorporationBeneficialOwnerJSON struct {
294+
ID apijson.Field
295+
CompanyTitle apijson.Field
296+
Individual apijson.Field
297+
Prongs apijson.Field
298+
raw string
299+
ExtraFields map[string]apijson.Field
300+
}
301+
302+
func (r *EntityCorporationBeneficialOwner) UnmarshalJSON(data []byte) (err error) {
303+
return apijson.UnmarshalRoot(data, r)
304+
}
305+
306+
func (r entityCorporationBeneficialOwnerJSON) RawJSON() string {
307+
return r.raw
308+
}
309+
310+
// Personal details for the beneficial owner.
311+
type EntityCorporationBeneficialOwnersIndividual struct {
312+
// The person's address.
313+
Address EntityCorporationBeneficialOwnersIndividualAddress `json:"address" api:"required"`
314+
// The person's date of birth in YYYY-MM-DD format.
315+
DateOfBirth time.Time `json:"date_of_birth" api:"required" format:"date"`
316+
// A means of verifying the person's identity.
317+
Identification EntityCorporationBeneficialOwnersIndividualIdentification `json:"identification" api:"required"`
318+
// The person's legal name.
319+
Name string `json:"name" api:"required"`
320+
JSON entityCorporationBeneficialOwnersIndividualJSON `json:"-"`
321+
}
322+
323+
// entityCorporationBeneficialOwnersIndividualJSON contains the JSON metadata for
324+
// the struct [EntityCorporationBeneficialOwnersIndividual]
325+
type entityCorporationBeneficialOwnersIndividualJSON struct {
326+
Address apijson.Field
327+
DateOfBirth apijson.Field
328+
Identification apijson.Field
329+
Name apijson.Field
330+
raw string
331+
ExtraFields map[string]apijson.Field
332+
}
333+
334+
func (r *EntityCorporationBeneficialOwnersIndividual) UnmarshalJSON(data []byte) (err error) {
335+
return apijson.UnmarshalRoot(data, r)
336+
}
337+
338+
func (r entityCorporationBeneficialOwnersIndividualJSON) RawJSON() string {
339+
return r.raw
340+
}
341+
342+
// The person's address.
343+
type EntityCorporationBeneficialOwnersIndividualAddress struct {
344+
// The city, district, town, or village of the address.
345+
City string `json:"city" api:"required,nullable"`
346+
// The two-letter ISO 3166-1 alpha-2 code for the country of the address.
347+
Country string `json:"country" api:"required"`
348+
// The first line of the address.
349+
Line1 string `json:"line1" api:"required"`
350+
// The second line of the address.
351+
Line2 string `json:"line2" api:"required,nullable"`
352+
// The two-letter United States Postal Service (USPS) abbreviation for the US
353+
// state, province, or region of the address.
354+
State string `json:"state" api:"required,nullable"`
355+
// The ZIP or postal code of the address.
356+
Zip string `json:"zip" api:"required,nullable"`
357+
JSON entityCorporationBeneficialOwnersIndividualAddressJSON `json:"-"`
358+
}
359+
360+
// entityCorporationBeneficialOwnersIndividualAddressJSON contains the JSON
361+
// metadata for the struct [EntityCorporationBeneficialOwnersIndividualAddress]
362+
type entityCorporationBeneficialOwnersIndividualAddressJSON struct {
363+
City apijson.Field
364+
Country apijson.Field
365+
Line1 apijson.Field
366+
Line2 apijson.Field
367+
State apijson.Field
368+
Zip apijson.Field
369+
raw string
370+
ExtraFields map[string]apijson.Field
371+
}
372+
373+
func (r *EntityCorporationBeneficialOwnersIndividualAddress) UnmarshalJSON(data []byte) (err error) {
374+
return apijson.UnmarshalRoot(data, r)
375+
}
376+
377+
func (r entityCorporationBeneficialOwnersIndividualAddressJSON) RawJSON() string {
378+
return r.raw
379+
}
380+
381+
// A means of verifying the person's identity.
382+
type EntityCorporationBeneficialOwnersIndividualIdentification struct {
383+
// A method that can be used to verify the individual's identity.
384+
Method EntityCorporationBeneficialOwnersIndividualIdentificationMethod `json:"method" api:"required"`
385+
// The last 4 digits of the identification number that can be used to verify the
386+
// individual's identity.
387+
NumberLast4 string `json:"number_last4" api:"required"`
388+
ExtraFields map[string]interface{} `json:"-" api:"extrafields"`
389+
JSON entityCorporationBeneficialOwnersIndividualIdentificationJSON `json:"-"`
390+
}
391+
392+
// entityCorporationBeneficialOwnersIndividualIdentificationJSON contains the JSON
393+
// metadata for the struct
394+
// [EntityCorporationBeneficialOwnersIndividualIdentification]
395+
type entityCorporationBeneficialOwnersIndividualIdentificationJSON struct {
396+
Method apijson.Field
397+
NumberLast4 apijson.Field
398+
raw string
399+
ExtraFields map[string]apijson.Field
400+
}
401+
402+
func (r *EntityCorporationBeneficialOwnersIndividualIdentification) UnmarshalJSON(data []byte) (err error) {
403+
return apijson.UnmarshalRoot(data, r)
404+
}
405+
406+
func (r entityCorporationBeneficialOwnersIndividualIdentificationJSON) RawJSON() string {
407+
return r.raw
408+
}
409+
410+
// A method that can be used to verify the individual's identity.
411+
type EntityCorporationBeneficialOwnersIndividualIdentificationMethod string
412+
413+
const (
414+
EntityCorporationBeneficialOwnersIndividualIdentificationMethodSocialSecurityNumber EntityCorporationBeneficialOwnersIndividualIdentificationMethod = "social_security_number"
415+
EntityCorporationBeneficialOwnersIndividualIdentificationMethodIndividualTaxpayerIdentificationNumber EntityCorporationBeneficialOwnersIndividualIdentificationMethod = "individual_taxpayer_identification_number"
416+
EntityCorporationBeneficialOwnersIndividualIdentificationMethodPassport EntityCorporationBeneficialOwnersIndividualIdentificationMethod = "passport"
417+
EntityCorporationBeneficialOwnersIndividualIdentificationMethodDriversLicense EntityCorporationBeneficialOwnersIndividualIdentificationMethod = "drivers_license"
418+
EntityCorporationBeneficialOwnersIndividualIdentificationMethodOther EntityCorporationBeneficialOwnersIndividualIdentificationMethod = "other"
419+
)
420+
421+
func (r EntityCorporationBeneficialOwnersIndividualIdentificationMethod) IsKnown() bool {
422+
switch r {
423+
case EntityCorporationBeneficialOwnersIndividualIdentificationMethodSocialSecurityNumber, EntityCorporationBeneficialOwnersIndividualIdentificationMethodIndividualTaxpayerIdentificationNumber, EntityCorporationBeneficialOwnersIndividualIdentificationMethodPassport, EntityCorporationBeneficialOwnersIndividualIdentificationMethodDriversLicense, EntityCorporationBeneficialOwnersIndividualIdentificationMethodOther:
424+
return true
425+
}
426+
return false
427+
}
428+
429+
type EntityCorporationBeneficialOwnersProng string
430+
431+
const (
432+
EntityCorporationBeneficialOwnersProngOwnership EntityCorporationBeneficialOwnersProng = "ownership"
433+
EntityCorporationBeneficialOwnersProngControl EntityCorporationBeneficialOwnersProng = "control"
434+
)
435+
436+
func (r EntityCorporationBeneficialOwnersProng) IsKnown() bool {
437+
switch r {
438+
case EntityCorporationBeneficialOwnersProngOwnership, EntityCorporationBeneficialOwnersProngControl:
439+
return true
440+
}
441+
return false
442+
}
443+
278444
// Details of the government authority entity. Will be present if `structure` is
279445
// equal to `government_authority`.
280446
type EntityGovernmentAuthority struct {

0 commit comments

Comments
 (0)