From 88c5b943e5743b6b8133d9d09844a2db515b837b Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Mon, 6 Jun 2022 15:52:18 -0700 Subject: [PATCH] Codegen for openapi v151 --- OPENAPI_VERSION | 2 +- types/2020-08-27/Checkout/Sessions.d.ts | 22 +++++++- types/2020-08-27/InvoiceLineItems.d.ts | 6 +-- types/2020-08-27/Invoices.d.ts | 12 ++--- types/2020-08-27/PaymentIntents.d.ts | 6 +-- types/2020-08-27/SetupIntents.d.ts | 6 +-- types/2020-08-27/SubscriptionItems.d.ts | 18 ++----- types/2020-08-27/Subscriptions.d.ts | 22 +++----- .../TestHelpers/Treasury/ReceivedCredits.d.ts | 26 ++++++++++ .../TestHelpers/Treasury/ReceivedDebits.d.ts | 26 ++++++++++ .../Treasury/OutboundTransfers.d.ts | 52 +++++++++++++++++++ .../2020-08-27/Treasury/ReceivedCredits.d.ts | 26 ++++++++++ types/2020-08-27/Treasury/ReceivedDebits.d.ts | 31 +++++++++++ 13 files changed, 205 insertions(+), 50 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 0154fe63da..af823a6291 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v136 \ No newline at end of file +v151 \ No newline at end of file diff --git a/types/2020-08-27/Checkout/Sessions.d.ts b/types/2020-08-27/Checkout/Sessions.d.ts index c41fc52dd5..7faa25b115 100644 --- a/types/2020-08-27/Checkout/Sessions.d.ts +++ b/types/2020-08-27/Checkout/Sessions.d.ts @@ -449,6 +449,8 @@ declare module 'stripe' { interface PaymentMethodOptions { acss_debit?: PaymentMethodOptions.AcssDebit; + affirm?: PaymentMethodOptions.Affirm; + afterpay_clearpay?: PaymentMethodOptions.AfterpayClearpay; alipay?: PaymentMethodOptions.Alipay; @@ -457,6 +459,8 @@ declare module 'stripe' { bacs_debit?: PaymentMethodOptions.BacsDebit; + bancontact?: PaymentMethodOptions.Bancontact; + boleto?: PaymentMethodOptions.Boleto; eps?: PaymentMethodOptions.Eps; @@ -467,16 +471,22 @@ declare module 'stripe' { grabpay?: PaymentMethodOptions.Grabpay; + ideal?: PaymentMethodOptions.Ideal; + klarna?: PaymentMethodOptions.Klarna; konbini?: PaymentMethodOptions.Konbini; oxxo?: PaymentMethodOptions.Oxxo; + p24?: PaymentMethodOptions.P24; + paynow?: PaymentMethodOptions.Paynow; sepa_debit?: PaymentMethodOptions.SepaDebit; + sofort?: PaymentMethodOptions.Sofort; + us_bank_account?: PaymentMethodOptions.UsBankAccount; } @@ -531,6 +541,8 @@ declare module 'stripe' { type VerificationMethod = 'automatic' | 'instant' | 'microdeposits'; } + interface Affirm {} + interface AfterpayClearpay {} interface Alipay {} @@ -539,6 +551,8 @@ declare module 'stripe' { interface BacsDebit {} + interface Bancontact {} + interface Boleto { /** * The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. @@ -554,6 +568,8 @@ declare module 'stripe' { interface Grabpay {} + interface Ideal {} + interface Klarna {} interface Konbini { @@ -570,10 +586,14 @@ declare module 'stripe' { expires_after_days: number; } + interface P24 {} + interface Paynow {} interface SepaDebit {} + interface Sofort {} + interface UsBankAccount { financial_connections?: UsBankAccount.FinancialConnections; @@ -1735,7 +1755,7 @@ declare module 'stripe' { namespace UsBankAccount { interface FinancialConnections { /** - * The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `payment_method`, and `transactions`. + * The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. */ permissions?: Array; } diff --git a/types/2020-08-27/InvoiceLineItems.d.ts b/types/2020-08-27/InvoiceLineItems.d.ts index 2dd00e93f9..665986bfe5 100644 --- a/types/2020-08-27/InvoiceLineItems.d.ts +++ b/types/2020-08-27/InvoiceLineItems.d.ts @@ -270,11 +270,7 @@ declare module 'stripe' { >; /** - * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. + * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. */ subscription_proration_behavior?: InvoiceLineItemListUpcomingParams.SubscriptionProrationBehavior; diff --git a/types/2020-08-27/Invoices.d.ts b/types/2020-08-27/Invoices.d.ts index 2cd3038008..635b03104e 100644 --- a/types/2020-08-27/Invoices.d.ts +++ b/types/2020-08-27/Invoices.d.ts @@ -44,7 +44,7 @@ declare module 'stripe' { amount_paid: number; /** - * The amount remaining, in %s, that is due. + * The difference between amount_due and amount_paid, in %s. */ amount_remaining: number; @@ -1162,7 +1162,7 @@ declare module 'stripe' { namespace UsBankAccount { interface FinancialConnections { /** - * The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `payment_method`, and `transactions`. + * The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. */ permissions?: Array; } @@ -1503,7 +1503,7 @@ declare module 'stripe' { namespace UsBankAccount { interface FinancialConnections { /** - * The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `payment_method`, and `transactions`. + * The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. */ permissions?: Array; } @@ -1732,11 +1732,7 @@ declare module 'stripe' { >; /** - * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. + * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. */ subscription_proration_behavior?: InvoiceRetrieveUpcomingParams.SubscriptionProrationBehavior; diff --git a/types/2020-08-27/PaymentIntents.d.ts b/types/2020-08-27/PaymentIntents.d.ts index 89ef100193..69aee0bf0f 100644 --- a/types/2020-08-27/PaymentIntents.d.ts +++ b/types/2020-08-27/PaymentIntents.d.ts @@ -3196,7 +3196,7 @@ declare module 'stripe' { namespace UsBankAccount { interface FinancialConnections { /** - * The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `payment_method`, and `transactions`. + * The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. */ permissions?: Array; @@ -4831,7 +4831,7 @@ declare module 'stripe' { namespace UsBankAccount { interface FinancialConnections { /** - * The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `payment_method`, and `transactions`. + * The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. */ permissions?: Array; @@ -6601,7 +6601,7 @@ declare module 'stripe' { namespace UsBankAccount { interface FinancialConnections { /** - * The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `payment_method`, and `transactions`. + * The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. */ permissions?: Array; diff --git a/types/2020-08-27/SetupIntents.d.ts b/types/2020-08-27/SetupIntents.d.ts index 708a19e526..6a81d5da93 100644 --- a/types/2020-08-27/SetupIntents.d.ts +++ b/types/2020-08-27/SetupIntents.d.ts @@ -1342,7 +1342,7 @@ declare module 'stripe' { namespace UsBankAccount { interface FinancialConnections { /** - * The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `payment_method`, and `transactions`. + * The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. */ permissions?: Array; @@ -2153,7 +2153,7 @@ declare module 'stripe' { namespace UsBankAccount { interface FinancialConnections { /** - * The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `payment_method`, and `transactions`. + * The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. */ permissions?: Array; @@ -3055,7 +3055,7 @@ declare module 'stripe' { namespace UsBankAccount { interface FinancialConnections { /** - * The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `payment_method`, and `transactions`. + * The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. */ permissions?: Array; diff --git a/types/2020-08-27/SubscriptionItems.d.ts b/types/2020-08-27/SubscriptionItems.d.ts index 48455bb53c..d94a851fbb 100644 --- a/types/2020-08-27/SubscriptionItems.d.ts +++ b/types/2020-08-27/SubscriptionItems.d.ts @@ -150,11 +150,7 @@ declare module 'stripe' { price_data?: SubscriptionItemCreateParams.PriceData; /** - * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. + * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. */ proration_behavior?: SubscriptionItemCreateParams.ProrationBehavior; @@ -300,11 +296,7 @@ declare module 'stripe' { price_data?: SubscriptionItemUpdateParams.PriceData; /** - * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. + * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. */ proration_behavior?: SubscriptionItemUpdateParams.ProrationBehavior; @@ -412,11 +404,7 @@ declare module 'stripe' { clear_usage?: boolean; /** - * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. + * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. */ proration_behavior?: SubscriptionItemDeleteParams.ProrationBehavior; diff --git a/types/2020-08-27/Subscriptions.d.ts b/types/2020-08-27/Subscriptions.d.ts index f5fef27758..5ddd032b8b 100644 --- a/types/2020-08-27/Subscriptions.d.ts +++ b/types/2020-08-27/Subscriptions.d.ts @@ -33,7 +33,7 @@ declare module 'stripe' { automatic_tax: Subscription.AutomaticTax; /** - * Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + * Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. */ billing_cycle_anchor: number; @@ -458,7 +458,7 @@ declare module 'stripe' { interface PendingUpdate { /** - * If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + * If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. */ billing_cycle_anchor: number | null; @@ -532,7 +532,7 @@ declare module 'stripe' { backdate_start_date?: number; /** - * A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + * A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. */ billing_cycle_anchor?: number; @@ -637,9 +637,7 @@ declare module 'stripe' { promotion_code?: string; /** - * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. Valid values are `create_prorations` or `none`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. Prorations can be disabled by passing `none`. If no value is passed, the default is `create_prorations`. + * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. */ proration_behavior?: SubscriptionCreateParams.ProrationBehavior; @@ -1015,7 +1013,7 @@ declare module 'stripe' { namespace UsBankAccount { interface FinancialConnections { /** - * The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `payment_method`, and `transactions`. + * The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. */ permissions?: Array; } @@ -1113,7 +1111,7 @@ declare module 'stripe' { automatic_tax?: SubscriptionUpdateParams.AutomaticTax; /** - * Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + * Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). */ billing_cycle_anchor?: SubscriptionUpdateParams.BillingCycleAnchor; @@ -1225,11 +1223,7 @@ declare module 'stripe' { promotion_code?: string; /** - * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. + * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. */ proration_behavior?: SubscriptionUpdateParams.ProrationBehavior; @@ -1638,7 +1632,7 @@ declare module 'stripe' { namespace UsBankAccount { interface FinancialConnections { /** - * The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `payment_method`, and `transactions`. + * The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. */ permissions?: Array; } diff --git a/types/2020-08-27/TestHelpers/Treasury/ReceivedCredits.d.ts b/types/2020-08-27/TestHelpers/Treasury/ReceivedCredits.d.ts index 1c8f5a39da..66f0e5a969 100644 --- a/types/2020-08-27/TestHelpers/Treasury/ReceivedCredits.d.ts +++ b/types/2020-08-27/TestHelpers/Treasury/ReceivedCredits.d.ts @@ -39,6 +39,11 @@ declare module 'stripe' { * Initiating payment method details for the object. */ initiating_payment_method_details?: ReceivedCreditCreateParams.InitiatingPaymentMethodDetails; + + /** + * Details about the network used for the ReceivedCredit. + */ + network_details?: ReceivedCreditCreateParams.NetworkDetails; } namespace ReceivedCreditCreateParams { @@ -74,6 +79,27 @@ declare module 'stripe' { } type Network = 'ach' | 'us_domestic_wire'; + + interface NetworkDetails { + /** + * Optional fields for `ach`. + */ + ach?: NetworkDetails.Ach; + + /** + * The type of flow that originated the ReceivedCredit. + */ + type: 'ach'; + } + + namespace NetworkDetails { + interface Ach { + /** + * ACH Addenda record + */ + addenda?: string; + } + } } } diff --git a/types/2020-08-27/TestHelpers/Treasury/ReceivedDebits.d.ts b/types/2020-08-27/TestHelpers/Treasury/ReceivedDebits.d.ts index cd9c3b6b94..add7a90a48 100644 --- a/types/2020-08-27/TestHelpers/Treasury/ReceivedDebits.d.ts +++ b/types/2020-08-27/TestHelpers/Treasury/ReceivedDebits.d.ts @@ -39,6 +39,11 @@ declare module 'stripe' { * Initiating payment method details for the object. */ initiating_payment_method_details?: ReceivedDebitCreateParams.InitiatingPaymentMethodDetails; + + /** + * Details about the network used for the ReceivedDebit. + */ + network_details?: ReceivedDebitCreateParams.NetworkDetails; } namespace ReceivedDebitCreateParams { @@ -72,6 +77,27 @@ declare module 'stripe' { routing_number?: string; } } + + interface NetworkDetails { + /** + * Optional fields for `ach`. + */ + ach?: NetworkDetails.Ach; + + /** + * The type of flow that originated the ReceivedDebit. + */ + type: 'ach'; + } + + namespace NetworkDetails { + interface Ach { + /** + * Addenda record data associated with this ReceivedDebit. + */ + addenda?: string; + } + } } } diff --git a/types/2020-08-27/Treasury/OutboundTransfers.d.ts b/types/2020-08-27/Treasury/OutboundTransfers.d.ts index 626ff0a547..e6377a07ba 100644 --- a/types/2020-08-27/Treasury/OutboundTransfers.d.ts +++ b/types/2020-08-27/Treasury/OutboundTransfers.d.ts @@ -74,6 +74,11 @@ declare module 'stripe' { */ metadata: Stripe.Metadata; + /** + * Details about the network used for the OutboundTransfer. + */ + network_details?: OutboundTransfer.NetworkDetails | null; + /** * Details about a returned OutboundTransfer. Only set when the status is `returned`. */ @@ -170,6 +175,27 @@ declare module 'stripe' { } } + interface NetworkDetails { + /** + * Details about an ACH transaction. + */ + ach?: NetworkDetails.Ach | null; + + /** + * The type of flow that originated the OutboundTransfer. + */ + type: 'ach'; + } + + namespace NetworkDetails { + interface Ach { + /** + * ACH Addenda record + */ + addenda: string | null; + } + } + interface ReturnedDetails { /** * Reason for the return. @@ -267,6 +293,11 @@ declare module 'stripe' { */ metadata?: Stripe.MetadataParam; + /** + * Details about the network used for the OutboundTransfer. + */ + network_details?: OutboundTransferCreateParams.NetworkDetails; + /** * Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `wire` transfers. The default value is `transfer`. */ @@ -295,6 +326,27 @@ declare module 'stripe' { type Network = 'ach' | 'us_domestic_wire'; } } + + interface NetworkDetails { + /** + * Optional fields for `ach`. + */ + ach?: NetworkDetails.Ach; + + /** + * The type of flow that originated the OutboundTransfer. + */ + type: 'ach'; + } + + namespace NetworkDetails { + interface Ach { + /** + * Addenda record data associated with this OutboundTransfer. + */ + addenda?: string; + } + } } interface OutboundTransferRetrieveParams { diff --git a/types/2020-08-27/Treasury/ReceivedCredits.d.ts b/types/2020-08-27/Treasury/ReceivedCredits.d.ts index dac1b3ebe7..ade5e3ba61 100644 --- a/types/2020-08-27/Treasury/ReceivedCredits.d.ts +++ b/types/2020-08-27/Treasury/ReceivedCredits.d.ts @@ -61,6 +61,11 @@ declare module 'stripe' { */ network: ReceivedCredit.Network; + /** + * Details specific to the money movement rails. + */ + network_details?: ReceivedCredit.NetworkDetails | null; + /** * Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field. */ @@ -225,6 +230,27 @@ declare module 'stripe' { type Network = 'ach' | 'card' | 'stripe' | 'us_domestic_wire'; + interface NetworkDetails { + /** + * Details about an ACH transaction. + */ + ach?: NetworkDetails.Ach | null; + + /** + * The type of flow that originated the ReceivedCredit. + */ + type: 'ach'; + } + + namespace NetworkDetails { + interface Ach { + /** + * ACH Addenda record + */ + addenda: string | null; + } + } + type Status = 'failed' | 'succeeded'; } diff --git a/types/2020-08-27/Treasury/ReceivedDebits.d.ts b/types/2020-08-27/Treasury/ReceivedDebits.d.ts index 38a8d44493..f108856a36 100644 --- a/types/2020-08-27/Treasury/ReceivedDebits.d.ts +++ b/types/2020-08-27/Treasury/ReceivedDebits.d.ts @@ -61,6 +61,11 @@ declare module 'stripe' { */ network: ReceivedDebit.Network; + /** + * Details specific to the money movement rails. + */ + network_details?: ReceivedDebit.NetworkDetails | null; + /** * Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`. */ @@ -169,10 +174,36 @@ declare module 'stripe' { * Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object. */ issuing_transaction: string | null; + + /** + * The ReceivedCredit that Capital withheld from + */ + received_credit_capital_withholding?: string | null; } type Network = 'ach' | 'card' | 'stripe'; + interface NetworkDetails { + /** + * Details about an ACH transaction. + */ + ach?: NetworkDetails.Ach | null; + + /** + * The type of flow that originated the ReceivedDebit. + */ + type: 'ach'; + } + + namespace NetworkDetails { + interface Ach { + /** + * ACH Addenda record + */ + addenda: string | null; + } + } + type Status = 'failed' | 'succeeded'; }