Skip to content

Commit

Permalink
Merge pull request #1714 from stripe/latest-codegen-master
Browse files Browse the repository at this point in the history
Update generated code (new)
  • Loading branch information
richardm-stripe committed Mar 17, 2023
2 parents 50f541a + 507fb29 commit 7ca220d
Show file tree
Hide file tree
Showing 9 changed files with 234 additions and 9 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
@@ -1 +1 @@
v249
v263
21 changes: 21 additions & 0 deletions types/AccountsResource.d.ts
Expand Up @@ -2908,6 +2908,11 @@ declare module 'stripe' {
*/
default_for_currency?: boolean;

/**
* Documents that may be submitted to satisfy various informational requests.
*/
documents?: ExternalAccountUpdateParams.Documents;

/**
* Two digit number representing the card's expiration month.
*/
Expand Down Expand Up @@ -2938,6 +2943,22 @@ declare module 'stripe' {
type AccountHolderType = 'company' | 'individual';

type AccountType = 'checking' | 'futsu' | 'savings' | 'toza';

interface Documents {
/**
* One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a voided check.
*/
bank_account_ownership_verification?: Documents.BankAccountOwnershipVerification;
}

namespace Documents {
interface BankAccountOwnershipVerification {
/**
* One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
*/
files?: Array<string>;
}
}
}

interface PersonUpdateParams {
Expand Down
198 changes: 198 additions & 0 deletions types/BankAccounts.d.ts
Expand Up @@ -81,6 +81,11 @@ declare module 'stripe' {
*/
fingerprint: string | null;

/**
* Information about upcoming new requirements for the bank account, including what information needs to be collected.
*/
future_requirements?: BankAccount.FutureRequirements | null;

/**
* The last four digits of the bank account number.
*/
Expand All @@ -91,6 +96,11 @@ declare module 'stripe' {
*/
metadata?: Stripe.Metadata | null;

/**
* Information about the requirements for the bank account, including what information needs to be collected.
*/
requirements?: BankAccount.Requirements | null;

/**
* The routing transit number for the bank account.
*/
Expand All @@ -106,6 +116,194 @@ declare module 'stripe' {

namespace BankAccount {
type AvailablePayoutMethod = 'instant' | 'standard';

interface FutureRequirements {
/**
* Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.
*/
currently_due: Array<string> | null;

/**
* Fields that are `currently_due` and need to be collected again because validation or verification failed.
*/
errors: Array<FutureRequirements.Error> | null;

/**
* Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account.
*/
past_due: Array<string> | null;

/**
* Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`.
*/
pending_verification: Array<string> | null;
}

namespace FutureRequirements {
interface Error {
/**
* The code for the type of error.
*/
code: Error.Code;

/**
* An informative message that indicates the error type and provides additional details about the error.
*/
reason: string;

/**
* The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
*/
requirement: string;
}

namespace Error {
type Code =
| 'invalid_address_city_state_postal_code'
| 'invalid_dob_age_under_18'
| 'invalid_representative_country'
| 'invalid_street_address'
| 'invalid_tos_acceptance'
| 'invalid_value_other'
| 'verification_document_address_mismatch'
| 'verification_document_address_missing'
| 'verification_document_corrupt'
| 'verification_document_country_not_supported'
| 'verification_document_dob_mismatch'
| 'verification_document_duplicate_type'
| 'verification_document_expired'
| 'verification_document_failed_copy'
| 'verification_document_failed_greyscale'
| 'verification_document_failed_other'
| 'verification_document_failed_test_mode'
| 'verification_document_fraudulent'
| 'verification_document_id_number_mismatch'
| 'verification_document_id_number_missing'
| 'verification_document_incomplete'
| 'verification_document_invalid'
| 'verification_document_issue_or_expiry_date_missing'
| 'verification_document_manipulated'
| 'verification_document_missing_back'
| 'verification_document_missing_front'
| 'verification_document_name_mismatch'
| 'verification_document_name_missing'
| 'verification_document_nationality_mismatch'
| 'verification_document_not_readable'
| 'verification_document_not_signed'
| 'verification_document_not_uploaded'
| 'verification_document_photo_mismatch'
| 'verification_document_too_large'
| 'verification_document_type_not_supported'
| 'verification_failed_address_match'
| 'verification_failed_business_iec_number'
| 'verification_failed_document_match'
| 'verification_failed_id_number_match'
| 'verification_failed_keyed_identity'
| 'verification_failed_keyed_match'
| 'verification_failed_name_match'
| 'verification_failed_other'
| 'verification_failed_residential_address'
| 'verification_failed_tax_id_match'
| 'verification_failed_tax_id_not_issued'
| 'verification_missing_executives'
| 'verification_missing_owners'
| 'verification_requires_additional_memorandum_of_associations';
}
}

interface Requirements {
/**
* Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.
*/
currently_due: Array<string> | null;

/**
* Fields that are `currently_due` and need to be collected again because validation or verification failed.
*/
errors: Array<Requirements.Error> | null;

/**
* Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account.
*/
past_due: Array<string> | null;

/**
* Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`.
*/
pending_verification: Array<string> | null;
}

namespace Requirements {
interface Error {
/**
* The code for the type of error.
*/
code: Error.Code;

/**
* An informative message that indicates the error type and provides additional details about the error.
*/
reason: string;

/**
* The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
*/
requirement: string;
}

namespace Error {
type Code =
| 'invalid_address_city_state_postal_code'
| 'invalid_dob_age_under_18'
| 'invalid_representative_country'
| 'invalid_street_address'
| 'invalid_tos_acceptance'
| 'invalid_value_other'
| 'verification_document_address_mismatch'
| 'verification_document_address_missing'
| 'verification_document_corrupt'
| 'verification_document_country_not_supported'
| 'verification_document_dob_mismatch'
| 'verification_document_duplicate_type'
| 'verification_document_expired'
| 'verification_document_failed_copy'
| 'verification_document_failed_greyscale'
| 'verification_document_failed_other'
| 'verification_document_failed_test_mode'
| 'verification_document_fraudulent'
| 'verification_document_id_number_mismatch'
| 'verification_document_id_number_missing'
| 'verification_document_incomplete'
| 'verification_document_invalid'
| 'verification_document_issue_or_expiry_date_missing'
| 'verification_document_manipulated'
| 'verification_document_missing_back'
| 'verification_document_missing_front'
| 'verification_document_name_mismatch'
| 'verification_document_name_missing'
| 'verification_document_nationality_mismatch'
| 'verification_document_not_readable'
| 'verification_document_not_signed'
| 'verification_document_not_uploaded'
| 'verification_document_photo_mismatch'
| 'verification_document_too_large'
| 'verification_document_type_not_supported'
| 'verification_failed_address_match'
| 'verification_failed_business_iec_number'
| 'verification_failed_document_match'
| 'verification_failed_id_number_match'
| 'verification_failed_keyed_identity'
| 'verification_failed_keyed_match'
| 'verification_failed_name_match'
| 'verification_failed_other'
| 'verification_failed_residential_address'
| 'verification_failed_tax_id_match'
| 'verification_failed_tax_id_not_issued'
| 'verification_missing_executives'
| 'verification_missing_owners'
| 'verification_requires_additional_memorandum_of_associations';
}
}
}

/**
Expand Down
8 changes: 7 additions & 1 deletion types/Charges.d.ts
Expand Up @@ -1501,7 +1501,13 @@ declare module 'stripe' {
}
}

interface Link {}
interface Link {
/**
* Two-letter ISO code representing the funding source country beneath the Link payment.
* You could use this attribute to get a sense of international fees.
*/
country: string | null;
}

interface Multibanco {
/**
Expand Down
2 changes: 1 addition & 1 deletion types/Checkout/SessionsResource.d.ts
Expand Up @@ -760,7 +760,7 @@ declare module 'stripe' {
}

namespace PaymentIntentData {
type CaptureMethod = 'automatic' | 'manual';
type CaptureMethod = 'automatic' | 'automatic_async' | 'manual';

type SetupFutureUsage = 'off_session' | 'on_session';

Expand Down
2 changes: 1 addition & 1 deletion types/PaymentIntents.d.ts
Expand Up @@ -253,7 +253,7 @@ declare module 'stripe' {
| 'requested_by_customer'
| 'void_invoice';

type CaptureMethod = 'automatic' | 'manual';
type CaptureMethod = 'automatic' | 'automatic_async' | 'manual';

type ConfirmationMethod = 'automatic' | 'manual';

Expand Down
6 changes: 3 additions & 3 deletions types/PaymentIntentsResource.d.ts
Expand Up @@ -172,7 +172,7 @@ declare module 'stripe' {
enabled: boolean;
}

type CaptureMethod = 'automatic' | 'manual';
type CaptureMethod = 'automatic' | 'automatic_async' | 'manual';

type ConfirmationMethod = 'automatic' | 'manual';

Expand Down Expand Up @@ -2035,7 +2035,7 @@ declare module 'stripe' {
}

namespace PaymentIntentUpdateParams {
type CaptureMethod = 'automatic' | 'manual';
type CaptureMethod = 'automatic' | 'automatic_async' | 'manual';

interface PaymentMethodData {
/**
Expand Down Expand Up @@ -3894,7 +3894,7 @@ declare module 'stripe' {
}

namespace PaymentIntentConfirmParams {
type CaptureMethod = 'automatic' | 'manual';
type CaptureMethod = 'automatic' | 'automatic_async' | 'manual';

interface MandateData1 {
/**
Expand Down
2 changes: 1 addition & 1 deletion types/PaymentLinks.d.ts
Expand Up @@ -376,7 +376,7 @@ declare module 'stripe' {
}

namespace PaymentIntentData {
type CaptureMethod = 'automatic' | 'manual';
type CaptureMethod = 'automatic' | 'automatic_async' | 'manual';

type SetupFutureUsage = 'off_session' | 'on_session';
}
Expand Down
2 changes: 1 addition & 1 deletion types/PaymentLinksResource.d.ts
Expand Up @@ -432,7 +432,7 @@ declare module 'stripe' {
}

namespace PaymentIntentData {
type CaptureMethod = 'automatic' | 'manual';
type CaptureMethod = 'automatic' | 'automatic_async' | 'manual';

type SetupFutureUsage = 'off_session' | 'on_session';
}
Expand Down

0 comments on commit 7ca220d

Please sign in to comment.