stripe 18.4.0-beta.1 → 18.4.0-beta.2

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.
@@ -3,6 +3,218 @@
3
3
  declare module 'stripe' {
4
4
  namespace Stripe {
5
5
  namespace V2 {
6
+ namespace MoneyManagement {
7
+ interface FinancialAccountCreateParams {
8
+ /**
9
+ * The type of FinancialAccount to create.
10
+ */
11
+ type: 'storage';
12
+
13
+ /**
14
+ * Metadata associated with the FinancialAccount.
15
+ */
16
+ metadata?: Stripe.MetadataParam;
17
+
18
+ /**
19
+ * Parameters specific to creating `storage` type FinancialAccounts.
20
+ */
21
+ storage?: FinancialAccountCreateParams.Storage;
22
+ }
23
+
24
+ namespace FinancialAccountCreateParams {
25
+ interface Storage {
26
+ /**
27
+ * The currencies that this FinancialAccount can hold.
28
+ */
29
+ holds_currencies: Array<Storage.HoldsCurrency>;
30
+ }
31
+
32
+ namespace Storage {
33
+ type HoldsCurrency =
34
+ | 'aed'
35
+ | 'afn'
36
+ | 'all'
37
+ | 'amd'
38
+ | 'ang'
39
+ | 'aoa'
40
+ | 'ars'
41
+ | 'aud'
42
+ | 'awg'
43
+ | 'azn'
44
+ | 'bam'
45
+ | 'bbd'
46
+ | 'bdt'
47
+ | 'bgn'
48
+ | 'bhd'
49
+ | 'bif'
50
+ | 'bmd'
51
+ | 'bnd'
52
+ | 'bob'
53
+ | 'bov'
54
+ | 'brl'
55
+ | 'bsd'
56
+ | 'btn'
57
+ | 'bwp'
58
+ | 'byn'
59
+ | 'byr'
60
+ | 'bzd'
61
+ | 'cad'
62
+ | 'cdf'
63
+ | 'che'
64
+ | 'chf'
65
+ | 'chw'
66
+ | 'clf'
67
+ | 'clp'
68
+ | 'cny'
69
+ | 'cop'
70
+ | 'cou'
71
+ | 'crc'
72
+ | 'cuc'
73
+ | 'cup'
74
+ | 'cve'
75
+ | 'czk'
76
+ | 'djf'
77
+ | 'dkk'
78
+ | 'dop'
79
+ | 'dzd'
80
+ | 'eek'
81
+ | 'egp'
82
+ | 'ern'
83
+ | 'etb'
84
+ | 'eur'
85
+ | 'fjd'
86
+ | 'fkp'
87
+ | 'gbp'
88
+ | 'gel'
89
+ | 'ghc'
90
+ | 'ghs'
91
+ | 'gip'
92
+ | 'gmd'
93
+ | 'gnf'
94
+ | 'gtq'
95
+ | 'gyd'
96
+ | 'hkd'
97
+ | 'hnl'
98
+ | 'hrk'
99
+ | 'htg'
100
+ | 'huf'
101
+ | 'idr'
102
+ | 'ils'
103
+ | 'inr'
104
+ | 'iqd'
105
+ | 'irr'
106
+ | 'isk'
107
+ | 'jmd'
108
+ | 'jod'
109
+ | 'jpy'
110
+ | 'kes'
111
+ | 'kgs'
112
+ | 'khr'
113
+ | 'kmf'
114
+ | 'kpw'
115
+ | 'krw'
116
+ | 'kwd'
117
+ | 'kyd'
118
+ | 'kzt'
119
+ | 'lak'
120
+ | 'lbp'
121
+ | 'lkr'
122
+ | 'lrd'
123
+ | 'lsl'
124
+ | 'ltl'
125
+ | 'lvl'
126
+ | 'lyd'
127
+ | 'mad'
128
+ | 'mdl'
129
+ | 'mga'
130
+ | 'mkd'
131
+ | 'mmk'
132
+ | 'mnt'
133
+ | 'mop'
134
+ | 'mro'
135
+ | 'mru'
136
+ | 'mur'
137
+ | 'mvr'
138
+ | 'mwk'
139
+ | 'mxn'
140
+ | 'mxv'
141
+ | 'myr'
142
+ | 'mzn'
143
+ | 'nad'
144
+ | 'ngn'
145
+ | 'nio'
146
+ | 'nok'
147
+ | 'npr'
148
+ | 'nzd'
149
+ | 'omr'
150
+ | 'pab'
151
+ | 'pen'
152
+ | 'pgk'
153
+ | 'php'
154
+ | 'pkr'
155
+ | 'pln'
156
+ | 'pyg'
157
+ | 'qar'
158
+ | 'ron'
159
+ | 'rsd'
160
+ | 'rub'
161
+ | 'rwf'
162
+ | 'sar'
163
+ | 'sbd'
164
+ | 'scr'
165
+ | 'sdg'
166
+ | 'sek'
167
+ | 'sgd'
168
+ | 'shp'
169
+ | 'sle'
170
+ | 'sll'
171
+ | 'sos'
172
+ | 'srd'
173
+ | 'ssp'
174
+ | 'std'
175
+ | 'stn'
176
+ | 'svc'
177
+ | 'syp'
178
+ | 'szl'
179
+ | 'thb'
180
+ | 'tjs'
181
+ | 'tmt'
182
+ | 'tnd'
183
+ | 'top'
184
+ | 'try'
185
+ | 'ttd'
186
+ | 'twd'
187
+ | 'tzs'
188
+ | 'uah'
189
+ | 'ugx'
190
+ | 'usd'
191
+ | 'usdb'
192
+ | 'usdc'
193
+ | 'usn'
194
+ | 'uyi'
195
+ | 'uyu'
196
+ | 'uzs'
197
+ | 'vef'
198
+ | 'ves'
199
+ | 'vnd'
200
+ | 'vuv'
201
+ | 'wst'
202
+ | 'xaf'
203
+ | 'xcd'
204
+ | 'xcg'
205
+ | 'xof'
206
+ | 'xpf'
207
+ | 'yer'
208
+ | 'zar'
209
+ | 'zmk'
210
+ | 'zmw'
211
+ | 'zwd'
212
+ | 'zwg'
213
+ | 'zwl';
214
+ }
215
+ }
216
+ }
217
+
6
218
  namespace MoneyManagement {
7
219
  interface FinancialAccountRetrieveParams {}
8
220
  }
@@ -13,11 +225,55 @@ declare module 'stripe' {
13
225
  * The page limit.
14
226
  */
15
227
  limit?: number;
228
+
229
+ /**
230
+ * The status of the FinancialAccount to filter by. By default, closed FinancialAccounts are not returned.
231
+ */
232
+ status?: FinancialAccountListParams.Status;
233
+ }
234
+
235
+ namespace FinancialAccountListParams {
236
+ type Status = 'closed' | 'open' | 'pending';
237
+ }
238
+ }
239
+
240
+ namespace MoneyManagement {
241
+ interface FinancialAccountCloseParams {
242
+ /**
243
+ * The addresses to forward any incoming transactions to.
244
+ */
245
+ forwarding_settings?: FinancialAccountCloseParams.ForwardingSettings;
246
+ }
247
+
248
+ namespace FinancialAccountCloseParams {
249
+ interface ForwardingSettings {
250
+ /**
251
+ * The address to send forwarded payments to.
252
+ */
253
+ payment_method?: string;
254
+
255
+ /**
256
+ * The address to send forwarded payouts to.
257
+ */
258
+ payout_method?: string;
259
+ }
16
260
  }
17
261
  }
18
262
 
19
263
  namespace MoneyManagement {
20
264
  class FinancialAccountsResource {
265
+ /**
266
+ * Creates a new FinancialAccount.
267
+ * @throws Stripe.AlreadyExistsError
268
+ * @throws Stripe.FeatureNotEnabledError
269
+ */
270
+ create(
271
+ params: FinancialAccountCreateParams,
272
+ options?: RequestOptions
273
+ ): Promise<
274
+ Stripe.Response<Stripe.V2.MoneyManagement.FinancialAccount>
275
+ >;
276
+
21
277
  /**
22
278
  * Retrieves the details of an existing FinancialAccount.
23
279
  */
@@ -45,6 +301,24 @@ declare module 'stripe' {
45
301
  list(
46
302
  options?: RequestOptions
47
303
  ): ApiListPromise<Stripe.V2.MoneyManagement.FinancialAccount>;
304
+
305
+ /**
306
+ * Closes a FinancialAccount with or without forwarding settings.
307
+ * @throws Stripe.NonZeroBalanceError
308
+ */
309
+ close(
310
+ id: string,
311
+ params?: FinancialAccountCloseParams,
312
+ options?: RequestOptions
313
+ ): Promise<
314
+ Stripe.Response<Stripe.V2.MoneyManagement.FinancialAccount>
315
+ >;
316
+ close(
317
+ id: string,
318
+ options?: RequestOptions
319
+ ): Promise<
320
+ Stripe.Response<Stripe.V2.MoneyManagement.FinancialAccount>
321
+ >;
48
322
  }
49
323
  }
50
324
  }