stripe 16.1.0 → 16.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +753 -109
- package/README.md +33 -0
- package/VERSION +1 -1
- package/cjs/RequestSender.js +66 -5
- package/cjs/StripeResource.js +1 -1
- package/cjs/apiVersion.js +2 -1
- package/cjs/multipart.js +1 -1
- package/cjs/resources/AccountNotices.js +21 -0
- package/cjs/resources/Capital/FinancingOffers.js +21 -0
- package/cjs/resources/Capital/FinancingSummary.js +12 -0
- package/cjs/resources/Capital/FinancingTransactions.js +17 -0
- package/cjs/resources/FinancialConnections/Accounts.js +5 -0
- package/cjs/resources/GiftCards/Cards.js +23 -0
- package/cjs/resources/GiftCards/Transactions.js +33 -0
- package/cjs/resources/Invoices.js +25 -0
- package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
- package/cjs/resources/Margins.js +22 -0
- package/cjs/resources/OAuth.js +1 -1
- package/cjs/resources/Orders.js +24 -0
- package/cjs/resources/PaymentIntents.js +4 -0
- package/cjs/resources/QuotePhases.js +22 -0
- package/cjs/resources/Quotes.js +32 -0
- package/cjs/resources/SubscriptionSchedules.js +4 -0
- package/cjs/resources/Tax/Forms.js +20 -0
- package/cjs/resources/Terminal/Readers.js +12 -0
- package/cjs/resources.js +36 -10
- package/cjs/stripe.core.js +6 -3
- package/cjs/utils.js +30 -3
- package/esm/RequestSender.js +67 -6
- package/esm/StripeResource.js +2 -2
- package/esm/apiVersion.js +1 -0
- package/esm/multipart.js +2 -2
- package/esm/resources/AccountNotices.js +18 -0
- package/esm/resources/Capital/FinancingOffers.js +18 -0
- package/esm/resources/Capital/FinancingSummary.js +9 -0
- package/esm/resources/Capital/FinancingTransactions.js +14 -0
- package/esm/resources/FinancialConnections/Accounts.js +5 -0
- package/esm/resources/GiftCards/Cards.js +20 -0
- package/esm/resources/GiftCards/Transactions.js +30 -0
- package/esm/resources/Invoices.js +25 -0
- package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
- package/esm/resources/Margins.js +19 -0
- package/esm/resources/OAuth.js +2 -2
- package/esm/resources/Orders.js +21 -0
- package/esm/resources/PaymentIntents.js +4 -0
- package/esm/resources/QuotePhases.js +19 -0
- package/esm/resources/Quotes.js +32 -0
- package/esm/resources/SubscriptionSchedules.js +4 -0
- package/esm/resources/Tax/Forms.js +17 -0
- package/esm/resources/Terminal/Readers.js +12 -0
- package/esm/resources.js +22 -0
- package/esm/stripe.core.js +6 -3
- package/esm/utils.js +27 -1
- package/package.json +1 -1
- package/types/AccountLinksResource.d.ts +5 -1
- package/types/AccountNotices.d.ts +110 -0
- package/types/AccountNoticesResource.d.ts +98 -0
- package/types/AccountSessions.d.ts +15 -0
- package/types/AccountSessionsResource.d.ts +205 -0
- package/types/Accounts.d.ts +88 -1
- package/types/AccountsResource.d.ts +204 -0
- package/types/Capital/FinancingOffers.d.ts +188 -0
- package/types/Capital/FinancingOffersResource.d.ts +97 -0
- package/types/Capital/FinancingSummary.d.ts +106 -0
- package/types/Capital/FinancingSummaryResource.d.ts +27 -0
- package/types/Capital/FinancingTransactions.d.ts +135 -0
- package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
- package/types/Charges.d.ts +67 -0
- package/types/ChargesResource.d.ts +1294 -0
- package/types/Checkout/Sessions.d.ts +23 -1
- package/types/Checkout/SessionsResource.d.ts +15 -1
- package/types/ConfirmationTokens.d.ts +83 -0
- package/types/Coupons.d.ts +1 -1
- package/types/CouponsResource.d.ts +1 -1
- package/types/CreditNotes.d.ts +21 -0
- package/types/CreditNotesResource.d.ts +51 -0
- package/types/CustomerSessions.d.ts +48 -0
- package/types/CustomerSessionsResource.d.ts +48 -0
- package/types/CustomersResource.d.ts +2 -0
- package/types/Disputes.d.ts +167 -0
- package/types/DisputesResource.d.ts +120 -0
- package/types/EventTypes.d.ts +426 -0
- package/types/Events.d.ts +83 -0
- package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
- package/types/FinancialConnections/Accounts.d.ts +29 -1
- package/types/FinancialConnections/AccountsResource.d.ts +35 -3
- package/types/FinancialConnections/Sessions.d.ts +44 -1
- package/types/FinancialConnections/SessionsResource.d.ts +33 -1
- package/types/GiftCards/Cards.d.ts +118 -0
- package/types/GiftCards/CardsResource.d.ts +159 -0
- package/types/GiftCards/Transactions.d.ts +129 -0
- package/types/GiftCards/TransactionsResource.d.ts +201 -0
- package/types/InvoiceItems.d.ts +5 -0
- package/types/InvoiceItemsResource.d.ts +98 -0
- package/types/InvoiceLineItems.d.ts +22 -0
- package/types/InvoicePayments.d.ts +91 -0
- package/types/Invoices.d.ts +110 -1
- package/types/InvoicesResource.d.ts +6404 -2261
- package/types/Issuing/CardholdersResource.d.ts +2 -1
- package/types/Issuing/Cards.d.ts +34 -0
- package/types/Issuing/CardsResource.d.ts +125 -0
- package/types/Issuing/CreditUnderwritingRecords.d.ts +446 -0
- package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1017 -0
- package/types/LineItems.d.ts +7 -0
- package/types/Mandates.d.ts +77 -0
- package/types/Margins.d.ts +56 -0
- package/types/MarginsResource.d.ts +114 -0
- package/types/Orders.d.ts +1057 -0
- package/types/OrdersResource.d.ts +2711 -0
- package/types/PaymentIntents.d.ts +463 -1
- package/types/PaymentIntentsResource.d.ts +6682 -3349
- package/types/PaymentMethods.d.ts +62 -0
- package/types/PaymentMethodsResource.d.ts +110 -0
- package/types/Prices.d.ts +22 -0
- package/types/PricesResource.d.ts +22 -0
- package/types/Products.d.ts +39 -0
- package/types/ProductsResource.d.ts +36 -0
- package/types/QuoteLines.d.ts +634 -0
- package/types/QuotePhases.d.ts +198 -0
- package/types/QuotePhasesResource.d.ts +67 -0
- package/types/QuotePreviewInvoices.d.ts +1528 -0
- package/types/QuotePreviewSubscriptionSchedules.d.ts +778 -0
- package/types/Quotes.d.ts +578 -1
- package/types/QuotesResource.d.ts +3174 -265
- package/types/SetupAttempts.d.ts +8 -0
- package/types/SetupIntents.d.ts +104 -1
- package/types/SetupIntentsResource.d.ts +483 -3
- package/types/Sources.d.ts +23 -0
- package/types/SubscriptionItems.d.ts +21 -0
- package/types/SubscriptionItemsResource.d.ts +109 -0
- package/types/SubscriptionSchedules.d.ts +164 -0
- package/types/SubscriptionSchedulesResource.d.ts +1234 -16
- package/types/Subscriptions.d.ts +41 -1
- package/types/SubscriptionsResource.d.ts +337 -2
- package/types/Tax/Forms.d.ts +133 -0
- package/types/Tax/FormsResource.d.ts +90 -0
- package/types/Terminal/Readers.d.ts +278 -0
- package/types/Terminal/ReadersResource.d.ts +208 -0
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +55 -0
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
- package/types/Treasury/OutboundTransfers.d.ts +26 -0
- package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
- package/types/Treasury/ReceivedCredits.d.ts +26 -0
- package/types/Treasury/ReceivedDebits.d.ts +31 -0
- package/types/WebhookEndpointsResource.d.ts +50 -0
- package/types/index.d.ts +61 -0
- package/types/lib.d.ts +12 -0
package/types/Events.d.ts
CHANGED
|
@@ -21,6 +21,59 @@ declare module 'stripe' {
|
|
|
21
21
|
interface PreviousAttributes {}
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
interface Reason {
|
|
25
|
+
automation_action?: Reason.AutomationAction;
|
|
26
|
+
|
|
27
|
+
request?: Reason.Request;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The type of the reason for the event.
|
|
31
|
+
*/
|
|
32
|
+
type: Reason.Type;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
namespace Reason {
|
|
36
|
+
interface AutomationAction {
|
|
37
|
+
stripe_send_webhook_custom_event?: AutomationAction.StripeSendWebhookCustomEvent;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The trigger name of the automation that triggered this action.
|
|
41
|
+
* Please visit [Revenue and retention automations](https://docs.stripe.com/billing/automations#choose-a-trigger) for all possible trigger names.
|
|
42
|
+
*/
|
|
43
|
+
trigger: string;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The type of the `automation_action`.
|
|
47
|
+
*/
|
|
48
|
+
type: 'stripe_send_webhook_custom_event';
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
namespace AutomationAction {
|
|
52
|
+
interface StripeSendWebhookCustomEvent {
|
|
53
|
+
/**
|
|
54
|
+
* Set of key-value pairs attached to the action when creating an Automation.
|
|
55
|
+
*/
|
|
56
|
+
custom_data: {
|
|
57
|
+
[key: string]: string;
|
|
58
|
+
} | null;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
interface Request {
|
|
63
|
+
/**
|
|
64
|
+
* ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API.
|
|
65
|
+
*/
|
|
66
|
+
id: string | null;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*.
|
|
70
|
+
*/
|
|
71
|
+
idempotency_key: string | null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
type Type = 'automation_action' | 'request';
|
|
75
|
+
}
|
|
76
|
+
|
|
24
77
|
interface Request {
|
|
25
78
|
/**
|
|
26
79
|
* ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API.
|
|
@@ -40,6 +93,8 @@ declare module 'stripe' {
|
|
|
40
93
|
| 'account.external_account.deleted'
|
|
41
94
|
| 'account.external_account.updated'
|
|
42
95
|
| 'account.updated'
|
|
96
|
+
| 'account_notice.created'
|
|
97
|
+
| 'account_notice.updated'
|
|
43
98
|
| 'application_fee.created'
|
|
44
99
|
| 'application_fee.refund.updated'
|
|
45
100
|
| 'application_fee.refunded'
|
|
@@ -48,6 +103,15 @@ declare module 'stripe' {
|
|
|
48
103
|
| 'billing_portal.configuration.updated'
|
|
49
104
|
| 'billing_portal.session.created'
|
|
50
105
|
| 'capability.updated'
|
|
106
|
+
| 'capital.financing_offer.accepted'
|
|
107
|
+
| 'capital.financing_offer.canceled'
|
|
108
|
+
| 'capital.financing_offer.created'
|
|
109
|
+
| 'capital.financing_offer.expired'
|
|
110
|
+
| 'capital.financing_offer.fully_repaid'
|
|
111
|
+
| 'capital.financing_offer.paid_out'
|
|
112
|
+
| 'capital.financing_offer.rejected'
|
|
113
|
+
| 'capital.financing_offer.replacement_created'
|
|
114
|
+
| 'capital.financing_transaction.created'
|
|
51
115
|
| 'cash_balance.funds_available'
|
|
52
116
|
| 'charge.captured'
|
|
53
117
|
| 'charge.dispute.closed'
|
|
@@ -88,7 +152,10 @@ declare module 'stripe' {
|
|
|
88
152
|
| 'customer.source.deleted'
|
|
89
153
|
| 'customer.source.expiring'
|
|
90
154
|
| 'customer.source.updated'
|
|
155
|
+
| 'customer.subscription.collection_paused'
|
|
156
|
+
| 'customer.subscription.collection_resumed'
|
|
91
157
|
| 'customer.subscription.created'
|
|
158
|
+
| 'customer.subscription.custom_event'
|
|
92
159
|
| 'customer.subscription.deleted'
|
|
93
160
|
| 'customer.subscription.paused'
|
|
94
161
|
| 'customer.subscription.pending_update_applied'
|
|
@@ -108,8 +175,10 @@ declare module 'stripe' {
|
|
|
108
175
|
| 'financial_connections.account.disconnected'
|
|
109
176
|
| 'financial_connections.account.reactivated'
|
|
110
177
|
| 'financial_connections.account.refreshed_balance'
|
|
178
|
+
| 'financial_connections.account.refreshed_inferred_balances'
|
|
111
179
|
| 'financial_connections.account.refreshed_ownership'
|
|
112
180
|
| 'financial_connections.account.refreshed_transactions'
|
|
181
|
+
| 'financial_connections.session.updated'
|
|
113
182
|
| 'identity.verification_session.canceled'
|
|
114
183
|
| 'identity.verification_session.created'
|
|
115
184
|
| 'identity.verification_session.processing'
|
|
@@ -122,6 +191,7 @@ declare module 'stripe' {
|
|
|
122
191
|
| 'invoice.finalized'
|
|
123
192
|
| 'invoice.marked_uncollectible'
|
|
124
193
|
| 'invoice.paid'
|
|
194
|
+
| 'invoice.payment.overpaid'
|
|
125
195
|
| 'invoice.payment_action_required'
|
|
126
196
|
| 'invoice.payment_failed'
|
|
127
197
|
| 'invoice.payment_succeeded'
|
|
@@ -186,10 +256,16 @@ declare module 'stripe' {
|
|
|
186
256
|
| 'product.updated'
|
|
187
257
|
| 'promotion_code.created'
|
|
188
258
|
| 'promotion_code.updated'
|
|
259
|
+
| 'quote.accept_failed'
|
|
189
260
|
| 'quote.accepted'
|
|
261
|
+
| 'quote.accepting'
|
|
190
262
|
| 'quote.canceled'
|
|
191
263
|
| 'quote.created'
|
|
264
|
+
| 'quote.draft'
|
|
192
265
|
| 'quote.finalized'
|
|
266
|
+
| 'quote.reestimate_failed'
|
|
267
|
+
| 'quote.reestimated'
|
|
268
|
+
| 'quote.stale'
|
|
193
269
|
| 'radar.early_fraud_warning.created'
|
|
194
270
|
| 'radar.early_fraud_warning.updated'
|
|
195
271
|
| 'refund.created'
|
|
@@ -219,11 +295,13 @@ declare module 'stripe' {
|
|
|
219
295
|
| 'subscription_schedule.expiring'
|
|
220
296
|
| 'subscription_schedule.released'
|
|
221
297
|
| 'subscription_schedule.updated'
|
|
298
|
+
| 'tax.form.updated'
|
|
222
299
|
| 'tax.settings.updated'
|
|
223
300
|
| 'tax_rate.created'
|
|
224
301
|
| 'tax_rate.updated'
|
|
225
302
|
| 'terminal.reader.action_failed'
|
|
226
303
|
| 'terminal.reader.action_succeeded'
|
|
304
|
+
| 'terminal.reader.action_updated'
|
|
227
305
|
| 'test_helpers.test_clock.advancing'
|
|
228
306
|
| 'test_helpers.test_clock.created'
|
|
229
307
|
| 'test_helpers.test_clock.deleted'
|
|
@@ -339,6 +417,11 @@ declare module 'stripe' {
|
|
|
339
417
|
*/
|
|
340
418
|
pending_webhooks: number;
|
|
341
419
|
|
|
420
|
+
/**
|
|
421
|
+
* Information about the action that causes the event. Only present when the event is triggered by an API request or an [Automation](https://docs.stripe.com/billing/automations) action.
|
|
422
|
+
*/
|
|
423
|
+
reason?: Event.Reason | null;
|
|
424
|
+
|
|
342
425
|
/**
|
|
343
426
|
* Information on the API request that triggers the event.
|
|
344
427
|
*/
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
declare module 'stripe' {
|
|
4
|
+
namespace Stripe {
|
|
5
|
+
namespace FinancialConnections {
|
|
6
|
+
/**
|
|
7
|
+
* A historical balance for the account on a particular day. It may be sourced from a balance snapshot provided by a financial institution, or inferred using transactions data.
|
|
8
|
+
*/
|
|
9
|
+
interface AccountInferredBalance {
|
|
10
|
+
/**
|
|
11
|
+
* Unique identifier for the object.
|
|
12
|
+
*/
|
|
13
|
+
id: string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* String representing the object's type. Objects of the same type share the same value.
|
|
17
|
+
*/
|
|
18
|
+
object: 'financial_connections.account_inferred_balance';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The time for which this balance was calculated, measured in seconds since the Unix epoch. If the balance was computed by Stripe and not provided directly by a financial institution, it will always be 23:59:59 UTC.
|
|
22
|
+
*/
|
|
23
|
+
as_of: number;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The balances owed to (or by) the account holder.
|
|
27
|
+
*
|
|
28
|
+
* Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
|
|
29
|
+
*
|
|
30
|
+
* Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.
|
|
31
|
+
*/
|
|
32
|
+
current: {
|
|
33
|
+
[key: string]: number;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -47,6 +47,11 @@ declare module 'stripe' {
|
|
|
47
47
|
*/
|
|
48
48
|
display_name: string | null;
|
|
49
49
|
|
|
50
|
+
/**
|
|
51
|
+
* The state of the most recent attempt to refresh the account's inferred balance history.
|
|
52
|
+
*/
|
|
53
|
+
inferred_balances_refresh?: Account.InferredBalancesRefresh | null;
|
|
54
|
+
|
|
50
55
|
/**
|
|
51
56
|
* The name of the institution that holds this account.
|
|
52
57
|
*/
|
|
@@ -103,7 +108,7 @@ declare module 'stripe' {
|
|
|
103
108
|
/**
|
|
104
109
|
* The list of data refresh subscriptions requested on this account.
|
|
105
110
|
*/
|
|
106
|
-
subscriptions: Array<
|
|
111
|
+
subscriptions: Array<Account.Subscription> | null;
|
|
107
112
|
|
|
108
113
|
/**
|
|
109
114
|
* The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account.
|
|
@@ -220,6 +225,27 @@ declare module 'stripe' {
|
|
|
220
225
|
|
|
221
226
|
type Category = 'cash' | 'credit' | 'investment' | 'other';
|
|
222
227
|
|
|
228
|
+
interface InferredBalancesRefresh {
|
|
229
|
+
/**
|
|
230
|
+
* The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.
|
|
231
|
+
*/
|
|
232
|
+
last_attempted_at: number;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Time at which the next inferred balance refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch.
|
|
236
|
+
*/
|
|
237
|
+
next_refresh_available_at: number | null;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* The status of the last refresh attempt.
|
|
241
|
+
*/
|
|
242
|
+
status: InferredBalancesRefresh.Status;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
namespace InferredBalancesRefresh {
|
|
246
|
+
type Status = 'failed' | 'pending' | 'succeeded';
|
|
247
|
+
}
|
|
248
|
+
|
|
223
249
|
interface OwnershipRefresh {
|
|
224
250
|
/**
|
|
225
251
|
* The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.
|
|
@@ -257,6 +283,8 @@ declare module 'stripe' {
|
|
|
257
283
|
| 'other'
|
|
258
284
|
| 'savings';
|
|
259
285
|
|
|
286
|
+
type Subscription = 'inferred_balances' | 'transactions';
|
|
287
|
+
|
|
260
288
|
type SupportedPaymentMethodType = 'link' | 'us_bank_account';
|
|
261
289
|
|
|
262
290
|
interface TransactionRefresh {
|
|
@@ -48,6 +48,13 @@ declare module 'stripe' {
|
|
|
48
48
|
expand?: Array<string>;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
interface AccountListInferredBalancesParams extends PaginationParams {
|
|
52
|
+
/**
|
|
53
|
+
* Specifies which fields in the response should be expanded.
|
|
54
|
+
*/
|
|
55
|
+
expand?: Array<string>;
|
|
56
|
+
}
|
|
57
|
+
|
|
51
58
|
interface AccountListOwnersParams extends PaginationParams {
|
|
52
59
|
/**
|
|
53
60
|
* The ID of the ownership object to fetch owners from.
|
|
@@ -73,14 +80,18 @@ declare module 'stripe' {
|
|
|
73
80
|
}
|
|
74
81
|
|
|
75
82
|
namespace AccountRefreshParams {
|
|
76
|
-
type Feature =
|
|
83
|
+
type Feature =
|
|
84
|
+
| 'balance'
|
|
85
|
+
| 'inferred_balances'
|
|
86
|
+
| 'ownership'
|
|
87
|
+
| 'transactions';
|
|
77
88
|
}
|
|
78
89
|
|
|
79
90
|
interface AccountSubscribeParams {
|
|
80
91
|
/**
|
|
81
92
|
* The list of account features to which you would like to subscribe.
|
|
82
93
|
*/
|
|
83
|
-
features: Array<
|
|
94
|
+
features: Array<AccountSubscribeParams.Feature>;
|
|
84
95
|
|
|
85
96
|
/**
|
|
86
97
|
* Specifies which fields in the response should be expanded.
|
|
@@ -88,11 +99,15 @@ declare module 'stripe' {
|
|
|
88
99
|
expand?: Array<string>;
|
|
89
100
|
}
|
|
90
101
|
|
|
102
|
+
namespace AccountSubscribeParams {
|
|
103
|
+
type Feature = 'inferred_balances' | 'transactions';
|
|
104
|
+
}
|
|
105
|
+
|
|
91
106
|
interface AccountUnsubscribeParams {
|
|
92
107
|
/**
|
|
93
108
|
* The list of account features from which you would like to unsubscribe.
|
|
94
109
|
*/
|
|
95
|
-
features: Array<
|
|
110
|
+
features: Array<AccountUnsubscribeParams.Feature>;
|
|
96
111
|
|
|
97
112
|
/**
|
|
98
113
|
* Specifies which fields in the response should be expanded.
|
|
@@ -100,6 +115,10 @@ declare module 'stripe' {
|
|
|
100
115
|
expand?: Array<string>;
|
|
101
116
|
}
|
|
102
117
|
|
|
118
|
+
namespace AccountUnsubscribeParams {
|
|
119
|
+
type Feature = 'inferred_balances' | 'transactions';
|
|
120
|
+
}
|
|
121
|
+
|
|
103
122
|
class AccountsResource {
|
|
104
123
|
/**
|
|
105
124
|
* Retrieves the details of an Financial Connections Account.
|
|
@@ -138,6 +157,19 @@ declare module 'stripe' {
|
|
|
138
157
|
options?: RequestOptions
|
|
139
158
|
): Promise<Stripe.Response<Stripe.FinancialConnections.Account>>;
|
|
140
159
|
|
|
160
|
+
/**
|
|
161
|
+
* Lists the recorded inferred balances for a Financial Connections Account.
|
|
162
|
+
*/
|
|
163
|
+
listInferredBalances(
|
|
164
|
+
id: string,
|
|
165
|
+
params?: AccountListInferredBalancesParams,
|
|
166
|
+
options?: RequestOptions
|
|
167
|
+
): ApiListPromise<Stripe.FinancialConnections.AccountInferredBalance>;
|
|
168
|
+
listInferredBalances(
|
|
169
|
+
id: string,
|
|
170
|
+
options?: RequestOptions
|
|
171
|
+
): ApiListPromise<Stripe.FinancialConnections.AccountInferredBalance>;
|
|
172
|
+
|
|
141
173
|
/**
|
|
142
174
|
* Lists all owners for a given Account
|
|
143
175
|
*/
|
|
@@ -34,11 +34,15 @@ declare module 'stripe' {
|
|
|
34
34
|
|
|
35
35
|
filters?: Session.Filters;
|
|
36
36
|
|
|
37
|
+
limits?: Session.Limits;
|
|
38
|
+
|
|
37
39
|
/**
|
|
38
40
|
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
39
41
|
*/
|
|
40
42
|
livemode: boolean;
|
|
41
43
|
|
|
44
|
+
manual_entry?: Session.ManualEntry;
|
|
45
|
+
|
|
42
46
|
/**
|
|
43
47
|
* Permissions requested for accounts collected during this session.
|
|
44
48
|
*/
|
|
@@ -53,6 +57,13 @@ declare module 'stripe' {
|
|
|
53
57
|
* For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
|
|
54
58
|
*/
|
|
55
59
|
return_url?: string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The current state of the session.
|
|
63
|
+
*/
|
|
64
|
+
status?: Session.Status;
|
|
65
|
+
|
|
66
|
+
status_details?: Session.StatusDetails;
|
|
56
67
|
}
|
|
57
68
|
|
|
58
69
|
namespace Session {
|
|
@@ -98,13 +109,45 @@ declare module 'stripe' {
|
|
|
98
109
|
| 'savings';
|
|
99
110
|
}
|
|
100
111
|
|
|
112
|
+
interface Limits {
|
|
113
|
+
/**
|
|
114
|
+
* The number of accounts that can be linked in this Session.
|
|
115
|
+
*/
|
|
116
|
+
accounts: number;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
interface ManualEntry {}
|
|
120
|
+
|
|
101
121
|
type Permission =
|
|
102
122
|
| 'balances'
|
|
103
123
|
| 'ownership'
|
|
104
124
|
| 'payment_method'
|
|
105
125
|
| 'transactions';
|
|
106
126
|
|
|
107
|
-
type Prefetch =
|
|
127
|
+
type Prefetch =
|
|
128
|
+
| 'balances'
|
|
129
|
+
| 'inferred_balances'
|
|
130
|
+
| 'ownership'
|
|
131
|
+
| 'transactions';
|
|
132
|
+
|
|
133
|
+
type Status = 'cancelled' | 'failed' | 'pending' | 'succeeded';
|
|
134
|
+
|
|
135
|
+
interface StatusDetails {
|
|
136
|
+
cancelled?: StatusDetails.Cancelled;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
namespace StatusDetails {
|
|
140
|
+
interface Cancelled {
|
|
141
|
+
/**
|
|
142
|
+
* The reason for the Session being cancelled.
|
|
143
|
+
*/
|
|
144
|
+
reason: Cancelled.Reason;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
namespace Cancelled {
|
|
148
|
+
type Reason = 'custom_manual_entry' | 'other';
|
|
149
|
+
}
|
|
150
|
+
}
|
|
108
151
|
}
|
|
109
152
|
}
|
|
110
153
|
}
|
|
@@ -26,6 +26,16 @@ declare module 'stripe' {
|
|
|
26
26
|
*/
|
|
27
27
|
filters?: SessionCreateParams.Filters;
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Settings for configuring Session-specific limits.
|
|
31
|
+
*/
|
|
32
|
+
limits?: SessionCreateParams.Limits;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Settings for configuring manual entry of account details for this Session.
|
|
36
|
+
*/
|
|
37
|
+
manual_entry?: SessionCreateParams.ManualEntry;
|
|
38
|
+
|
|
29
39
|
/**
|
|
30
40
|
* List of data features that you would like to retrieve upon account creation.
|
|
31
41
|
*/
|
|
@@ -80,13 +90,35 @@ declare module 'stripe' {
|
|
|
80
90
|
| 'savings';
|
|
81
91
|
}
|
|
82
92
|
|
|
93
|
+
interface Limits {
|
|
94
|
+
/**
|
|
95
|
+
* The number of accounts that can be linked in this Session.
|
|
96
|
+
*/
|
|
97
|
+
accounts: number;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
interface ManualEntry {
|
|
101
|
+
/**
|
|
102
|
+
* Whether manual entry will be handled by Stripe during the Session.
|
|
103
|
+
*/
|
|
104
|
+
mode?: ManualEntry.Mode;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
namespace ManualEntry {
|
|
108
|
+
type Mode = 'automatic' | 'custom';
|
|
109
|
+
}
|
|
110
|
+
|
|
83
111
|
type Permission =
|
|
84
112
|
| 'balances'
|
|
85
113
|
| 'ownership'
|
|
86
114
|
| 'payment_method'
|
|
87
115
|
| 'transactions';
|
|
88
116
|
|
|
89
|
-
type Prefetch =
|
|
117
|
+
type Prefetch =
|
|
118
|
+
| 'balances'
|
|
119
|
+
| 'inferred_balances'
|
|
120
|
+
| 'ownership'
|
|
121
|
+
| 'transactions';
|
|
90
122
|
}
|
|
91
123
|
|
|
92
124
|
interface SessionRetrieveParams {
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
declare module 'stripe' {
|
|
4
|
+
namespace Stripe {
|
|
5
|
+
namespace GiftCards {
|
|
6
|
+
/**
|
|
7
|
+
* A gift card represents a single gift card owned by a customer, including the
|
|
8
|
+
* remaining balance, gift card code, and whether or not it is active.
|
|
9
|
+
*/
|
|
10
|
+
interface Card {
|
|
11
|
+
/**
|
|
12
|
+
* Unique identifier for the object.
|
|
13
|
+
*/
|
|
14
|
+
id: string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* String representing the object's type. Objects of the same type share the same value.
|
|
18
|
+
*/
|
|
19
|
+
object: 'gift_cards.card';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Whether this gift card can be used or not.
|
|
23
|
+
*/
|
|
24
|
+
active: boolean;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The amount of funds available for new transactions.
|
|
28
|
+
*/
|
|
29
|
+
amount_available: number;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The amount of funds marked as held.
|
|
33
|
+
*/
|
|
34
|
+
amount_held: number;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Code used to redeem this gift card.
|
|
38
|
+
*/
|
|
39
|
+
code?: string | null;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Time at which the object was created. Measured in seconds since the Unix epoch.
|
|
43
|
+
*/
|
|
44
|
+
created: number;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The related Stripe objects that created this gift card.
|
|
48
|
+
*/
|
|
49
|
+
created_by: Card.CreatedBy | null;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
53
|
+
*/
|
|
54
|
+
currency: string;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
|
58
|
+
*/
|
|
59
|
+
metadata: Stripe.Metadata | null;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Transactions on this gift card.
|
|
63
|
+
*/
|
|
64
|
+
transactions?: ApiList<Stripe.GiftCards.Transaction>;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
namespace Card {
|
|
68
|
+
interface CreatedBy {
|
|
69
|
+
checkout?: CreatedBy.Checkout;
|
|
70
|
+
|
|
71
|
+
order?: CreatedBy.Order;
|
|
72
|
+
|
|
73
|
+
payment?: CreatedBy.Payment;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The type of event that created this object.
|
|
77
|
+
*/
|
|
78
|
+
type: CreatedBy.Type;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
namespace CreatedBy {
|
|
82
|
+
interface Checkout {
|
|
83
|
+
/**
|
|
84
|
+
* The Stripe CheckoutSession that created this object.
|
|
85
|
+
*/
|
|
86
|
+
checkout_session: string;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* The Stripe CheckoutSession LineItem that created this object.
|
|
90
|
+
*/
|
|
91
|
+
line_item: string | null;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
interface Order {
|
|
95
|
+
/**
|
|
96
|
+
* The Stripe Order LineItem that created this object.
|
|
97
|
+
*/
|
|
98
|
+
line_item: string | null;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* The Stripe Order that created this object.
|
|
102
|
+
*/
|
|
103
|
+
order: string;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
interface Payment {
|
|
107
|
+
/**
|
|
108
|
+
* The PaymentIntent that created this object.
|
|
109
|
+
*/
|
|
110
|
+
payment_intent: string;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
type Type = 'checkout' | 'order' | 'payment';
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|