@augustusbank/typescript-sdk 0.20.0 → 0.22.0
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 +28 -0
- package/client.d.mts +6 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -0
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/account-holders.d.mts +1555 -1184
- package/resources/account-holders.d.mts.map +1 -1
- package/resources/account-holders.d.ts +1555 -1184
- package/resources/account-holders.d.ts.map +1 -1
- package/resources/account-holders.js +59 -0
- package/resources/account-holders.js.map +1 -1
- package/resources/account-holders.mjs +59 -0
- package/resources/account-holders.mjs.map +1 -1
- package/resources/account-programs.d.mts +2 -2
- package/resources/account-programs.d.ts +2 -2
- package/resources/accounts.d.mts +206 -43
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +206 -43
- package/resources/accounts.d.ts.map +1 -1
- package/resources/accounts.js +53 -0
- package/resources/accounts.js.map +1 -1
- package/resources/accounts.mjs +53 -0
- package/resources/accounts.mjs.map +1 -1
- package/resources/api-keys.d.mts +1 -1
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +1 -1
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/api-versions.d.mts +3 -0
- package/resources/api-versions.d.mts.map +1 -1
- package/resources/api-versions.d.ts +3 -0
- package/resources/api-versions.d.ts.map +1 -1
- package/resources/conversions.d.mts +36 -81
- package/resources/conversions.d.mts.map +1 -1
- package/resources/conversions.d.ts +36 -81
- package/resources/conversions.d.ts.map +1 -1
- package/resources/conversions.js +25 -1
- package/resources/conversions.js.map +1 -1
- package/resources/conversions.mjs +25 -1
- package/resources/conversions.mjs.map +1 -1
- package/resources/counterparties.d.mts +1042 -0
- package/resources/counterparties.d.mts.map +1 -0
- package/resources/counterparties.d.ts +1042 -0
- package/resources/counterparties.d.ts.map +1 -0
- package/resources/counterparties.js +45 -0
- package/resources/counterparties.js.map +1 -0
- package/resources/counterparties.mjs +41 -0
- package/resources/counterparties.mjs.map +1 -0
- package/resources/deposits.d.mts +38 -186
- package/resources/deposits.d.mts.map +1 -1
- package/resources/deposits.d.ts +38 -186
- package/resources/deposits.d.ts.map +1 -1
- package/resources/index.d.mts +2 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/payouts.d.mts +458 -276
- package/resources/payouts.d.mts.map +1 -1
- package/resources/payouts.d.ts +458 -276
- package/resources/payouts.d.ts.map +1 -1
- package/resources/payouts.js +27 -0
- package/resources/payouts.js.map +1 -1
- package/resources/payouts.mjs +27 -0
- package/resources/payouts.mjs.map +1 -1
- package/resources/quotes/indicative.d.mts +7 -11
- package/resources/quotes/indicative.d.mts.map +1 -1
- package/resources/quotes/indicative.d.ts +7 -11
- package/resources/quotes/indicative.d.ts.map +1 -1
- package/resources/quotes/quotes.d.mts +4 -8
- package/resources/quotes/quotes.d.mts.map +1 -1
- package/resources/quotes/quotes.d.ts +4 -8
- package/resources/quotes/quotes.d.ts.map +1 -1
- package/resources/quotes/quotes.js.map +1 -1
- package/resources/quotes/quotes.mjs.map +1 -1
- package/resources/returns.d.mts +84 -39
- package/resources/returns.d.mts.map +1 -1
- package/resources/returns.d.ts +84 -39
- package/resources/returns.d.ts.map +1 -1
- package/resources/returns.js +22 -0
- package/resources/returns.js.map +1 -1
- package/resources/returns.mjs +22 -0
- package/resources/returns.mjs.map +1 -1
- package/resources/scopes.d.mts +4 -1
- package/resources/scopes.d.mts.map +1 -1
- package/resources/scopes.d.ts +4 -1
- package/resources/scopes.d.ts.map +1 -1
- package/resources/simulations/account-programs.d.mts +281 -0
- package/resources/simulations/account-programs.d.mts.map +1 -0
- package/resources/simulations/account-programs.d.ts +281 -0
- package/resources/simulations/account-programs.d.ts.map +1 -0
- package/resources/simulations/account-programs.js +98 -0
- package/resources/simulations/account-programs.js.map +1 -0
- package/resources/simulations/account-programs.mjs +94 -0
- package/resources/simulations/account-programs.mjs.map +1 -0
- package/resources/simulations/accounts.d.mts +270 -0
- package/resources/simulations/accounts.d.mts.map +1 -0
- package/resources/simulations/accounts.d.ts +270 -0
- package/resources/simulations/accounts.d.ts.map +1 -0
- package/resources/simulations/accounts.js +91 -0
- package/resources/simulations/accounts.js.map +1 -0
- package/resources/simulations/accounts.mjs +87 -0
- package/resources/simulations/accounts.mjs.map +1 -0
- package/resources/simulations/deposits.d.mts +218 -0
- package/resources/simulations/deposits.d.mts.map +1 -0
- package/resources/simulations/deposits.d.ts +218 -0
- package/resources/simulations/deposits.d.ts.map +1 -0
- package/resources/simulations/deposits.js +25 -0
- package/resources/simulations/deposits.js.map +1 -0
- package/resources/simulations/deposits.mjs +21 -0
- package/resources/simulations/deposits.mjs.map +1 -0
- package/resources/simulations/index.d.mts +6 -0
- package/resources/simulations/index.d.mts.map +1 -0
- package/resources/simulations/index.d.ts +6 -0
- package/resources/simulations/index.d.ts.map +1 -0
- package/resources/simulations/index.js +15 -0
- package/resources/simulations/index.js.map +1 -0
- package/resources/simulations/index.mjs +7 -0
- package/resources/simulations/index.mjs.map +1 -0
- package/resources/simulations/payouts.d.mts +76 -0
- package/resources/simulations/payouts.d.mts.map +1 -0
- package/resources/simulations/payouts.d.ts +76 -0
- package/resources/simulations/payouts.d.ts.map +1 -0
- package/resources/simulations/payouts.js +39 -0
- package/resources/simulations/payouts.js.map +1 -0
- package/resources/simulations/payouts.mjs +35 -0
- package/resources/simulations/payouts.mjs.map +1 -0
- package/resources/simulations/simulations.d.mts +22 -0
- package/resources/simulations/simulations.d.mts.map +1 -0
- package/resources/simulations/simulations.d.ts +22 -0
- package/resources/simulations/simulations.d.ts.map +1 -0
- package/resources/simulations/simulations.js +29 -0
- package/resources/simulations/simulations.js.map +1 -0
- package/resources/simulations/simulations.mjs +24 -0
- package/resources/simulations/simulations.mjs.map +1 -0
- package/resources/simulations.d.mts +2 -0
- package/resources/simulations.d.mts.map +1 -0
- package/resources/simulations.d.ts +2 -0
- package/resources/simulations.d.ts.map +1 -0
- package/resources/simulations.js +6 -0
- package/resources/simulations.js.map +1 -0
- package/resources/simulations.mjs +3 -0
- package/resources/simulations.mjs.map +1 -0
- package/resources/transactions.d.mts +300 -180
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +300 -180
- package/resources/transactions.d.ts.map +1 -1
- package/resources/webhook-subscriptions.d.mts +54 -4
- package/resources/webhook-subscriptions.d.mts.map +1 -1
- package/resources/webhook-subscriptions.d.ts +54 -4
- package/resources/webhook-subscriptions.d.ts.map +1 -1
- package/resources/webhook-subscriptions.js +49 -0
- package/resources/webhook-subscriptions.js.map +1 -1
- package/resources/webhook-subscriptions.mjs +49 -0
- package/resources/webhook-subscriptions.mjs.map +1 -1
- package/resources/webhooks.d.mts +736 -953
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +736 -953
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +32 -0
- package/src/resources/account-holders.ts +1701 -1282
- package/src/resources/account-programs.ts +2 -2
- package/src/resources/accounts.ts +236 -44
- package/src/resources/api-keys.ts +3 -0
- package/src/resources/api-versions.ts +3 -0
- package/src/resources/conversions.ts +36 -93
- package/src/resources/counterparties.ts +3127 -0
- package/src/resources/deposits.ts +54 -269
- package/src/resources/index.ts +13 -0
- package/src/resources/payouts.ts +2089 -367
- package/src/resources/quotes/indicative.ts +7 -12
- package/src/resources/quotes/quotes.ts +4 -9
- package/src/resources/returns.ts +144 -40
- package/src/resources/scopes.ts +7 -1
- package/src/resources/simulations/account-programs.ts +363 -0
- package/src/resources/simulations/accounts.ts +340 -0
- package/src/resources/simulations/deposits.ts +530 -0
- package/src/resources/simulations/index.ts +32 -0
- package/src/resources/simulations/payouts.ts +98 -0
- package/src/resources/simulations/simulations.ts +82 -0
- package/src/resources/simulations.ts +3 -0
- package/src/resources/transactions.ts +910 -232
- package/src/resources/webhook-subscriptions.ts +54 -4
- package/src/resources/webhooks.ts +948 -1126
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
6
|
+
|
|
7
|
+
export class Deposits extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Initiates an incoming deposit through the sandbox provider pipeline. This
|
|
10
|
+
* endpoint is unavailable in live production.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const deposit = await client.simulations.deposits.create({
|
|
15
|
+
* account_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
16
|
+
* amount: '869.225610155',
|
|
17
|
+
* currency: 'EUR',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
create(body: DepositCreateParams, options?: RequestOptions): APIPromise<DepositCreateResponse> {
|
|
22
|
+
return this._client.post('/v1/simulations/deposits', { body, ...options });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface DepositCreateResponse {
|
|
27
|
+
/**
|
|
28
|
+
* Account receiving the simulated deposit.
|
|
29
|
+
*/
|
|
30
|
+
account_id: string;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Simulated amount as a decimal string.
|
|
34
|
+
*/
|
|
35
|
+
amount: string;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Currency of the receiving account.
|
|
39
|
+
*/
|
|
40
|
+
currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Payment rail the simulated deposit arrived on, or null when not known.
|
|
44
|
+
*/
|
|
45
|
+
rail: 'sepa' | 'sepa_instant' | 'faster_payments' | 'ach' | 'fedwire' | 'swift' | null;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Whether the simulation submission was successful.
|
|
49
|
+
*/
|
|
50
|
+
success: boolean;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Resource type discriminator.
|
|
54
|
+
*/
|
|
55
|
+
type: 'deposit_simulation';
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* ISO 20022 unstructured remittance information (<RmtInf>/<Ustrd>), or null when
|
|
59
|
+
* omitted.
|
|
60
|
+
*/
|
|
61
|
+
unstructured_remittance_information: string | null;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface DepositCreateParams {
|
|
65
|
+
/**
|
|
66
|
+
* ID of the account to credit with the simulated deposit.
|
|
67
|
+
*/
|
|
68
|
+
account_id: string;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Amount as a decimal string in the account currency (e.g. "100.50").
|
|
72
|
+
*/
|
|
73
|
+
amount: string;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Currency of the simulated deposit.
|
|
77
|
+
*/
|
|
78
|
+
currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Sender of the simulated deposit.
|
|
82
|
+
*/
|
|
83
|
+
counterparty?: DepositCreateParams.Counterparty;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Payment rail the simulated deposit arrives on.
|
|
87
|
+
*/
|
|
88
|
+
rail?: 'sepa' | 'sepa_instant' | 'faster_payments' | 'ach' | 'fedwire' | 'swift';
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Unstructured remittance information attached to the transfer. Not all rails
|
|
92
|
+
* support this field.
|
|
93
|
+
*/
|
|
94
|
+
unstructured_remittance_information?: string;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export namespace DepositCreateParams {
|
|
98
|
+
/**
|
|
99
|
+
* Sender of the simulated deposit.
|
|
100
|
+
*/
|
|
101
|
+
export interface Counterparty {
|
|
102
|
+
/**
|
|
103
|
+
* Financial address of the counterparty.
|
|
104
|
+
*/
|
|
105
|
+
financial_address:
|
|
106
|
+
| Counterparty.IbanFinancialAddressRequest
|
|
107
|
+
| Counterparty.SortCodeFinancialAddress
|
|
108
|
+
| Counterparty.AbaFinancialAddress
|
|
109
|
+
| Counterparty.BicFinancialAddressRequest
|
|
110
|
+
| Counterparty.CryptoWalletFinancialAddress;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Physical address of the counterparty.
|
|
114
|
+
*/
|
|
115
|
+
physical_address?: Counterparty.PhysicalAddress | null;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export namespace Counterparty {
|
|
119
|
+
export interface IbanFinancialAddressRequest {
|
|
120
|
+
/**
|
|
121
|
+
* Name of the account holder.
|
|
122
|
+
*/
|
|
123
|
+
account_holder_name: string;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* International Bank Account Number.
|
|
127
|
+
*/
|
|
128
|
+
iban: string;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Discriminator for IBAN financial address.
|
|
132
|
+
*/
|
|
133
|
+
type: 'iban';
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Bank Identifier Code. Optional; omit or send null if not provided.
|
|
137
|
+
*/
|
|
138
|
+
bic?: string | null;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface SortCodeFinancialAddress {
|
|
142
|
+
/**
|
|
143
|
+
* Name of the account holder.
|
|
144
|
+
*/
|
|
145
|
+
account_holder_name: string;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* UK account number (8 digits).
|
|
149
|
+
*/
|
|
150
|
+
account_number: string;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* UK sort code (6 digits).
|
|
154
|
+
*/
|
|
155
|
+
sort_code: string;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Discriminator for UK sort code financial address.
|
|
159
|
+
*/
|
|
160
|
+
type: 'sort_code';
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export interface AbaFinancialAddress {
|
|
164
|
+
/**
|
|
165
|
+
* Name of the account holder.
|
|
166
|
+
*/
|
|
167
|
+
account_holder_name: string;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Bank account number.
|
|
171
|
+
*/
|
|
172
|
+
account_number: string;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* ABA routing number (9 digits).
|
|
176
|
+
*/
|
|
177
|
+
routing_number: string;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Discriminator for ABA wire financial address.
|
|
181
|
+
*/
|
|
182
|
+
type: 'aba';
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export interface BicFinancialAddressRequest {
|
|
186
|
+
/**
|
|
187
|
+
* Name of the account holder.
|
|
188
|
+
*/
|
|
189
|
+
account_holder_name: string;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Local-format bank account number (1-34 alphanumeric characters).
|
|
193
|
+
*/
|
|
194
|
+
account_number: string;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* ISO 9362 Bank Identifier Code (8 or 11 characters).
|
|
198
|
+
*/
|
|
199
|
+
bic: string;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Discriminator for BIC + local account financial address.
|
|
203
|
+
*/
|
|
204
|
+
type: 'bic';
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Domestic bank or branch code where the destination country uses one (for example
|
|
208
|
+
* the BSB in Australia). Optional; omit or send null where the country has none.
|
|
209
|
+
*/
|
|
210
|
+
local_bank_code?: string | null;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export interface CryptoWalletFinancialAddress {
|
|
214
|
+
/**
|
|
215
|
+
* Wallet address on the specified blockchain.
|
|
216
|
+
*/
|
|
217
|
+
address: string;
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Blockchain network for the crypto wallet.
|
|
221
|
+
*/
|
|
222
|
+
blockchain:
|
|
223
|
+
| 'bitcoin'
|
|
224
|
+
| 'ethereum'
|
|
225
|
+
| 'solana'
|
|
226
|
+
| 'polygon'
|
|
227
|
+
| 'bitcoin_testnet4'
|
|
228
|
+
| 'ethereum_sepolia'
|
|
229
|
+
| 'solana_devnet'
|
|
230
|
+
| 'polygon_amoy';
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Discriminator for crypto wallet financial address.
|
|
234
|
+
*/
|
|
235
|
+
type: 'crypto_wallet';
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Physical address of the counterparty.
|
|
240
|
+
*/
|
|
241
|
+
export interface PhysicalAddress {
|
|
242
|
+
/**
|
|
243
|
+
* City or locality.
|
|
244
|
+
*/
|
|
245
|
+
city: string;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* ISO 3166-1 alpha-2 country code.
|
|
249
|
+
*/
|
|
250
|
+
country_code:
|
|
251
|
+
| 'AF'
|
|
252
|
+
| 'AL'
|
|
253
|
+
| 'DZ'
|
|
254
|
+
| 'AS'
|
|
255
|
+
| 'AD'
|
|
256
|
+
| 'AO'
|
|
257
|
+
| 'AI'
|
|
258
|
+
| 'AQ'
|
|
259
|
+
| 'AG'
|
|
260
|
+
| 'AR'
|
|
261
|
+
| 'AM'
|
|
262
|
+
| 'AW'
|
|
263
|
+
| 'AU'
|
|
264
|
+
| 'AT'
|
|
265
|
+
| 'AZ'
|
|
266
|
+
| 'BS'
|
|
267
|
+
| 'BH'
|
|
268
|
+
| 'BD'
|
|
269
|
+
| 'BB'
|
|
270
|
+
| 'BY'
|
|
271
|
+
| 'BE'
|
|
272
|
+
| 'BZ'
|
|
273
|
+
| 'BJ'
|
|
274
|
+
| 'BM'
|
|
275
|
+
| 'BT'
|
|
276
|
+
| 'BO'
|
|
277
|
+
| 'BA'
|
|
278
|
+
| 'BW'
|
|
279
|
+
| 'BV'
|
|
280
|
+
| 'BR'
|
|
281
|
+
| 'IO'
|
|
282
|
+
| 'BN'
|
|
283
|
+
| 'BG'
|
|
284
|
+
| 'BF'
|
|
285
|
+
| 'BI'
|
|
286
|
+
| 'KH'
|
|
287
|
+
| 'CM'
|
|
288
|
+
| 'CA'
|
|
289
|
+
| 'CV'
|
|
290
|
+
| 'KY'
|
|
291
|
+
| 'CF'
|
|
292
|
+
| 'TD'
|
|
293
|
+
| 'CL'
|
|
294
|
+
| 'CN'
|
|
295
|
+
| 'CX'
|
|
296
|
+
| 'CC'
|
|
297
|
+
| 'CO'
|
|
298
|
+
| 'KM'
|
|
299
|
+
| 'CG'
|
|
300
|
+
| 'CD'
|
|
301
|
+
| 'CK'
|
|
302
|
+
| 'CR'
|
|
303
|
+
| 'CI'
|
|
304
|
+
| 'HR'
|
|
305
|
+
| 'CU'
|
|
306
|
+
| 'CY'
|
|
307
|
+
| 'CZ'
|
|
308
|
+
| 'DK'
|
|
309
|
+
| 'DJ'
|
|
310
|
+
| 'DM'
|
|
311
|
+
| 'DO'
|
|
312
|
+
| 'EC'
|
|
313
|
+
| 'EG'
|
|
314
|
+
| 'SV'
|
|
315
|
+
| 'GQ'
|
|
316
|
+
| 'ER'
|
|
317
|
+
| 'EE'
|
|
318
|
+
| 'ET'
|
|
319
|
+
| 'FK'
|
|
320
|
+
| 'FO'
|
|
321
|
+
| 'FJ'
|
|
322
|
+
| 'FI'
|
|
323
|
+
| 'FR'
|
|
324
|
+
| 'GF'
|
|
325
|
+
| 'PF'
|
|
326
|
+
| 'TF'
|
|
327
|
+
| 'GA'
|
|
328
|
+
| 'GM'
|
|
329
|
+
| 'GE'
|
|
330
|
+
| 'DE'
|
|
331
|
+
| 'GH'
|
|
332
|
+
| 'GI'
|
|
333
|
+
| 'GR'
|
|
334
|
+
| 'GL'
|
|
335
|
+
| 'GD'
|
|
336
|
+
| 'GP'
|
|
337
|
+
| 'GU'
|
|
338
|
+
| 'GT'
|
|
339
|
+
| 'GN'
|
|
340
|
+
| 'GW'
|
|
341
|
+
| 'GY'
|
|
342
|
+
| 'HT'
|
|
343
|
+
| 'HM'
|
|
344
|
+
| 'VA'
|
|
345
|
+
| 'HN'
|
|
346
|
+
| 'HK'
|
|
347
|
+
| 'HU'
|
|
348
|
+
| 'IS'
|
|
349
|
+
| 'IN'
|
|
350
|
+
| 'ID'
|
|
351
|
+
| 'IR'
|
|
352
|
+
| 'IQ'
|
|
353
|
+
| 'IE'
|
|
354
|
+
| 'IL'
|
|
355
|
+
| 'IT'
|
|
356
|
+
| 'JM'
|
|
357
|
+
| 'JP'
|
|
358
|
+
| 'JO'
|
|
359
|
+
| 'KZ'
|
|
360
|
+
| 'KE'
|
|
361
|
+
| 'KI'
|
|
362
|
+
| 'KP'
|
|
363
|
+
| 'KR'
|
|
364
|
+
| 'KW'
|
|
365
|
+
| 'KG'
|
|
366
|
+
| 'LA'
|
|
367
|
+
| 'LV'
|
|
368
|
+
| 'LB'
|
|
369
|
+
| 'LS'
|
|
370
|
+
| 'LR'
|
|
371
|
+
| 'LY'
|
|
372
|
+
| 'LI'
|
|
373
|
+
| 'LT'
|
|
374
|
+
| 'LU'
|
|
375
|
+
| 'MO'
|
|
376
|
+
| 'MG'
|
|
377
|
+
| 'MW'
|
|
378
|
+
| 'MY'
|
|
379
|
+
| 'MV'
|
|
380
|
+
| 'ML'
|
|
381
|
+
| 'MT'
|
|
382
|
+
| 'MH'
|
|
383
|
+
| 'MQ'
|
|
384
|
+
| 'MR'
|
|
385
|
+
| 'MU'
|
|
386
|
+
| 'YT'
|
|
387
|
+
| 'MX'
|
|
388
|
+
| 'FM'
|
|
389
|
+
| 'MD'
|
|
390
|
+
| 'MC'
|
|
391
|
+
| 'MN'
|
|
392
|
+
| 'MS'
|
|
393
|
+
| 'MA'
|
|
394
|
+
| 'MZ'
|
|
395
|
+
| 'MM'
|
|
396
|
+
| 'NA'
|
|
397
|
+
| 'NR'
|
|
398
|
+
| 'NP'
|
|
399
|
+
| 'NL'
|
|
400
|
+
| 'NC'
|
|
401
|
+
| 'NZ'
|
|
402
|
+
| 'NI'
|
|
403
|
+
| 'NE'
|
|
404
|
+
| 'NG'
|
|
405
|
+
| 'NU'
|
|
406
|
+
| 'NF'
|
|
407
|
+
| 'MP'
|
|
408
|
+
| 'MK'
|
|
409
|
+
| 'NO'
|
|
410
|
+
| 'OM'
|
|
411
|
+
| 'PK'
|
|
412
|
+
| 'PW'
|
|
413
|
+
| 'PS'
|
|
414
|
+
| 'PA'
|
|
415
|
+
| 'PG'
|
|
416
|
+
| 'PY'
|
|
417
|
+
| 'PE'
|
|
418
|
+
| 'PH'
|
|
419
|
+
| 'PN'
|
|
420
|
+
| 'PL'
|
|
421
|
+
| 'PT'
|
|
422
|
+
| 'PR'
|
|
423
|
+
| 'QA'
|
|
424
|
+
| 'RE'
|
|
425
|
+
| 'RO'
|
|
426
|
+
| 'RU'
|
|
427
|
+
| 'RW'
|
|
428
|
+
| 'SH'
|
|
429
|
+
| 'KN'
|
|
430
|
+
| 'LC'
|
|
431
|
+
| 'PM'
|
|
432
|
+
| 'VC'
|
|
433
|
+
| 'WS'
|
|
434
|
+
| 'SM'
|
|
435
|
+
| 'ST'
|
|
436
|
+
| 'SA'
|
|
437
|
+
| 'SN'
|
|
438
|
+
| 'SC'
|
|
439
|
+
| 'SL'
|
|
440
|
+
| 'SG'
|
|
441
|
+
| 'SK'
|
|
442
|
+
| 'SI'
|
|
443
|
+
| 'SB'
|
|
444
|
+
| 'SO'
|
|
445
|
+
| 'ZA'
|
|
446
|
+
| 'GS'
|
|
447
|
+
| 'ES'
|
|
448
|
+
| 'LK'
|
|
449
|
+
| 'SD'
|
|
450
|
+
| 'SR'
|
|
451
|
+
| 'SJ'
|
|
452
|
+
| 'SZ'
|
|
453
|
+
| 'SE'
|
|
454
|
+
| 'CH'
|
|
455
|
+
| 'SY'
|
|
456
|
+
| 'TW'
|
|
457
|
+
| 'TJ'
|
|
458
|
+
| 'TZ'
|
|
459
|
+
| 'TH'
|
|
460
|
+
| 'TL'
|
|
461
|
+
| 'TG'
|
|
462
|
+
| 'TK'
|
|
463
|
+
| 'TO'
|
|
464
|
+
| 'TT'
|
|
465
|
+
| 'TN'
|
|
466
|
+
| 'TR'
|
|
467
|
+
| 'TM'
|
|
468
|
+
| 'TC'
|
|
469
|
+
| 'TV'
|
|
470
|
+
| 'UG'
|
|
471
|
+
| 'UA'
|
|
472
|
+
| 'AE'
|
|
473
|
+
| 'GB'
|
|
474
|
+
| 'US'
|
|
475
|
+
| 'UM'
|
|
476
|
+
| 'UY'
|
|
477
|
+
| 'UZ'
|
|
478
|
+
| 'VU'
|
|
479
|
+
| 'VE'
|
|
480
|
+
| 'VN'
|
|
481
|
+
| 'VG'
|
|
482
|
+
| 'VI'
|
|
483
|
+
| 'WF'
|
|
484
|
+
| 'EH'
|
|
485
|
+
| 'YE'
|
|
486
|
+
| 'ZM'
|
|
487
|
+
| 'ZW'
|
|
488
|
+
| 'AX'
|
|
489
|
+
| 'BQ'
|
|
490
|
+
| 'CW'
|
|
491
|
+
| 'GG'
|
|
492
|
+
| 'IM'
|
|
493
|
+
| 'JE'
|
|
494
|
+
| 'ME'
|
|
495
|
+
| 'BL'
|
|
496
|
+
| 'MF'
|
|
497
|
+
| 'RS'
|
|
498
|
+
| 'SX'
|
|
499
|
+
| 'SS'
|
|
500
|
+
| 'XK';
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Primary street address.
|
|
504
|
+
*/
|
|
505
|
+
line_1: string;
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* Secondary street address, or null if not recorded.
|
|
509
|
+
*/
|
|
510
|
+
line_2: string | null;
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Postal or ZIP code.
|
|
514
|
+
*/
|
|
515
|
+
postal_code: string;
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* State, province, or region, or null if not recorded.
|
|
519
|
+
*/
|
|
520
|
+
state: string | null;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
export declare namespace Deposits {
|
|
526
|
+
export {
|
|
527
|
+
type DepositCreateResponse as DepositCreateResponse,
|
|
528
|
+
type DepositCreateParams as DepositCreateParams,
|
|
529
|
+
};
|
|
530
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
AccountPrograms,
|
|
5
|
+
type AccountProgramCreateResponse,
|
|
6
|
+
type AccountProgramCloseResponse,
|
|
7
|
+
type AccountProgramDrainResponse,
|
|
8
|
+
type AccountProgramFreezeResponse,
|
|
9
|
+
type AccountProgramUnfreezeResponse,
|
|
10
|
+
type AccountProgramCreateParams,
|
|
11
|
+
type AccountProgramCloseParams,
|
|
12
|
+
type AccountProgramDrainParams,
|
|
13
|
+
} from './account-programs';
|
|
14
|
+
export {
|
|
15
|
+
Accounts,
|
|
16
|
+
type AccountCreateResponse,
|
|
17
|
+
type AccountCloseResponse,
|
|
18
|
+
type AccountDrainResponse,
|
|
19
|
+
type AccountFreezeResponse,
|
|
20
|
+
type AccountUnfreezeResponse,
|
|
21
|
+
type AccountCreateParams,
|
|
22
|
+
type AccountCloseParams,
|
|
23
|
+
type AccountDrainParams,
|
|
24
|
+
} from './accounts';
|
|
25
|
+
export { Deposits, type DepositCreateResponse, type DepositCreateParams } from './deposits';
|
|
26
|
+
export {
|
|
27
|
+
Payouts,
|
|
28
|
+
type PayoutRejectResponse,
|
|
29
|
+
type PayoutSendResponse,
|
|
30
|
+
type PayoutRejectParams,
|
|
31
|
+
} from './payouts';
|
|
32
|
+
export { Simulations } from './simulations';
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
6
|
+
import { path } from '../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class Payouts extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Submits a network rejection for an existing payout through the sandbox provider
|
|
11
|
+
* pipeline. This endpoint is unavailable in live production.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const response = await client.simulations.payouts.reject(
|
|
16
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
17
|
+
* { reason: 'invalid_routing_number' },
|
|
18
|
+
* );
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
reject(id: string, body: PayoutRejectParams, options?: RequestOptions): APIPromise<PayoutRejectResponse> {
|
|
22
|
+
return this._client.post(path`/v1/simulations/payouts/${id}/reject`, { body, ...options });
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Submits a successful send event for an existing payout through the sandbox
|
|
27
|
+
* provider pipeline. This endpoint is unavailable in live production.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const response = await client.simulations.payouts.send(
|
|
32
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
33
|
+
* );
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
send(id: string, options?: RequestOptions): APIPromise<PayoutSendResponse> {
|
|
37
|
+
return this._client.post(path`/v1/simulations/payouts/${id}/send`, options);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface PayoutRejectResponse {
|
|
42
|
+
/**
|
|
43
|
+
* Payout lifecycle event submitted to the sandbox provider.
|
|
44
|
+
*/
|
|
45
|
+
event: 'send' | 'reject' | 'return';
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Payout whose lifecycle is being simulated.
|
|
49
|
+
*/
|
|
50
|
+
payout_id: string;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Whether the simulation submission was successful.
|
|
54
|
+
*/
|
|
55
|
+
success: boolean;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Resource type discriminator.
|
|
59
|
+
*/
|
|
60
|
+
type: 'payout_simulation';
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface PayoutSendResponse {
|
|
64
|
+
/**
|
|
65
|
+
* Payout lifecycle event submitted to the sandbox provider.
|
|
66
|
+
*/
|
|
67
|
+
event: 'send' | 'reject' | 'return';
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Payout whose lifecycle is being simulated.
|
|
71
|
+
*/
|
|
72
|
+
payout_id: string;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Whether the simulation submission was successful.
|
|
76
|
+
*/
|
|
77
|
+
success: boolean;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Resource type discriminator.
|
|
81
|
+
*/
|
|
82
|
+
type: 'payout_simulation';
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface PayoutRejectParams {
|
|
86
|
+
/**
|
|
87
|
+
* Reason the sandbox provider rejects the payout.
|
|
88
|
+
*/
|
|
89
|
+
reason: 'invalid_routing_number';
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export declare namespace Payouts {
|
|
93
|
+
export {
|
|
94
|
+
type PayoutRejectResponse as PayoutRejectResponse,
|
|
95
|
+
type PayoutSendResponse as PayoutSendResponse,
|
|
96
|
+
type PayoutRejectParams as PayoutRejectParams,
|
|
97
|
+
};
|
|
98
|
+
}
|