Skip to content

Commit

Permalink
feat(api): add legal_structure enum member (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Mar 1, 2024
1 parent 2059850 commit 9b0d264
Show file tree
Hide file tree
Showing 11 changed files with 110 additions and 18 deletions.
14 changes: 13 additions & 1 deletion src/resources/connection-legal-entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,18 @@ export namespace ConnectionLegalEntityCreateParams {
*/
legal_entity_type?: 'business' | 'individual';

/**
* The business's legal structure.
*/
legal_structure?:
| 'corporation'
| 'llc'
| 'non_profit'
| 'partnership'
| 'sole_proprietorship'
| 'trust'
| null;

/**
* Additional data represented as key-value pairs. Both the key and value must be
* strings.
Expand Down Expand Up @@ -217,7 +229,7 @@ export namespace ConnectionLegalEntityCreateParams {
/**
* The types of this address.
*/
address_types?: Array<string>;
address_types?: Array<'business' | 'mailing' | 'other' | 'po_box' | 'residential'>;

line2?: string | null;
}
Expand Down
14 changes: 13 additions & 1 deletion src/resources/counterparties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,18 @@ export namespace CounterpartyCreateParams {
*/
last_name?: string | null;

/**
* The business's legal structure.
*/
legal_structure?:
| 'corporation'
| 'llc'
| 'non_profit'
| 'partnership'
| 'sole_proprietorship'
| 'trust'
| null;

/**
* Additional data represented as key-value pairs. Both the key and value must be
* strings.
Expand Down Expand Up @@ -686,7 +698,7 @@ export namespace CounterpartyCreateParams {
/**
* The types of this address.
*/
address_types?: Array<string>;
address_types?: Array<'business' | 'mailing' | 'other' | 'po_box' | 'residential'>;

line2?: string | null;
}
Expand Down
40 changes: 38 additions & 2 deletions src/resources/legal-entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,18 @@ export interface LegalEntity {
*/
legal_entity_type?: 'business' | 'individual' | 'joint';

/**
* The business's legal structure.
*/
legal_structure?:
| 'corporation'
| 'llc'
| 'non_profit'
| 'partnership'
| 'sole_proprietorship'
| 'trust'
| null;

/**
* This field will be true if this object exists in the live environment or false
* if it exists in the test environment.
Expand Down Expand Up @@ -153,7 +165,7 @@ export namespace LegalEntity {
/**
* The types of this address.
*/
address_types: Array<string>;
address_types: Array<'business' | 'mailing' | 'other' | 'po_box' | 'residential'>;

/**
* Country code conforms to [ISO 3166-1 alpha-2]
Expand Down Expand Up @@ -287,6 +299,18 @@ export interface LegalEntityCreateParams {
*/
last_name?: string | null;

/**
* The business's legal structure.
*/
legal_structure?:
| 'corporation'
| 'llc'
| 'non_profit'
| 'partnership'
| 'sole_proprietorship'
| 'trust'
| null;

/**
* Additional data represented as key-value pairs. Both the key and value must be
* strings.
Expand Down Expand Up @@ -328,7 +352,7 @@ export namespace LegalEntityCreateParams {
/**
* The types of this address.
*/
address_types?: Array<string>;
address_types?: Array<'business' | 'mailing' | 'other' | 'po_box' | 'residential'>;

line2?: string | null;
}
Expand Down Expand Up @@ -400,6 +424,18 @@ export interface LegalEntityUpdateParams {
*/
last_name?: string | null;

/**
* The business's legal structure.
*/
legal_structure?:
| 'corporation'
| 'llc'
| 'non_profit'
| 'partnership'
| 'sole_proprietorship'
| 'trust'
| null;

/**
* Additional data represented as key-value pairs. Both the key and value must be
* strings.
Expand Down
28 changes: 26 additions & 2 deletions src/resources/legal-entity-associations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,18 @@ export namespace LegalEntityAssociation {
*/
legal_entity_type?: 'business' | 'individual' | 'joint';

/**
* The business's legal structure.
*/
legal_structure?:
| 'corporation'
| 'llc'
| 'non_profit'
| 'partnership'
| 'sole_proprietorship'
| 'trust'
| null;

/**
* This field will be true if this object exists in the live environment or false
* if it exists in the test environment.
Expand Down Expand Up @@ -152,7 +164,7 @@ export namespace LegalEntityAssociation {
/**
* The types of this address.
*/
address_types: Array<string>;
address_types: Array<'business' | 'mailing' | 'other' | 'po_box' | 'residential'>;

/**
* Country code conforms to [ISO 3166-1 alpha-2]
Expand Down Expand Up @@ -321,6 +333,18 @@ export namespace LegalEntityAssociationCreateParams {
*/
legal_entity_type?: 'business' | 'individual';

/**
* The business's legal structure.
*/
legal_structure?:
| 'corporation'
| 'llc'
| 'non_profit'
| 'partnership'
| 'sole_proprietorship'
| 'trust'
| null;

/**
* Additional data represented as key-value pairs. Both the key and value must be
* strings.
Expand Down Expand Up @@ -362,7 +386,7 @@ export namespace LegalEntityAssociationCreateParams {
/**
* The types of this address.
*/
address_types?: Array<string>;
address_types?: Array<'business' | 'mailing' | 'other' | 'po_box' | 'residential'>;

line2?: string | null;
}
Expand Down
1 change: 1 addition & 0 deletions src/resources/payment-orders/payment-orders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ export namespace PaymentOrder {
| 'column_reversal_pair_transfer_id'
| 'column_transfer_id'
| 'cross_river_payment_id'
| 'cross_river_service_message'
| 'cross_river_transaction_id'
| 'currencycloud_conversion_id'
| 'currencycloud_payment_id'
Expand Down
1 change: 1 addition & 0 deletions src/resources/payment-references.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export interface PaymentReference {
| 'column_reversal_pair_transfer_id'
| 'column_transfer_id'
| 'cross_river_payment_id'
| 'cross_river_service_message'
| 'cross_river_transaction_id'
| 'currencycloud_conversion_id'
| 'currencycloud_payment_id'
Expand Down
1 change: 1 addition & 0 deletions src/resources/returns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ export namespace ReturnObject {
| 'column_reversal_pair_transfer_id'
| 'column_transfer_id'
| 'cross_river_payment_id'
| 'cross_river_service_message'
| 'cross_river_transaction_id'
| 'currencycloud_conversion_id'
| 'currencycloud_payment_id'
Expand Down
7 changes: 4 additions & 3 deletions tests/api-resources/connection-legal-entities.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ describe('resource connectionLegalEntities', () => {
date_of_birth: '2019-12-27',
business_name: 'string',
doing_business_as_names: ['string', 'string', 'string'],
legal_structure: 'corporation',
phone_numbers: [{ phone_number: 'string' }, { phone_number: 'string' }, { phone_number: 'string' }],
email: 'string',
website: 'string',
metadata: { key: 'value', foo: 'bar', modern: 'treasury' },
addresses: [
{
address_types: ['string', 'string', 'string'],
address_types: ['business', 'mailing', 'other'],
line1: 'string',
line2: 'string',
locality: 'string',
Expand All @@ -46,7 +47,7 @@ describe('resource connectionLegalEntities', () => {
country: 'string',
},
{
address_types: ['string', 'string', 'string'],
address_types: ['business', 'mailing', 'other'],
line1: 'string',
line2: 'string',
locality: 'string',
Expand All @@ -55,7 +56,7 @@ describe('resource connectionLegalEntities', () => {
country: 'string',
},
{
address_types: ['string', 'string', 'string'],
address_types: ['business', 'mailing', 'other'],
line1: 'string',
line2: 'string',
locality: 'string',
Expand Down
7 changes: 4 additions & 3 deletions tests/api-resources/counterparties.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,14 @@ describe('resource counterparties', () => {
date_of_birth: '2019-12-27',
business_name: 'string',
doing_business_as_names: ['string', 'string', 'string'],
legal_structure: 'corporation',
phone_numbers: [{ phone_number: 'string' }, { phone_number: 'string' }, { phone_number: 'string' }],
email: 'string',
website: 'string',
metadata: { key: 'value', foo: 'bar', modern: 'treasury' },
addresses: [
{
address_types: ['string', 'string', 'string'],
address_types: ['business', 'mailing', 'other'],
line1: 'string',
line2: 'string',
locality: 'string',
Expand All @@ -195,7 +196,7 @@ describe('resource counterparties', () => {
country: 'string',
},
{
address_types: ['string', 'string', 'string'],
address_types: ['business', 'mailing', 'other'],
line1: 'string',
line2: 'string',
locality: 'string',
Expand All @@ -204,7 +205,7 @@ describe('resource counterparties', () => {
country: 'string',
},
{
address_types: ['string', 'string', 'string'],
address_types: ['business', 'mailing', 'other'],
line1: 'string',
line2: 'string',
locality: 'string',
Expand Down
8 changes: 5 additions & 3 deletions tests/api-resources/legal-entities.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('resource legalEntities', () => {
legal_entity_type: 'business',
addresses: [
{
address_types: ['string', 'string', 'string'],
address_types: ['business', 'mailing', 'other'],
line1: 'string',
line2: 'string',
locality: 'string',
Expand All @@ -35,7 +35,7 @@ describe('resource legalEntities', () => {
country: 'string',
},
{
address_types: ['string', 'string', 'string'],
address_types: ['business', 'mailing', 'other'],
line1: 'string',
line2: 'string',
locality: 'string',
Expand All @@ -44,7 +44,7 @@ describe('resource legalEntities', () => {
country: 'string',
},
{
address_types: ['string', 'string', 'string'],
address_types: ['business', 'mailing', 'other'],
line1: 'string',
line2: 'string',
locality: 'string',
Expand All @@ -64,6 +64,7 @@ describe('resource legalEntities', () => {
{ id_number: 'string', id_type: 'ar_cuil', issuing_country: 'string' },
],
last_name: 'string',
legal_structure: 'corporation',
metadata: { key: 'value', foo: 'bar', modern: 'treasury' },
phone_numbers: [{ phone_number: 'string' }, { phone_number: 'string' }, { phone_number: 'string' }],
website: 'string',
Expand Down Expand Up @@ -118,6 +119,7 @@ describe('resource legalEntities', () => {
email: 'string',
first_name: 'string',
last_name: 'string',
legal_structure: 'corporation',
metadata: { key: 'value', foo: 'bar', modern: 'treasury' },
phone_numbers: [{ phone_number: 'string' }, { phone_number: 'string' }, { phone_number: 'string' }],
website: 'string',
Expand Down
7 changes: 4 additions & 3 deletions tests/api-resources/legal-entity-associations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ describe('resource legalEntityAssociations', () => {
date_of_birth: '2019-12-27',
business_name: 'string',
doing_business_as_names: ['string', 'string', 'string'],
legal_structure: 'corporation',
phone_numbers: [{ phone_number: 'string' }, { phone_number: 'string' }, { phone_number: 'string' }],
email: 'string',
website: 'string',
metadata: { key: 'value', foo: 'bar', modern: 'treasury' },
addresses: [
{
address_types: ['string', 'string', 'string'],
address_types: ['business', 'mailing', 'other'],
line1: 'string',
line2: 'string',
locality: 'string',
Expand All @@ -48,7 +49,7 @@ describe('resource legalEntityAssociations', () => {
country: 'string',
},
{
address_types: ['string', 'string', 'string'],
address_types: ['business', 'mailing', 'other'],
line1: 'string',
line2: 'string',
locality: 'string',
Expand All @@ -57,7 +58,7 @@ describe('resource legalEntityAssociations', () => {
country: 'string',
},
{
address_types: ['string', 'string', 'string'],
address_types: ['business', 'mailing', 'other'],
line1: 'string',
line2: 'string',
locality: 'string',
Expand Down

0 comments on commit 9b0d264

Please sign in to comment.