stripe 18.5.0-beta.2 → 18.6.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.
Files changed (76) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/OPENAPI_VERSION +1 -1
  3. package/VERSION +1 -1
  4. package/cjs/Error.js +55 -55
  5. package/cjs/apiVersion.js +1 -1
  6. package/cjs/resources/Mandates.js +5 -0
  7. package/cjs/resources.js +24 -24
  8. package/cjs/stripe.core.js +1 -1
  9. package/esm/Error.js +44 -44
  10. package/esm/apiVersion.js +1 -1
  11. package/esm/resources/Mandates.js +5 -0
  12. package/esm/resources.js +5 -5
  13. package/esm/stripe.core.js +1 -1
  14. package/package.json +1 -1
  15. package/types/AccountSessions.d.ts +45 -0
  16. package/types/AccountSessionsResource.d.ts +76 -13
  17. package/types/Accounts.d.ts +2 -2
  18. package/types/Balance.d.ts +2 -7
  19. package/types/BalanceSettings.d.ts +52 -46
  20. package/types/BalanceSettingsResource.d.ts +55 -46
  21. package/types/Billing/AlertTriggereds.d.ts +1 -1
  22. package/types/Billing/MeterUsageRows.d.ts +1 -1
  23. package/types/Billing/Meters.d.ts +1 -1
  24. package/types/Billing/MetersResource.d.ts +1 -1
  25. package/types/BillingPortal/Configurations.d.ts +5 -0
  26. package/types/BillingPortal/ConfigurationsResource.d.ts +10 -0
  27. package/types/Charges.d.ts +81 -5
  28. package/types/Checkout/Sessions.d.ts +70 -2
  29. package/types/Checkout/SessionsResource.d.ts +117 -3
  30. package/types/CreditNotesResource.d.ts +3 -3
  31. package/types/Disputes.d.ts +7 -2
  32. package/types/Errors.d.ts +45 -45
  33. package/types/FileLinksResource.d.ts +1 -1
  34. package/types/Files.d.ts +1 -0
  35. package/types/FilesResource.d.ts +3 -1
  36. package/types/InvoicePaymentsResource.d.ts +3 -0
  37. package/types/Invoices.d.ts +3 -1
  38. package/types/InvoicesResource.d.ts +59 -0
  39. package/types/Issuing/CardsResource.d.ts +10 -0
  40. package/types/Mandates.d.ts +58 -1
  41. package/types/MandatesResource.d.ts +31 -0
  42. package/types/PaymentAttemptRecords.d.ts +164 -9
  43. package/types/PaymentAttemptRecordsResource.d.ts +5 -0
  44. package/types/PaymentIntents.d.ts +136 -2
  45. package/types/PaymentIntentsResource.d.ts +280 -3
  46. package/types/PaymentLinksResource.d.ts +1 -1
  47. package/types/PaymentMethods.d.ts +5 -0
  48. package/types/PaymentRecords.d.ts +164 -9
  49. package/types/PaymentRecordsResource.d.ts +24 -3
  50. package/types/Payouts.d.ts +1 -1
  51. package/types/PromotionCodes.d.ts +5 -2
  52. package/types/QuotePreviewInvoices.d.ts +3 -1
  53. package/types/QuotePreviewSubscriptionSchedules.d.ts +47 -0
  54. package/types/SetupAttempts.d.ts +7 -1
  55. package/types/SetupIntents.d.ts +95 -1
  56. package/types/SetupIntentsResource.d.ts +207 -0
  57. package/types/SubscriptionSchedules.d.ts +47 -0
  58. package/types/SubscriptionSchedulesResource.d.ts +112 -0
  59. package/types/SubscriptionsResource.d.ts +119 -7
  60. package/types/Terminal/Configurations.d.ts +28 -0
  61. package/types/Terminal/ConfigurationsResource.d.ts +72 -0
  62. package/types/TestHelpers/Terminal/ReadersResource.d.ts +28 -1
  63. package/types/V2/Core/Accounts/PersonsResource.d.ts +32 -0
  64. package/types/V2/Core/Accounts.d.ts +49 -0
  65. package/types/V2/Core/AccountsResource.d.ts +78 -0
  66. package/types/V2/Core/Persons.d.ts +16 -0
  67. package/types/V2/EventTypes.d.ts +377 -377
  68. package/types/V2/MoneyManagement/FinancialAccounts.d.ts +5 -0
  69. package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +5 -0
  70. package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +1 -1
  71. package/types/V2/MoneyManagement/TransactionEntries.d.ts +7 -0
  72. package/types/V2/MoneyManagement/Transactions.d.ts +7 -0
  73. package/types/WebhookEndpointsResource.d.ts +2 -1
  74. package/types/index.d.ts +5 -5
  75. package/types/lib.d.ts +1 -1
  76. package/types/test/typescriptTest.ts +3 -3
@@ -3,27 +3,28 @@
3
3
  declare module 'stripe' {
4
4
  namespace Stripe.V2 {
5
5
  export type Event =
6
- | Stripe.Events.V2CoreAccountIncludingRequirementsUpdatedEvent
7
- | Stripe.Events.V2CoreAccountLinkReturnedEvent
6
+ | Stripe.Events.V1BillingMeterErrorReportTriggeredEvent
7
+ | Stripe.Events.V1BillingMeterNoMeterFoundEvent
8
8
  | Stripe.Events.V2CoreAccountClosedEvent
9
9
  | Stripe.Events.V2CoreAccountCreatedEvent
10
10
  | Stripe.Events.V2CoreAccountUpdatedEvent
11
- | Stripe.Events.V2CoreAccountIncludingDefaultsUpdatedEvent
12
11
  | Stripe.Events.V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent
13
12
  | Stripe.Events.V2CoreAccountIncludingConfigurationCustomerUpdatedEvent
14
- | Stripe.Events.V2CoreAccountIncludingIdentityUpdatedEvent
15
- | Stripe.Events.V2CoreAccountPersonCreatedEvent
16
- | Stripe.Events.V2CoreAccountPersonDeletedEvent
17
- | Stripe.Events.V2CoreAccountPersonUpdatedEvent
18
13
  | Stripe.Events.V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent
19
14
  | Stripe.Events.V2CoreAccountIncludingConfigurationMerchantUpdatedEvent
20
15
  | Stripe.Events.V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent
21
16
  | Stripe.Events.V2CoreAccountIncludingConfigurationRecipientUpdatedEvent
22
17
  | Stripe.Events.V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent
23
18
  | Stripe.Events.V2CoreAccountIncludingConfigurationStorerUpdatedEvent
19
+ | Stripe.Events.V2CoreAccountIncludingDefaultsUpdatedEvent
20
+ | Stripe.Events.V2CoreAccountIncludingIdentityUpdatedEvent
21
+ | Stripe.Events.V2CoreAccountIncludingRequirementsUpdatedEvent
22
+ | Stripe.Events.V2CoreAccountLinkReturnedEvent
23
+ | Stripe.Events.V2CoreAccountPersonCreatedEvent
24
+ | Stripe.Events.V2CoreAccountPersonDeletedEvent
25
+ | Stripe.Events.V2CoreAccountPersonUpdatedEvent
26
+ | Stripe.Events.V2CoreEventDestinationPingEvent
24
27
  | Stripe.Events.V2MoneyManagementAdjustmentCreatedEvent
25
- | Stripe.Events.V1BillingMeterErrorReportTriggeredEvent
26
- | Stripe.Events.V1BillingMeterNoMeterFoundEvent
27
28
  | Stripe.Events.V2MoneyManagementFinancialAccountCreatedEvent
28
29
  | Stripe.Events.V2MoneyManagementFinancialAccountUpdatedEvent
29
30
  | Stripe.Events.V2MoneyManagementFinancialAddressActivatedEvent
@@ -34,13 +35,6 @@ declare module 'stripe' {
34
35
  | Stripe.Events.V2MoneyManagementInboundTransferBankDebitQueuedEvent
35
36
  | Stripe.Events.V2MoneyManagementInboundTransferBankDebitReturnedEvent
36
37
  | Stripe.Events.V2MoneyManagementInboundTransferBankDebitSucceededEvent
37
- | Stripe.Events.V2CoreEventDestinationPingEvent
38
- | Stripe.Events.V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent
39
- | Stripe.Events.V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent
40
- | Stripe.Events.V2PaymentsOffSessionPaymentCanceledEvent
41
- | Stripe.Events.V2PaymentsOffSessionPaymentCreatedEvent
42
- | Stripe.Events.V2PaymentsOffSessionPaymentFailedEvent
43
- | Stripe.Events.V2PaymentsOffSessionPaymentSucceededEvent
44
38
  | Stripe.Events.V2MoneyManagementOutboundPaymentCanceledEvent
45
39
  | Stripe.Events.V2MoneyManagementOutboundPaymentCreatedEvent
46
40
  | Stripe.Events.V2MoneyManagementOutboundPaymentFailedEvent
@@ -64,57 +58,218 @@ declare module 'stripe' {
64
58
  | Stripe.Events.V2MoneyManagementReceivedDebitSucceededEvent
65
59
  | Stripe.Events.V2MoneyManagementReceivedDebitUpdatedEvent
66
60
  | Stripe.Events.V2MoneyManagementTransactionCreatedEvent
67
- | Stripe.Events.V2MoneyManagementTransactionUpdatedEvent;
61
+ | Stripe.Events.V2MoneyManagementTransactionUpdatedEvent
62
+ | Stripe.Events.V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent
63
+ | Stripe.Events.V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent
64
+ | Stripe.Events.V2PaymentsOffSessionPaymentCanceledEvent
65
+ | Stripe.Events.V2PaymentsOffSessionPaymentCreatedEvent
66
+ | Stripe.Events.V2PaymentsOffSessionPaymentFailedEvent
67
+ | Stripe.Events.V2PaymentsOffSessionPaymentSucceededEvent;
68
68
  }
69
69
 
70
70
  namespace Stripe.Events {
71
71
  /**
72
- * Occurs when an Account's requirements are updated.
72
+ * Occurs when a Meter has invalid async usage events.
73
73
  */
74
- export interface V2CoreAccountIncludingRequirementsUpdatedEvent
74
+ export interface V1BillingMeterErrorReportTriggeredEvent
75
75
  extends V2.EventBase {
76
- type: 'v2.core.account[requirements].updated';
76
+ type: 'v1.billing.meter.error_report_triggered';
77
+ // Retrieves data specific to this event.
78
+ data: V1BillingMeterErrorReportTriggeredEvent.Data;
77
79
  // Object containing the reference to API resource relevant to the event.
78
80
  related_object: Event.RelatedObject;
79
81
  // Retrieves the object associated with the event.
80
- fetchRelatedObject(): Promise<V2.Core.Account>;
82
+ fetchRelatedObject(): Promise<Billing.Meter>;
83
+ }
84
+
85
+ namespace V1BillingMeterErrorReportTriggeredEvent {
86
+ export interface Data {
87
+ /**
88
+ * Extra field included in the event's `data` when fetched from /v2/events.
89
+ */
90
+ developer_message_summary: string;
91
+
92
+ /**
93
+ * This contains information about why meter error happens.
94
+ */
95
+ reason: Data.Reason;
96
+
97
+ /**
98
+ * The end of the window that is encapsulated by this summary.
99
+ */
100
+ validation_end: string;
101
+
102
+ /**
103
+ * The start of the window that is encapsulated by this summary.
104
+ */
105
+ validation_start: string;
106
+ }
107
+
108
+ namespace Data {
109
+ export interface Reason {
110
+ /**
111
+ * The total error count within this window.
112
+ */
113
+ error_count: number;
114
+
115
+ /**
116
+ * The error details.
117
+ */
118
+ error_types: Array<Reason.ErrorType>;
119
+ }
120
+
121
+ namespace Reason {
122
+ export interface ErrorType {
123
+ /**
124
+ * Open Enum.
125
+ */
126
+ code: ErrorType.Code;
127
+
128
+ /**
129
+ * The number of errors of this type.
130
+ */
131
+ error_count: number;
132
+
133
+ /**
134
+ * A list of sample errors of this type.
135
+ */
136
+ sample_errors: Array<ErrorType.SampleError>;
137
+ }
138
+
139
+ namespace ErrorType {
140
+ export type Code =
141
+ | 'archived_meter'
142
+ | 'meter_event_customer_not_found'
143
+ | 'meter_event_dimension_count_too_high'
144
+ | 'meter_event_invalid_value'
145
+ | 'meter_event_no_customer_defined'
146
+ | 'missing_dimension_payload_keys'
147
+ | 'no_meter'
148
+ | 'timestamp_in_future'
149
+ | 'timestamp_too_far_in_past';
150
+
151
+ export interface SampleError {
152
+ /**
153
+ * The error message.
154
+ */
155
+ error_message: string;
156
+
157
+ /**
158
+ * The request causes the error.
159
+ */
160
+ request: SampleError.Request;
161
+ }
162
+
163
+ namespace SampleError {
164
+ export interface Request {
165
+ /**
166
+ * The request idempotency key.
167
+ */
168
+ identifier: string;
169
+ }
170
+ }
171
+ }
172
+ }
173
+ }
81
174
  }
82
175
 
83
176
  /**
84
- * Occurs when the generated AccountLink is completed.
177
+ * Occurs when a Meter's id is missing or invalid in async usage events.
85
178
  */
86
- export interface V2CoreAccountLinkReturnedEvent extends V2.EventBase {
87
- type: 'v2.core.account_link.returned';
179
+ export interface V1BillingMeterNoMeterFoundEvent extends V2.EventBase {
180
+ type: 'v1.billing.meter.no_meter_found';
88
181
  // Retrieves data specific to this event.
89
- data: V2CoreAccountLinkReturnedEvent.Data;
182
+ data: V1BillingMeterNoMeterFoundEvent.Data;
90
183
  }
91
184
 
92
- namespace V2CoreAccountLinkReturnedEvent {
185
+ namespace V1BillingMeterNoMeterFoundEvent {
93
186
  export interface Data {
94
187
  /**
95
- * The ID of the v2 account.
188
+ * Extra field included in the event's `data` when fetched from /v2/events.
96
189
  */
97
- account_id: string;
190
+ developer_message_summary: string;
98
191
 
99
192
  /**
100
- * Configurations on the Account that was onboarded via the account link.
193
+ * This contains information about why meter error happens.
101
194
  */
102
- configurations: Array<Data.Configuration>;
195
+ reason: Data.Reason;
103
196
 
104
197
  /**
105
- * Open Enum. The use case type of the account link that has been completed.
198
+ * The end of the window that is encapsulated by this summary.
106
199
  */
107
- use_case: Data.UseCase;
200
+ validation_end: string;
201
+
202
+ /**
203
+ * The start of the window that is encapsulated by this summary.
204
+ */
205
+ validation_start: string;
108
206
  }
109
207
 
110
208
  namespace Data {
111
- export type Configuration =
112
- | 'customer'
113
- | 'merchant'
114
- | 'recipient'
115
- | 'storer';
209
+ export interface Reason {
210
+ /**
211
+ * The total error count within this window.
212
+ */
213
+ error_count: number;
116
214
 
117
- export type UseCase = 'account_onboarding' | 'account_update';
215
+ /**
216
+ * The error details.
217
+ */
218
+ error_types: Array<Reason.ErrorType>;
219
+ }
220
+
221
+ namespace Reason {
222
+ export interface ErrorType {
223
+ /**
224
+ * Open Enum.
225
+ */
226
+ code: ErrorType.Code;
227
+
228
+ /**
229
+ * The number of errors of this type.
230
+ */
231
+ error_count: number;
232
+
233
+ /**
234
+ * A list of sample errors of this type.
235
+ */
236
+ sample_errors: Array<ErrorType.SampleError>;
237
+ }
238
+
239
+ namespace ErrorType {
240
+ export type Code =
241
+ | 'archived_meter'
242
+ | 'meter_event_customer_not_found'
243
+ | 'meter_event_dimension_count_too_high'
244
+ | 'meter_event_invalid_value'
245
+ | 'meter_event_no_customer_defined'
246
+ | 'missing_dimension_payload_keys'
247
+ | 'no_meter'
248
+ | 'timestamp_in_future'
249
+ | 'timestamp_too_far_in_past';
250
+
251
+ export interface SampleError {
252
+ /**
253
+ * The error message.
254
+ */
255
+ error_message: string;
256
+
257
+ /**
258
+ * The request causes the error.
259
+ */
260
+ request: SampleError.Request;
261
+ }
262
+
263
+ namespace SampleError {
264
+ export interface Request {
265
+ /**
266
+ * The request idempotency key.
267
+ */
268
+ identifier: string;
269
+ }
270
+ }
271
+ }
272
+ }
118
273
  }
119
274
  }
120
275
 
@@ -151,18 +306,6 @@ declare module 'stripe' {
151
306
  fetchRelatedObject(): Promise<V2.Core.Account>;
152
307
  }
153
308
 
154
- /**
155
- * This event occurs when account defaults are created or updated.
156
- */
157
- export interface V2CoreAccountIncludingDefaultsUpdatedEvent
158
- extends V2.EventBase {
159
- type: 'v2.core.account[defaults].updated';
160
- // Object containing the reference to API resource relevant to the event.
161
- related_object: Event.RelatedObject;
162
- // Retrieves the object associated with the event.
163
- fetchRelatedObject(): Promise<V2.Core.Account>;
164
- }
165
-
166
309
  /**
167
310
  * Occurs when the status of an Account's customer configuration capability is updated.
168
311
  */
@@ -198,84 +341,6 @@ declare module 'stripe' {
198
341
  fetchRelatedObject(): Promise<V2.Core.Account>;
199
342
  }
200
343
 
201
- /**
202
- * Occurs when an Identity is updated.
203
- */
204
- export interface V2CoreAccountIncludingIdentityUpdatedEvent
205
- extends V2.EventBase {
206
- type: 'v2.core.account[identity].updated';
207
- // Object containing the reference to API resource relevant to the event.
208
- related_object: Event.RelatedObject;
209
- // Retrieves the object associated with the event.
210
- fetchRelatedObject(): Promise<V2.Core.Account>;
211
- }
212
-
213
- /**
214
- * Occurs when a Person is created.
215
- */
216
- export interface V2CoreAccountPersonCreatedEvent extends V2.EventBase {
217
- type: 'v2.core.account_person.created';
218
- // Retrieves data specific to this event.
219
- data: V2CoreAccountPersonCreatedEvent.Data;
220
- // Object containing the reference to API resource relevant to the event.
221
- related_object: Event.RelatedObject;
222
- // Retrieves the object associated with the event.
223
- fetchRelatedObject(): Promise<V2.Core.Person>;
224
- }
225
-
226
- namespace V2CoreAccountPersonCreatedEvent {
227
- export interface Data {
228
- /**
229
- * The ID of the v2 account.
230
- */
231
- account_id: string;
232
- }
233
- }
234
-
235
- /**
236
- * Occurs when a Person is deleted.
237
- */
238
- export interface V2CoreAccountPersonDeletedEvent extends V2.EventBase {
239
- type: 'v2.core.account_person.deleted';
240
- // Retrieves data specific to this event.
241
- data: V2CoreAccountPersonDeletedEvent.Data;
242
- // Object containing the reference to API resource relevant to the event.
243
- related_object: Event.RelatedObject;
244
- // Retrieves the object associated with the event.
245
- fetchRelatedObject(): Promise<V2.Core.Person>;
246
- }
247
-
248
- namespace V2CoreAccountPersonDeletedEvent {
249
- export interface Data {
250
- /**
251
- * The ID of the v2 account.
252
- */
253
- account_id: string;
254
- }
255
- }
256
-
257
- /**
258
- * Occurs when a Person is updated.
259
- */
260
- export interface V2CoreAccountPersonUpdatedEvent extends V2.EventBase {
261
- type: 'v2.core.account_person.updated';
262
- // Retrieves data specific to this event.
263
- data: V2CoreAccountPersonUpdatedEvent.Data;
264
- // Object containing the reference to API resource relevant to the event.
265
- related_object: Event.RelatedObject;
266
- // Retrieves the object associated with the event.
267
- fetchRelatedObject(): Promise<V2.Core.Person>;
268
- }
269
-
270
- namespace V2CoreAccountPersonUpdatedEvent {
271
- export interface Data {
272
- /**
273
- * The ID of the v2 account.
274
- */
275
- account_id: string;
276
- }
277
- }
278
-
279
344
  /**
280
345
  * Occurs when the status of an Account's merchant configuration capability is updated.
281
346
  */
@@ -455,220 +520,166 @@ declare module 'stripe' {
455
520
  }
456
521
 
457
522
  /**
458
- * Occurs when an Adjustment is created.
523
+ * This event occurs when account defaults are created or updated.
459
524
  */
460
- export interface V2MoneyManagementAdjustmentCreatedEvent
525
+ export interface V2CoreAccountIncludingDefaultsUpdatedEvent
461
526
  extends V2.EventBase {
462
- type: 'v2.money_management.adjustment.created';
527
+ type: 'v2.core.account[defaults].updated';
463
528
  // Object containing the reference to API resource relevant to the event.
464
529
  related_object: Event.RelatedObject;
465
530
  // Retrieves the object associated with the event.
466
- fetchRelatedObject(): Promise<V2.MoneyManagement.Adjustment>;
531
+ fetchRelatedObject(): Promise<V2.Core.Account>;
467
532
  }
468
533
 
469
534
  /**
470
- * Occurs when a Meter has invalid async usage events.
535
+ * Occurs when an Identity is updated.
471
536
  */
472
- export interface V1BillingMeterErrorReportTriggeredEvent
537
+ export interface V2CoreAccountIncludingIdentityUpdatedEvent
473
538
  extends V2.EventBase {
474
- type: 'v1.billing.meter.error_report_triggered';
475
- // Retrieves data specific to this event.
476
- data: V1BillingMeterErrorReportTriggeredEvent.Data;
539
+ type: 'v2.core.account[identity].updated';
477
540
  // Object containing the reference to API resource relevant to the event.
478
541
  related_object: Event.RelatedObject;
479
542
  // Retrieves the object associated with the event.
480
- fetchRelatedObject(): Promise<Billing.Meter>;
543
+ fetchRelatedObject(): Promise<V2.Core.Account>;
481
544
  }
482
545
 
483
- namespace V1BillingMeterErrorReportTriggeredEvent {
484
- export interface Data {
485
- /**
486
- * Extra field included in the event's `data` when fetched from /v2/events.
487
- */
488
- developer_message_summary: string;
546
+ /**
547
+ * Occurs when an Account's requirements are updated.
548
+ */
549
+ export interface V2CoreAccountIncludingRequirementsUpdatedEvent
550
+ extends V2.EventBase {
551
+ type: 'v2.core.account[requirements].updated';
552
+ // Object containing the reference to API resource relevant to the event.
553
+ related_object: Event.RelatedObject;
554
+ // Retrieves the object associated with the event.
555
+ fetchRelatedObject(): Promise<V2.Core.Account>;
556
+ }
489
557
 
558
+ /**
559
+ * Occurs when the generated AccountLink is completed.
560
+ */
561
+ export interface V2CoreAccountLinkReturnedEvent extends V2.EventBase {
562
+ type: 'v2.core.account_link.returned';
563
+ // Retrieves data specific to this event.
564
+ data: V2CoreAccountLinkReturnedEvent.Data;
565
+ }
566
+
567
+ namespace V2CoreAccountLinkReturnedEvent {
568
+ export interface Data {
490
569
  /**
491
- * This contains information about why meter error happens.
570
+ * The ID of the v2 account.
492
571
  */
493
- reason: Data.Reason;
572
+ account_id: string;
494
573
 
495
574
  /**
496
- * The end of the window that is encapsulated by this summary.
575
+ * Configurations on the Account that was onboarded via the account link.
497
576
  */
498
- validation_end: string;
577
+ configurations: Array<Data.Configuration>;
499
578
 
500
579
  /**
501
- * The start of the window that is encapsulated by this summary.
580
+ * Open Enum. The use case type of the account link that has been completed.
502
581
  */
503
- validation_start: string;
582
+ use_case: Data.UseCase;
504
583
  }
505
584
 
506
585
  namespace Data {
507
- export interface Reason {
508
- /**
509
- * The total error count within this window.
510
- */
511
- error_count: number;
512
-
513
- /**
514
- * The error details.
515
- */
516
- error_types: Array<Reason.ErrorType>;
517
- }
518
-
519
- namespace Reason {
520
- export interface ErrorType {
521
- /**
522
- * Open Enum.
523
- */
524
- code: ErrorType.Code;
525
-
526
- /**
527
- * The number of errors of this type.
528
- */
529
- error_count: number;
530
-
531
- /**
532
- * A list of sample errors of this type.
533
- */
534
- sample_errors: Array<ErrorType.SampleError>;
535
- }
536
-
537
- namespace ErrorType {
538
- export type Code =
539
- | 'archived_meter'
540
- | 'meter_event_customer_not_found'
541
- | 'meter_event_dimension_count_too_high'
542
- | 'meter_event_invalid_value'
543
- | 'meter_event_no_customer_defined'
544
- | 'missing_dimension_payload_keys'
545
- | 'no_meter'
546
- | 'timestamp_in_future'
547
- | 'timestamp_too_far_in_past';
548
-
549
- export interface SampleError {
550
- /**
551
- * The error message.
552
- */
553
- error_message: string;
554
-
555
- /**
556
- * The request causes the error.
557
- */
558
- request: SampleError.Request;
559
- }
586
+ export type Configuration =
587
+ | 'customer'
588
+ | 'merchant'
589
+ | 'recipient'
590
+ | 'storer';
560
591
 
561
- namespace SampleError {
562
- export interface Request {
563
- /**
564
- * The request idempotency key.
565
- */
566
- identifier: string;
567
- }
568
- }
569
- }
570
- }
592
+ export type UseCase = 'account_onboarding' | 'account_update';
571
593
  }
572
594
  }
573
595
 
574
596
  /**
575
- * Occurs when a Meter's id is missing or invalid in async usage events.
597
+ * Occurs when a Person is created.
576
598
  */
577
- export interface V1BillingMeterNoMeterFoundEvent extends V2.EventBase {
578
- type: 'v1.billing.meter.no_meter_found';
599
+ export interface V2CoreAccountPersonCreatedEvent extends V2.EventBase {
600
+ type: 'v2.core.account_person.created';
579
601
  // Retrieves data specific to this event.
580
- data: V1BillingMeterNoMeterFoundEvent.Data;
602
+ data: V2CoreAccountPersonCreatedEvent.Data;
603
+ // Object containing the reference to API resource relevant to the event.
604
+ related_object: Event.RelatedObject;
605
+ // Retrieves the object associated with the event.
606
+ fetchRelatedObject(): Promise<V2.Core.Person>;
581
607
  }
582
608
 
583
- namespace V1BillingMeterNoMeterFoundEvent {
609
+ namespace V2CoreAccountPersonCreatedEvent {
584
610
  export interface Data {
585
611
  /**
586
- * Extra field included in the event's `data` when fetched from /v2/events.
612
+ * The ID of the v2 account.
587
613
  */
588
- developer_message_summary: string;
614
+ account_id: string;
615
+ }
616
+ }
589
617
 
590
- /**
591
- * This contains information about why meter error happens.
592
- */
593
- reason: Data.Reason;
618
+ /**
619
+ * Occurs when a Person is deleted.
620
+ */
621
+ export interface V2CoreAccountPersonDeletedEvent extends V2.EventBase {
622
+ type: 'v2.core.account_person.deleted';
623
+ // Retrieves data specific to this event.
624
+ data: V2CoreAccountPersonDeletedEvent.Data;
625
+ // Object containing the reference to API resource relevant to the event.
626
+ related_object: Event.RelatedObject;
627
+ // Retrieves the object associated with the event.
628
+ fetchRelatedObject(): Promise<V2.Core.Person>;
629
+ }
594
630
 
631
+ namespace V2CoreAccountPersonDeletedEvent {
632
+ export interface Data {
595
633
  /**
596
- * The end of the window that is encapsulated by this summary.
634
+ * The ID of the v2 account.
597
635
  */
598
- validation_end: string;
636
+ account_id: string;
637
+ }
638
+ }
639
+
640
+ /**
641
+ * Occurs when a Person is updated.
642
+ */
643
+ export interface V2CoreAccountPersonUpdatedEvent extends V2.EventBase {
644
+ type: 'v2.core.account_person.updated';
645
+ // Retrieves data specific to this event.
646
+ data: V2CoreAccountPersonUpdatedEvent.Data;
647
+ // Object containing the reference to API resource relevant to the event.
648
+ related_object: Event.RelatedObject;
649
+ // Retrieves the object associated with the event.
650
+ fetchRelatedObject(): Promise<V2.Core.Person>;
651
+ }
599
652
 
653
+ namespace V2CoreAccountPersonUpdatedEvent {
654
+ export interface Data {
600
655
  /**
601
- * The start of the window that is encapsulated by this summary.
656
+ * The ID of the v2 account.
602
657
  */
603
- validation_start: string;
658
+ account_id: string;
604
659
  }
660
+ }
605
661
 
606
- namespace Data {
607
- export interface Reason {
608
- /**
609
- * The total error count within this window.
610
- */
611
- error_count: number;
612
-
613
- /**
614
- * The error details.
615
- */
616
- error_types: Array<Reason.ErrorType>;
617
- }
618
-
619
- namespace Reason {
620
- export interface ErrorType {
621
- /**
622
- * Open Enum.
623
- */
624
- code: ErrorType.Code;
625
-
626
- /**
627
- * The number of errors of this type.
628
- */
629
- error_count: number;
630
-
631
- /**
632
- * A list of sample errors of this type.
633
- */
634
- sample_errors: Array<ErrorType.SampleError>;
635
- }
636
-
637
- namespace ErrorType {
638
- export type Code =
639
- | 'archived_meter'
640
- | 'meter_event_customer_not_found'
641
- | 'meter_event_dimension_count_too_high'
642
- | 'meter_event_invalid_value'
643
- | 'meter_event_no_customer_defined'
644
- | 'missing_dimension_payload_keys'
645
- | 'no_meter'
646
- | 'timestamp_in_future'
647
- | 'timestamp_too_far_in_past';
648
-
649
- export interface SampleError {
650
- /**
651
- * The error message.
652
- */
653
- error_message: string;
654
-
655
- /**
656
- * The request causes the error.
657
- */
658
- request: SampleError.Request;
659
- }
662
+ /**
663
+ * A ping event used to test the connection to an EventDestination.
664
+ */
665
+ export interface V2CoreEventDestinationPingEvent extends V2.EventBase {
666
+ type: 'v2.core.event_destination.ping';
667
+ // Object containing the reference to API resource relevant to the event.
668
+ related_object: Event.RelatedObject;
669
+ // Retrieves the object associated with the event.
670
+ fetchRelatedObject(): Promise<V2.EventDestination>;
671
+ }
660
672
 
661
- namespace SampleError {
662
- export interface Request {
663
- /**
664
- * The request idempotency key.
665
- */
666
- identifier: string;
667
- }
668
- }
669
- }
670
- }
671
- }
673
+ /**
674
+ * Occurs when an Adjustment is created.
675
+ */
676
+ export interface V2MoneyManagementAdjustmentCreatedEvent
677
+ extends V2.EventBase {
678
+ type: 'v2.money_management.adjustment.created';
679
+ // Object containing the reference to API resource relevant to the event.
680
+ related_object: Event.RelatedObject;
681
+ // Retrieves the object associated with the event.
682
+ fetchRelatedObject(): Promise<V2.MoneyManagement.Adjustment>;
672
683
  }
673
684
 
674
685
  /**
@@ -802,90 +813,6 @@ declare module 'stripe' {
802
813
  fetchRelatedObject(): Promise<V2.MoneyManagement.InboundTransfer>;
803
814
  }
804
815
 
805
- /**
806
- * A ping event used to test the connection to an EventDestination.
807
- */
808
- export interface V2CoreEventDestinationPingEvent extends V2.EventBase {
809
- type: 'v2.core.event_destination.ping';
810
- // Object containing the reference to API resource relevant to the event.
811
- related_object: Event.RelatedObject;
812
- // Retrieves the object associated with the event.
813
- fetchRelatedObject(): Promise<V2.EventDestination>;
814
- }
815
-
816
- /**
817
- * Sent after a failed authorization if there are still retries available on the OffSessionPayment.
818
- */
819
- export interface V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent
820
- extends V2.EventBase {
821
- type: 'v2.payments.off_session_payment.authorization_attempt_failed';
822
- // Object containing the reference to API resource relevant to the event.
823
- related_object: Event.RelatedObject;
824
- // Retrieves the object associated with the event.
825
- fetchRelatedObject(): Promise<V2.Payments.OffSessionPayment>;
826
- }
827
-
828
- /**
829
- * Sent when our internal scheduling system kicks off an attempt at authorization, whether it's a
830
- * retry or an initial authorization.
831
- */
832
- export interface V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent
833
- extends V2.EventBase {
834
- type: 'v2.payments.off_session_payment.authorization_attempt_started';
835
- // Object containing the reference to API resource relevant to the event.
836
- related_object: Event.RelatedObject;
837
- // Retrieves the object associated with the event.
838
- fetchRelatedObject(): Promise<V2.Payments.OffSessionPayment>;
839
- }
840
-
841
- /**
842
- * Sent immediately following a user's call to the Off-Session Payments cancel endpoint.
843
- */
844
- export interface V2PaymentsOffSessionPaymentCanceledEvent
845
- extends V2.EventBase {
846
- type: 'v2.payments.off_session_payment.canceled';
847
- // Object containing the reference to API resource relevant to the event.
848
- related_object: Event.RelatedObject;
849
- // Retrieves the object associated with the event.
850
- fetchRelatedObject(): Promise<V2.Payments.OffSessionPayment>;
851
- }
852
-
853
- /**
854
- * Sent immediately following a user's call to the Off-Session Payments create endpoint.
855
- */
856
- export interface V2PaymentsOffSessionPaymentCreatedEvent
857
- extends V2.EventBase {
858
- type: 'v2.payments.off_session_payment.created';
859
- // Object containing the reference to API resource relevant to the event.
860
- related_object: Event.RelatedObject;
861
- // Retrieves the object associated with the event.
862
- fetchRelatedObject(): Promise<V2.Payments.OffSessionPayment>;
863
- }
864
-
865
- /**
866
- * Sent after a failed authorization if there are no retries remaining, or if the failure is unretryable.
867
- */
868
- export interface V2PaymentsOffSessionPaymentFailedEvent
869
- extends V2.EventBase {
870
- type: 'v2.payments.off_session_payment.failed';
871
- // Object containing the reference to API resource relevant to the event.
872
- related_object: Event.RelatedObject;
873
- // Retrieves the object associated with the event.
874
- fetchRelatedObject(): Promise<V2.Payments.OffSessionPayment>;
875
- }
876
-
877
- /**
878
- * Sent immediately after a successful authorization.
879
- */
880
- export interface V2PaymentsOffSessionPaymentSucceededEvent
881
- extends V2.EventBase {
882
- type: 'v2.payments.off_session_payment.succeeded';
883
- // Object containing the reference to API resource relevant to the event.
884
- related_object: Event.RelatedObject;
885
- // Retrieves the object associated with the event.
886
- fetchRelatedObject(): Promise<V2.Payments.OffSessionPayment>;
887
- }
888
-
889
816
  /**
890
817
  * Occurs when an OutboundPayment transitions into the canceled state.
891
818
  */
@@ -1184,5 +1111,78 @@ declare module 'stripe' {
1184
1111
  // Retrieves the object associated with the event.
1185
1112
  fetchRelatedObject(): Promise<V2.MoneyManagement.Transaction>;
1186
1113
  }
1114
+
1115
+ /**
1116
+ * Sent after a failed authorization if there are still retries available on the OffSessionPayment.
1117
+ */
1118
+ export interface V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent
1119
+ extends V2.EventBase {
1120
+ type: 'v2.payments.off_session_payment.authorization_attempt_failed';
1121
+ // Object containing the reference to API resource relevant to the event.
1122
+ related_object: Event.RelatedObject;
1123
+ // Retrieves the object associated with the event.
1124
+ fetchRelatedObject(): Promise<V2.Payments.OffSessionPayment>;
1125
+ }
1126
+
1127
+ /**
1128
+ * Sent when our internal scheduling system kicks off an attempt at authorization, whether it's a
1129
+ * retry or an initial authorization.
1130
+ */
1131
+ export interface V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent
1132
+ extends V2.EventBase {
1133
+ type: 'v2.payments.off_session_payment.authorization_attempt_started';
1134
+ // Object containing the reference to API resource relevant to the event.
1135
+ related_object: Event.RelatedObject;
1136
+ // Retrieves the object associated with the event.
1137
+ fetchRelatedObject(): Promise<V2.Payments.OffSessionPayment>;
1138
+ }
1139
+
1140
+ /**
1141
+ * Sent immediately following a user's call to the Off-Session Payments cancel endpoint.
1142
+ */
1143
+ export interface V2PaymentsOffSessionPaymentCanceledEvent
1144
+ extends V2.EventBase {
1145
+ type: 'v2.payments.off_session_payment.canceled';
1146
+ // Object containing the reference to API resource relevant to the event.
1147
+ related_object: Event.RelatedObject;
1148
+ // Retrieves the object associated with the event.
1149
+ fetchRelatedObject(): Promise<V2.Payments.OffSessionPayment>;
1150
+ }
1151
+
1152
+ /**
1153
+ * Sent immediately following a user's call to the Off-Session Payments create endpoint.
1154
+ */
1155
+ export interface V2PaymentsOffSessionPaymentCreatedEvent
1156
+ extends V2.EventBase {
1157
+ type: 'v2.payments.off_session_payment.created';
1158
+ // Object containing the reference to API resource relevant to the event.
1159
+ related_object: Event.RelatedObject;
1160
+ // Retrieves the object associated with the event.
1161
+ fetchRelatedObject(): Promise<V2.Payments.OffSessionPayment>;
1162
+ }
1163
+
1164
+ /**
1165
+ * Sent after a failed authorization if there are no retries remaining, or if the failure is unretryable.
1166
+ */
1167
+ export interface V2PaymentsOffSessionPaymentFailedEvent
1168
+ extends V2.EventBase {
1169
+ type: 'v2.payments.off_session_payment.failed';
1170
+ // Object containing the reference to API resource relevant to the event.
1171
+ related_object: Event.RelatedObject;
1172
+ // Retrieves the object associated with the event.
1173
+ fetchRelatedObject(): Promise<V2.Payments.OffSessionPayment>;
1174
+ }
1175
+
1176
+ /**
1177
+ * Sent immediately after a successful authorization.
1178
+ */
1179
+ export interface V2PaymentsOffSessionPaymentSucceededEvent
1180
+ extends V2.EventBase {
1181
+ type: 'v2.payments.off_session_payment.succeeded';
1182
+ // Object containing the reference to API resource relevant to the event.
1183
+ related_object: Event.RelatedObject;
1184
+ // Retrieves the object associated with the event.
1185
+ fetchRelatedObject(): Promise<V2.Payments.OffSessionPayment>;
1186
+ }
1187
1187
  }
1188
1188
  }