Skip to content

Commit

Permalink
feat(api): extend list invoices query params (#357)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Mar 14, 2024
1 parent b403083 commit 05b1e41
Show file tree
Hide file tree
Showing 20 changed files with 1,146 additions and 31 deletions.
8 changes: 4 additions & 4 deletions src/resources/bulk-requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ export namespace BulkRequestCreateParams {
* be populated here, otherwise null. The value is one of internal_account or
* external_account.
*/
ledgerable_type?: 'external_account' | 'internal_account' | 'virtual_account';
ledgerable_type?: 'counterparty' | 'external_account' | 'internal_account' | 'virtual_account';

/**
* Additional data represented as key-value pairs. Both the key and value must be
Expand Down Expand Up @@ -858,7 +858,7 @@ export namespace BulkRequestCreateParams {
/**
* An array of reconciliation rule variables for this payment.
*/
reconciliation_rule_variables?: Array<unknown> | null;
reconciliation_rule_variables?: Array<Record<string, string>> | null;

/**
* For `ach`, this field will be passed through on an addenda record. For `wire`
Expand Down Expand Up @@ -1580,7 +1580,7 @@ export namespace BulkRequestCreateParams {
* be populated here, otherwise null. The value is one of internal_account or
* external_account.
*/
ledgerable_type?: 'external_account' | 'internal_account' | 'virtual_account';
ledgerable_type?: 'counterparty' | 'external_account' | 'internal_account' | 'virtual_account';

/**
* Additional data represented as key-value pairs. Both the key and value must be
Expand Down Expand Up @@ -1747,7 +1747,7 @@ export namespace BulkRequestCreateParams {
/**
* An array of reconciliation rule variables for this payment.
*/
reconciliation_rule_variables?: Array<unknown> | null;
reconciliation_rule_variables?: Array<Record<string, string>> | null;

/**
* For `ach`, this field will be passed through on an addenda record. For `wire`
Expand Down
179 changes: 179 additions & 0 deletions src/resources/connection-legal-entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ export namespace ConnectionLegalEntityCreateParams {
*/
last_name?: string | null;

/**
* The legal entity associations and its associated legal entities.
*/
legal_entity_associations?: Array<LegalEntity.LegalEntityAssociation> | null;

/**
* The type of legal entity.
*/
Expand Down Expand Up @@ -270,6 +275,180 @@ export namespace ConnectionLegalEntityCreateParams {
issuing_country?: string | null;
}

export interface LegalEntityAssociation {
relationship_types: Array<'beneficial_owner' | 'control_person'>;

/**
* The associated legal entity.
*/
associated_legal_entity?: LegalEntityAssociation.AssociatedLegalEntity;

/**
* The ID of the associated legal entity.
*/
associated_legal_entity_id?: string;

/**
* The associated entity's ownership percentage iff they are a beneficial owner.
*/
ownership_percentage?: number | null;

/**
* The job title of the associated entity at the associator entity.
*/
title?: string | null;
}

export namespace LegalEntityAssociation {
/**
* The associated legal entity.
*/
export interface AssociatedLegalEntity {
/**
* A list of addresses for the entity.
*/
addresses?: Array<AssociatedLegalEntity.Address>;

/**
* The business's legal business name.
*/
business_name?: string | null;

/**
* A business's formation date (YYYY-MM-DD).
*/
date_formed?: string | null;

/**
* An individual's date of birth (YYYY-MM-DD).
*/
date_of_birth?: string | null;

doing_business_as_names?: Array<string>;

/**
* The entity's primary email.
*/
email?: string | null;

/**
* An individual's first name.
*/
first_name?: string | null;

/**
* A list of identifications for the legal entity.
*/
identifications?: Array<AssociatedLegalEntity.Identification>;

/**
* An individual's last name.
*/
last_name?: string | null;

/**
* The type of legal entity.
*/
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.
*/
metadata?: Record<string, string>;

phone_numbers?: Array<AssociatedLegalEntity.PhoneNumber>;

/**
* The entity's primary website URL.
*/
website?: string | null;
}

export namespace AssociatedLegalEntity {
export interface Address {
/**
* Country code conforms to [ISO 3166-1 alpha-2]
*/
country: string | null;

line1: string | null;

/**
* Locality or City.
*/
locality: string | null;

/**
* The postal code of the address.
*/
postal_code: string | null;

/**
* Region or State.
*/
region: string | null;

/**
* The types of this address.
*/
address_types?: Array<'business' | 'mailing' | 'other' | 'po_box' | 'residential'>;

line2?: string | null;
}

export interface Identification {
/**
* The ID number of identification document.
*/
id_number: string;

/**
* The type of ID number.
*/
id_type:
| 'ar_cuil'
| 'ar_cuit'
| 'br_cnpj'
| 'br_cpf'
| 'cl_nut'
| 'co_cedulas'
| 'co_nit'
| 'hn_id'
| 'hn_rtn'
| 'passport'
| 'us_ein'
| 'us_itin'
| 'us_ssn';

/**
* The ISO 3166-1 alpha-2 country code of the country that issued the
* identification
*/
issuing_country?: string | null;
}

/**
* A list of phone numbers in E.164 format.
*/
export interface PhoneNumber {
phone_number?: string;
}
}
}

/**
* A list of phone numbers in E.164 format.
*/
Expand Down

0 comments on commit 05b1e41

Please sign in to comment.