@augustusbank/typescript-sdk 0.22.0 → 0.22.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.
- package/CHANGELOG.md +31 -0
- package/client.d.mts +8 -8
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -8
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/account-programs.d.mts +21 -16
- package/resources/account-programs.d.mts.map +1 -1
- package/resources/account-programs.d.ts +21 -16
- package/resources/account-programs.d.ts.map +1 -1
- package/resources/account-programs.js +2 -2
- package/resources/account-programs.js.map +1 -1
- package/resources/account-programs.mjs +2 -2
- package/resources/account-programs.mjs.map +1 -1
- package/resources/accounts.d.mts +21 -6
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +21 -6
- package/resources/accounts.d.ts.map +1 -1
- package/resources/accounts.js +2 -2
- package/resources/accounts.js.map +1 -1
- package/resources/accounts.mjs +2 -2
- package/resources/accounts.mjs.map +1 -1
- package/resources/counterparties.d.mts +16 -16
- package/resources/counterparties.d.mts.map +1 -1
- package/resources/counterparties.d.ts +16 -16
- package/resources/counterparties.d.ts.map +1 -1
- package/resources/deposits.d.mts +10 -0
- package/resources/deposits.d.mts.map +1 -1
- package/resources/deposits.d.ts +10 -0
- package/resources/deposits.d.ts.map +1 -1
- package/resources/events.d.mts +3 -3
- package/resources/events.d.mts.map +1 -1
- package/resources/events.d.ts +3 -3
- package/resources/events.d.ts.map +1 -1
- package/resources/index.d.mts +4 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/payouts.d.mts +22 -406
- package/resources/payouts.d.mts.map +1 -1
- package/resources/payouts.d.ts +22 -406
- package/resources/payouts.d.ts.map +1 -1
- package/resources/payouts.js +2 -4
- package/resources/payouts.js.map +1 -1
- package/resources/payouts.mjs +2 -4
- package/resources/payouts.mjs.map +1 -1
- package/resources/quotes/index.d.mts +1 -1
- package/resources/quotes/index.d.mts.map +1 -1
- package/resources/quotes/index.d.ts +1 -1
- package/resources/quotes/index.d.ts.map +1 -1
- package/resources/quotes/index.js.map +1 -1
- package/resources/quotes/index.mjs.map +1 -1
- package/resources/quotes/quotes.d.mts +0 -57
- package/resources/quotes/quotes.d.mts.map +1 -1
- package/resources/quotes/quotes.d.ts +0 -57
- package/resources/quotes/quotes.d.ts.map +1 -1
- package/resources/quotes/quotes.js +0 -7
- package/resources/quotes/quotes.js.map +1 -1
- package/resources/quotes/quotes.mjs +0 -7
- package/resources/quotes/quotes.mjs.map +1 -1
- package/resources/simulations/account-programs.d.mts +11 -72
- package/resources/simulations/account-programs.d.mts.map +1 -1
- package/resources/simulations/account-programs.d.ts +11 -72
- package/resources/simulations/account-programs.d.ts.map +1 -1
- package/resources/simulations/account-programs.js +1 -2
- package/resources/simulations/account-programs.js.map +1 -1
- package/resources/simulations/account-programs.mjs +1 -2
- package/resources/simulations/account-programs.mjs.map +1 -1
- package/resources/simulations/accounts.d.mts +16 -72
- package/resources/simulations/accounts.d.mts.map +1 -1
- package/resources/simulations/accounts.d.ts +16 -72
- package/resources/simulations/accounts.d.ts.map +1 -1
- package/resources/simulations/accounts.js +3 -3
- package/resources/simulations/accounts.js.map +1 -1
- package/resources/simulations/accounts.mjs +3 -3
- package/resources/simulations/accounts.mjs.map +1 -1
- package/resources/simulations/conversions.d.mts +54 -0
- package/resources/simulations/conversions.d.mts.map +1 -0
- package/resources/simulations/conversions.d.ts +54 -0
- package/resources/simulations/conversions.d.ts.map +1 -0
- package/resources/simulations/conversions.js +39 -0
- package/resources/simulations/conversions.js.map +1 -0
- package/resources/simulations/conversions.mjs +35 -0
- package/resources/simulations/conversions.mjs.map +1 -0
- package/resources/simulations/deposits.d.mts +14 -30
- package/resources/simulations/deposits.d.mts.map +1 -1
- package/resources/simulations/deposits.d.ts +14 -30
- package/resources/simulations/deposits.d.ts.map +1 -1
- package/resources/simulations/index.d.mts +3 -1
- package/resources/simulations/index.d.mts.map +1 -1
- package/resources/simulations/index.d.ts +3 -1
- package/resources/simulations/index.d.ts.map +1 -1
- package/resources/simulations/index.js +5 -1
- package/resources/simulations/index.js.map +1 -1
- package/resources/simulations/index.mjs +2 -0
- package/resources/simulations/index.mjs.map +1 -1
- package/resources/simulations/payouts.d.mts +33 -17
- package/resources/simulations/payouts.d.mts.map +1 -1
- package/resources/simulations/payouts.d.ts +33 -17
- package/resources/simulations/payouts.d.ts.map +1 -1
- package/resources/simulations/payouts.js +16 -0
- package/resources/simulations/payouts.js.map +1 -1
- package/resources/simulations/payouts.mjs +16 -0
- package/resources/simulations/payouts.mjs.map +1 -1
- package/resources/simulations/returns.d.mts +92 -0
- package/resources/simulations/returns.d.mts.map +1 -0
- package/resources/simulations/returns.d.ts +92 -0
- package/resources/simulations/returns.d.ts.map +1 -0
- package/resources/simulations/returns.js +55 -0
- package/resources/simulations/returns.js.map +1 -0
- package/resources/simulations/returns.mjs +51 -0
- package/resources/simulations/returns.mjs.map +1 -0
- package/resources/simulations/simulations.d.mts +10 -2
- package/resources/simulations/simulations.d.mts.map +1 -1
- package/resources/simulations/simulations.d.ts +10 -2
- package/resources/simulations/simulations.d.ts.map +1 -1
- package/resources/simulations/simulations.js +8 -0
- package/resources/simulations/simulations.js.map +1 -1
- package/resources/simulations/simulations.mjs +9 -1
- package/resources/simulations/simulations.mjs.map +1 -1
- package/resources/transactions.d.mts +60 -0
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +60 -0
- package/resources/transactions.d.ts.map +1 -1
- package/resources/webhook-subscriptions.d.mts +9 -9
- package/resources/webhook-subscriptions.d.mts.map +1 -1
- package/resources/webhook-subscriptions.d.ts +9 -9
- package/resources/webhook-subscriptions.d.ts.map +1 -1
- package/resources/webhook-subscriptions.js +1 -1
- package/resources/webhook-subscriptions.mjs +1 -1
- package/resources/webhooks.d.mts +245 -30
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +245 -30
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +18 -10
- package/src/resources/account-programs.ts +29 -18
- package/src/resources/accounts.ts +29 -6
- package/src/resources/counterparties.ts +16 -16
- package/src/resources/deposits.ts +12 -0
- package/src/resources/events.ts +18 -12
- package/src/resources/index.ts +9 -5
- package/src/resources/payouts.ts +36 -1993
- package/src/resources/quotes/index.ts +1 -1
- package/src/resources/quotes/quotes.ts +0 -84
- package/src/resources/simulations/account-programs.ts +12 -87
- package/src/resources/simulations/accounts.ts +18 -87
- package/src/resources/simulations/conversions.ts +70 -0
- package/src/resources/simulations/deposits.ts +27 -35
- package/src/resources/simulations/index.ts +11 -0
- package/src/resources/simulations/payouts.ts +43 -18
- package/src/resources/simulations/returns.ts +123 -0
- package/src/resources/simulations/simulations.ts +40 -1
- package/src/resources/transactions.ts +70 -0
- package/src/resources/webhook-subscriptions.ts +49 -33
- package/src/resources/webhooks.ts +360 -36
- 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
|
@@ -3,13 +3,14 @@ import { APIPromise } from "../../core/api-promise.mjs";
|
|
|
3
3
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
4
4
|
export declare class Accounts extends APIResource {
|
|
5
5
|
/**
|
|
6
|
-
* Creates a Mock-US USD
|
|
7
|
-
*
|
|
6
|
+
* Creates a Mock-US USD account owned by the caller merchant. This endpoint is
|
|
7
|
+
* unavailable in live production.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* ```ts
|
|
11
11
|
* const account = await client.simulations.accounts.create({
|
|
12
12
|
* label: 'x',
|
|
13
|
+
* type: 'operating',
|
|
13
14
|
* });
|
|
14
15
|
* ```
|
|
15
16
|
*/
|
|
@@ -40,7 +41,6 @@ export declare class Accounts extends APIResource {
|
|
|
40
41
|
* {
|
|
41
42
|
* destination: {
|
|
42
43
|
* account_holder_name: 'Acme Sandbox Ltd.',
|
|
43
|
-
* bic: 'COBADEFFXXX',
|
|
44
44
|
* iban: 'DE89370400440532013000',
|
|
45
45
|
* type: 'iban',
|
|
46
46
|
* },
|
|
@@ -79,19 +79,6 @@ export interface AccountCreateResponse {
|
|
|
79
79
|
* Account whose lifecycle is being simulated.
|
|
80
80
|
*/
|
|
81
81
|
account_id: string;
|
|
82
|
-
/**
|
|
83
|
-
* Account lifecycle event submitted to the sandbox.
|
|
84
|
-
*/
|
|
85
|
-
event: 'create' | 'freeze' | 'unfreeze' | 'close' | 'drain';
|
|
86
|
-
/**
|
|
87
|
-
* Payout created by a drain event. Feed to
|
|
88
|
-
* `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.
|
|
89
|
-
*/
|
|
90
|
-
payout_id: string | null;
|
|
91
|
-
/**
|
|
92
|
-
* Whether the simulation submission was successful.
|
|
93
|
-
*/
|
|
94
|
-
success: boolean;
|
|
95
82
|
/**
|
|
96
83
|
* Resource type discriminator.
|
|
97
84
|
*/
|
|
@@ -102,19 +89,6 @@ export interface AccountCloseResponse {
|
|
|
102
89
|
* Account whose lifecycle is being simulated.
|
|
103
90
|
*/
|
|
104
91
|
account_id: string;
|
|
105
|
-
/**
|
|
106
|
-
* Account lifecycle event submitted to the sandbox.
|
|
107
|
-
*/
|
|
108
|
-
event: 'create' | 'freeze' | 'unfreeze' | 'close' | 'drain';
|
|
109
|
-
/**
|
|
110
|
-
* Payout created by a drain event. Feed to
|
|
111
|
-
* `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.
|
|
112
|
-
*/
|
|
113
|
-
payout_id: string | null;
|
|
114
|
-
/**
|
|
115
|
-
* Whether the simulation submission was successful.
|
|
116
|
-
*/
|
|
117
|
-
success: boolean;
|
|
118
92
|
/**
|
|
119
93
|
* Resource type discriminator.
|
|
120
94
|
*/
|
|
@@ -126,18 +100,10 @@ export interface AccountDrainResponse {
|
|
|
126
100
|
*/
|
|
127
101
|
account_id: string;
|
|
128
102
|
/**
|
|
129
|
-
*
|
|
130
|
-
|
|
131
|
-
event: 'create' | 'freeze' | 'unfreeze' | 'close' | 'drain';
|
|
132
|
-
/**
|
|
133
|
-
* Payout created by a drain event. Feed to
|
|
134
|
-
* `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.
|
|
135
|
-
*/
|
|
136
|
-
payout_id: string | null;
|
|
137
|
-
/**
|
|
138
|
-
* Whether the simulation submission was successful.
|
|
103
|
+
* Payout created by the drain. Feed to `POST /v1/simulations/payouts/{id}/send` to
|
|
104
|
+
* settle.
|
|
139
105
|
*/
|
|
140
|
-
|
|
106
|
+
payout_id: string;
|
|
141
107
|
/**
|
|
142
108
|
* Resource type discriminator.
|
|
143
109
|
*/
|
|
@@ -148,19 +114,6 @@ export interface AccountFreezeResponse {
|
|
|
148
114
|
* Account whose lifecycle is being simulated.
|
|
149
115
|
*/
|
|
150
116
|
account_id: string;
|
|
151
|
-
/**
|
|
152
|
-
* Account lifecycle event submitted to the sandbox.
|
|
153
|
-
*/
|
|
154
|
-
event: 'create' | 'freeze' | 'unfreeze' | 'close' | 'drain';
|
|
155
|
-
/**
|
|
156
|
-
* Payout created by a drain event. Feed to
|
|
157
|
-
* `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.
|
|
158
|
-
*/
|
|
159
|
-
payout_id: string | null;
|
|
160
|
-
/**
|
|
161
|
-
* Whether the simulation submission was successful.
|
|
162
|
-
*/
|
|
163
|
-
success: boolean;
|
|
164
117
|
/**
|
|
165
118
|
* Resource type discriminator.
|
|
166
119
|
*/
|
|
@@ -171,19 +124,6 @@ export interface AccountUnfreezeResponse {
|
|
|
171
124
|
* Account whose lifecycle is being simulated.
|
|
172
125
|
*/
|
|
173
126
|
account_id: string;
|
|
174
|
-
/**
|
|
175
|
-
* Account lifecycle event submitted to the sandbox.
|
|
176
|
-
*/
|
|
177
|
-
event: 'create' | 'freeze' | 'unfreeze' | 'close' | 'drain';
|
|
178
|
-
/**
|
|
179
|
-
* Payout created by a drain event. Feed to
|
|
180
|
-
* `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.
|
|
181
|
-
*/
|
|
182
|
-
payout_id: string | null;
|
|
183
|
-
/**
|
|
184
|
-
* Whether the simulation submission was successful.
|
|
185
|
-
*/
|
|
186
|
-
success: boolean;
|
|
187
127
|
/**
|
|
188
128
|
* Resource type discriminator.
|
|
189
129
|
*/
|
|
@@ -194,6 +134,10 @@ export interface AccountCreateParams {
|
|
|
194
134
|
* Human-readable label for the operating account.
|
|
195
135
|
*/
|
|
196
136
|
label: string;
|
|
137
|
+
/**
|
|
138
|
+
* Account type.
|
|
139
|
+
*/
|
|
140
|
+
type: 'operating';
|
|
197
141
|
}
|
|
198
142
|
export interface AccountCloseParams {
|
|
199
143
|
/**
|
|
@@ -206,18 +150,14 @@ export interface AccountDrainParams {
|
|
|
206
150
|
* Fiat financial address to which the residual balance of the frozen account is
|
|
207
151
|
* drained.
|
|
208
152
|
*/
|
|
209
|
-
destination: AccountDrainParams.
|
|
153
|
+
destination: AccountDrainParams.IbanFinancialAddressRequest | AccountDrainParams.SortCodeFinancialAddress | AccountDrainParams.AbaFinancialAddress;
|
|
210
154
|
}
|
|
211
155
|
export declare namespace AccountDrainParams {
|
|
212
|
-
interface
|
|
156
|
+
interface IbanFinancialAddressRequest {
|
|
213
157
|
/**
|
|
214
158
|
* Name of the account holder.
|
|
215
159
|
*/
|
|
216
160
|
account_holder_name: string;
|
|
217
|
-
/**
|
|
218
|
-
* Bank Identifier Code, or null if not provided.
|
|
219
|
-
*/
|
|
220
|
-
bic: string | null;
|
|
221
161
|
/**
|
|
222
162
|
* International Bank Account Number.
|
|
223
163
|
*/
|
|
@@ -226,6 +166,10 @@ export declare namespace AccountDrainParams {
|
|
|
226
166
|
* Discriminator for IBAN financial address.
|
|
227
167
|
*/
|
|
228
168
|
type: 'iban';
|
|
169
|
+
/**
|
|
170
|
+
* Bank Identifier Code. Optional; omit or send null if not provided.
|
|
171
|
+
*/
|
|
172
|
+
bic?: string | null;
|
|
229
173
|
}
|
|
230
174
|
interface SortCodeFinancialAddress {
|
|
231
175
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.d.mts","sourceRoot":"","sources":["../../src/resources/simulations/accounts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE,qBAAa,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"accounts.d.mts","sourceRoot":"","sources":["../../src/resources/simulations/accounts.ts"],"names":[],"mappings":"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"}
|
|
@@ -3,13 +3,14 @@ import { APIPromise } from "../../core/api-promise.js";
|
|
|
3
3
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
4
4
|
export declare class Accounts extends APIResource {
|
|
5
5
|
/**
|
|
6
|
-
* Creates a Mock-US USD
|
|
7
|
-
*
|
|
6
|
+
* Creates a Mock-US USD account owned by the caller merchant. This endpoint is
|
|
7
|
+
* unavailable in live production.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* ```ts
|
|
11
11
|
* const account = await client.simulations.accounts.create({
|
|
12
12
|
* label: 'x',
|
|
13
|
+
* type: 'operating',
|
|
13
14
|
* });
|
|
14
15
|
* ```
|
|
15
16
|
*/
|
|
@@ -40,7 +41,6 @@ export declare class Accounts extends APIResource {
|
|
|
40
41
|
* {
|
|
41
42
|
* destination: {
|
|
42
43
|
* account_holder_name: 'Acme Sandbox Ltd.',
|
|
43
|
-
* bic: 'COBADEFFXXX',
|
|
44
44
|
* iban: 'DE89370400440532013000',
|
|
45
45
|
* type: 'iban',
|
|
46
46
|
* },
|
|
@@ -79,19 +79,6 @@ export interface AccountCreateResponse {
|
|
|
79
79
|
* Account whose lifecycle is being simulated.
|
|
80
80
|
*/
|
|
81
81
|
account_id: string;
|
|
82
|
-
/**
|
|
83
|
-
* Account lifecycle event submitted to the sandbox.
|
|
84
|
-
*/
|
|
85
|
-
event: 'create' | 'freeze' | 'unfreeze' | 'close' | 'drain';
|
|
86
|
-
/**
|
|
87
|
-
* Payout created by a drain event. Feed to
|
|
88
|
-
* `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.
|
|
89
|
-
*/
|
|
90
|
-
payout_id: string | null;
|
|
91
|
-
/**
|
|
92
|
-
* Whether the simulation submission was successful.
|
|
93
|
-
*/
|
|
94
|
-
success: boolean;
|
|
95
82
|
/**
|
|
96
83
|
* Resource type discriminator.
|
|
97
84
|
*/
|
|
@@ -102,19 +89,6 @@ export interface AccountCloseResponse {
|
|
|
102
89
|
* Account whose lifecycle is being simulated.
|
|
103
90
|
*/
|
|
104
91
|
account_id: string;
|
|
105
|
-
/**
|
|
106
|
-
* Account lifecycle event submitted to the sandbox.
|
|
107
|
-
*/
|
|
108
|
-
event: 'create' | 'freeze' | 'unfreeze' | 'close' | 'drain';
|
|
109
|
-
/**
|
|
110
|
-
* Payout created by a drain event. Feed to
|
|
111
|
-
* `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.
|
|
112
|
-
*/
|
|
113
|
-
payout_id: string | null;
|
|
114
|
-
/**
|
|
115
|
-
* Whether the simulation submission was successful.
|
|
116
|
-
*/
|
|
117
|
-
success: boolean;
|
|
118
92
|
/**
|
|
119
93
|
* Resource type discriminator.
|
|
120
94
|
*/
|
|
@@ -126,18 +100,10 @@ export interface AccountDrainResponse {
|
|
|
126
100
|
*/
|
|
127
101
|
account_id: string;
|
|
128
102
|
/**
|
|
129
|
-
*
|
|
130
|
-
|
|
131
|
-
event: 'create' | 'freeze' | 'unfreeze' | 'close' | 'drain';
|
|
132
|
-
/**
|
|
133
|
-
* Payout created by a drain event. Feed to
|
|
134
|
-
* `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.
|
|
135
|
-
*/
|
|
136
|
-
payout_id: string | null;
|
|
137
|
-
/**
|
|
138
|
-
* Whether the simulation submission was successful.
|
|
103
|
+
* Payout created by the drain. Feed to `POST /v1/simulations/payouts/{id}/send` to
|
|
104
|
+
* settle.
|
|
139
105
|
*/
|
|
140
|
-
|
|
106
|
+
payout_id: string;
|
|
141
107
|
/**
|
|
142
108
|
* Resource type discriminator.
|
|
143
109
|
*/
|
|
@@ -148,19 +114,6 @@ export interface AccountFreezeResponse {
|
|
|
148
114
|
* Account whose lifecycle is being simulated.
|
|
149
115
|
*/
|
|
150
116
|
account_id: string;
|
|
151
|
-
/**
|
|
152
|
-
* Account lifecycle event submitted to the sandbox.
|
|
153
|
-
*/
|
|
154
|
-
event: 'create' | 'freeze' | 'unfreeze' | 'close' | 'drain';
|
|
155
|
-
/**
|
|
156
|
-
* Payout created by a drain event. Feed to
|
|
157
|
-
* `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.
|
|
158
|
-
*/
|
|
159
|
-
payout_id: string | null;
|
|
160
|
-
/**
|
|
161
|
-
* Whether the simulation submission was successful.
|
|
162
|
-
*/
|
|
163
|
-
success: boolean;
|
|
164
117
|
/**
|
|
165
118
|
* Resource type discriminator.
|
|
166
119
|
*/
|
|
@@ -171,19 +124,6 @@ export interface AccountUnfreezeResponse {
|
|
|
171
124
|
* Account whose lifecycle is being simulated.
|
|
172
125
|
*/
|
|
173
126
|
account_id: string;
|
|
174
|
-
/**
|
|
175
|
-
* Account lifecycle event submitted to the sandbox.
|
|
176
|
-
*/
|
|
177
|
-
event: 'create' | 'freeze' | 'unfreeze' | 'close' | 'drain';
|
|
178
|
-
/**
|
|
179
|
-
* Payout created by a drain event. Feed to
|
|
180
|
-
* `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.
|
|
181
|
-
*/
|
|
182
|
-
payout_id: string | null;
|
|
183
|
-
/**
|
|
184
|
-
* Whether the simulation submission was successful.
|
|
185
|
-
*/
|
|
186
|
-
success: boolean;
|
|
187
127
|
/**
|
|
188
128
|
* Resource type discriminator.
|
|
189
129
|
*/
|
|
@@ -194,6 +134,10 @@ export interface AccountCreateParams {
|
|
|
194
134
|
* Human-readable label for the operating account.
|
|
195
135
|
*/
|
|
196
136
|
label: string;
|
|
137
|
+
/**
|
|
138
|
+
* Account type.
|
|
139
|
+
*/
|
|
140
|
+
type: 'operating';
|
|
197
141
|
}
|
|
198
142
|
export interface AccountCloseParams {
|
|
199
143
|
/**
|
|
@@ -206,18 +150,14 @@ export interface AccountDrainParams {
|
|
|
206
150
|
* Fiat financial address to which the residual balance of the frozen account is
|
|
207
151
|
* drained.
|
|
208
152
|
*/
|
|
209
|
-
destination: AccountDrainParams.
|
|
153
|
+
destination: AccountDrainParams.IbanFinancialAddressRequest | AccountDrainParams.SortCodeFinancialAddress | AccountDrainParams.AbaFinancialAddress;
|
|
210
154
|
}
|
|
211
155
|
export declare namespace AccountDrainParams {
|
|
212
|
-
interface
|
|
156
|
+
interface IbanFinancialAddressRequest {
|
|
213
157
|
/**
|
|
214
158
|
* Name of the account holder.
|
|
215
159
|
*/
|
|
216
160
|
account_holder_name: string;
|
|
217
|
-
/**
|
|
218
|
-
* Bank Identifier Code, or null if not provided.
|
|
219
|
-
*/
|
|
220
|
-
bic: string | null;
|
|
221
161
|
/**
|
|
222
162
|
* International Bank Account Number.
|
|
223
163
|
*/
|
|
@@ -226,6 +166,10 @@ export declare namespace AccountDrainParams {
|
|
|
226
166
|
* Discriminator for IBAN financial address.
|
|
227
167
|
*/
|
|
228
168
|
type: 'iban';
|
|
169
|
+
/**
|
|
170
|
+
* Bank Identifier Code. Optional; omit or send null if not provided.
|
|
171
|
+
*/
|
|
172
|
+
bic?: string | null;
|
|
229
173
|
}
|
|
230
174
|
interface SortCodeFinancialAddress {
|
|
231
175
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../src/resources/simulations/accounts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../src/resources/simulations/accounts.ts"],"names":[],"mappings":"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"}
|
|
@@ -6,13 +6,14 @@ const resource_1 = require("../../core/resource.js");
|
|
|
6
6
|
const path_1 = require("../../internal/utils/path.js");
|
|
7
7
|
class Accounts extends resource_1.APIResource {
|
|
8
8
|
/**
|
|
9
|
-
* Creates a Mock-US USD
|
|
10
|
-
*
|
|
9
|
+
* Creates a Mock-US USD account owned by the caller merchant. This endpoint is
|
|
10
|
+
* unavailable in live production.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
13
|
* ```ts
|
|
14
14
|
* const account = await client.simulations.accounts.create({
|
|
15
15
|
* label: 'x',
|
|
16
|
+
* type: 'operating',
|
|
16
17
|
* });
|
|
17
18
|
* ```
|
|
18
19
|
*/
|
|
@@ -47,7 +48,6 @@ class Accounts extends resource_1.APIResource {
|
|
|
47
48
|
* {
|
|
48
49
|
* destination: {
|
|
49
50
|
* account_holder_name: 'Acme Sandbox Ltd.',
|
|
50
|
-
* bic: 'COBADEFFXXX',
|
|
51
51
|
* iban: 'DE89370400440532013000',
|
|
52
52
|
* type: 'iban',
|
|
53
53
|
* },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../src/resources/simulations/accounts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD,MAAa,QAAS,SAAQ,sBAAW;IACvC
|
|
1
|
+
{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../src/resources/simulations/accounts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,EAAU,EAAE,IAAwB,EAAE,OAAwB;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,4BAA4B,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,KAAK,CAAC,EAAU,EAAE,IAAwB,EAAE,OAAwB;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,4BAA4B,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,4BAA4B,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACjF,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,4BAA4B,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IACnF,CAAC;CACF;AAtFD,4BAsFC"}
|
|
@@ -3,13 +3,14 @@ import { APIResource } from "../../core/resource.mjs";
|
|
|
3
3
|
import { path } from "../../internal/utils/path.mjs";
|
|
4
4
|
export class Accounts extends APIResource {
|
|
5
5
|
/**
|
|
6
|
-
* Creates a Mock-US USD
|
|
7
|
-
*
|
|
6
|
+
* Creates a Mock-US USD account owned by the caller merchant. This endpoint is
|
|
7
|
+
* unavailable in live production.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* ```ts
|
|
11
11
|
* const account = await client.simulations.accounts.create({
|
|
12
12
|
* label: 'x',
|
|
13
|
+
* type: 'operating',
|
|
13
14
|
* });
|
|
14
15
|
* ```
|
|
15
16
|
*/
|
|
@@ -44,7 +45,6 @@ export class Accounts extends APIResource {
|
|
|
44
45
|
* {
|
|
45
46
|
* destination: {
|
|
46
47
|
* account_holder_name: 'Acme Sandbox Ltd.',
|
|
47
|
-
* bic: 'COBADEFFXXX',
|
|
48
48
|
* iban: 'DE89370400440532013000',
|
|
49
49
|
* type: 'iban',
|
|
50
50
|
* },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.mjs","sourceRoot":"","sources":["../../src/resources/simulations/accounts.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAGlD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"accounts.mjs","sourceRoot":"","sources":["../../src/resources/simulations/accounts.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAGlD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,EAAU,EAAE,IAAwB,EAAE,OAAwB;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,4BAA4B,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,KAAK,CAAC,EAAU,EAAE,IAAwB,EAAE,OAAwB;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,4BAA4B,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,4BAA4B,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACjF,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,4BAA4B,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IACnF,CAAC;CACF"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
4
|
+
export declare class Conversions extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Releases a controlled (sandbox) conversion paused at its first step so it runs
|
|
7
|
+
* to completion normally. This endpoint is unavailable in live production.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const response =
|
|
12
|
+
* await client.simulations.conversions.complete(
|
|
13
|
+
* '550e8400-e29b-41d4-a716-446655440006',
|
|
14
|
+
* );
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
complete(id: string, options?: RequestOptions): APIPromise<ConversionCompleteResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Fails a controlled (sandbox) conversion paused at its first step, before any
|
|
20
|
+
* funds move. This endpoint is unavailable in live production.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const response = await client.simulations.conversions.fail(
|
|
25
|
+
* '550e8400-e29b-41d4-a716-446655440006',
|
|
26
|
+
* );
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
fail(id: string, options?: RequestOptions): APIPromise<ConversionFailResponse>;
|
|
30
|
+
}
|
|
31
|
+
export interface ConversionCompleteResponse {
|
|
32
|
+
/**
|
|
33
|
+
* Conversion whose execution is being simulated.
|
|
34
|
+
*/
|
|
35
|
+
conversion_id: string;
|
|
36
|
+
/**
|
|
37
|
+
* Resource type discriminator.
|
|
38
|
+
*/
|
|
39
|
+
type: 'conversion_simulation';
|
|
40
|
+
}
|
|
41
|
+
export interface ConversionFailResponse {
|
|
42
|
+
/**
|
|
43
|
+
* Conversion whose execution is being simulated.
|
|
44
|
+
*/
|
|
45
|
+
conversion_id: string;
|
|
46
|
+
/**
|
|
47
|
+
* Resource type discriminator.
|
|
48
|
+
*/
|
|
49
|
+
type: 'conversion_simulation';
|
|
50
|
+
}
|
|
51
|
+
export declare namespace Conversions {
|
|
52
|
+
export { type ConversionCompleteResponse as ConversionCompleteResponse, type ConversionFailResponse as ConversionFailResponse, };
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=conversions.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversions.d.mts","sourceRoot":"","sources":["../../src/resources/simulations/conversions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;IAItF;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;CAG/E;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,IAAI,EAAE,uBAAuB,CAAC;CAC/B;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,IAAI,EAAE,uBAAuB,CAAC;CAC/B;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
4
|
+
export declare class Conversions extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Releases a controlled (sandbox) conversion paused at its first step so it runs
|
|
7
|
+
* to completion normally. This endpoint is unavailable in live production.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const response =
|
|
12
|
+
* await client.simulations.conversions.complete(
|
|
13
|
+
* '550e8400-e29b-41d4-a716-446655440006',
|
|
14
|
+
* );
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
complete(id: string, options?: RequestOptions): APIPromise<ConversionCompleteResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Fails a controlled (sandbox) conversion paused at its first step, before any
|
|
20
|
+
* funds move. This endpoint is unavailable in live production.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const response = await client.simulations.conversions.fail(
|
|
25
|
+
* '550e8400-e29b-41d4-a716-446655440006',
|
|
26
|
+
* );
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
fail(id: string, options?: RequestOptions): APIPromise<ConversionFailResponse>;
|
|
30
|
+
}
|
|
31
|
+
export interface ConversionCompleteResponse {
|
|
32
|
+
/**
|
|
33
|
+
* Conversion whose execution is being simulated.
|
|
34
|
+
*/
|
|
35
|
+
conversion_id: string;
|
|
36
|
+
/**
|
|
37
|
+
* Resource type discriminator.
|
|
38
|
+
*/
|
|
39
|
+
type: 'conversion_simulation';
|
|
40
|
+
}
|
|
41
|
+
export interface ConversionFailResponse {
|
|
42
|
+
/**
|
|
43
|
+
* Conversion whose execution is being simulated.
|
|
44
|
+
*/
|
|
45
|
+
conversion_id: string;
|
|
46
|
+
/**
|
|
47
|
+
* Resource type discriminator.
|
|
48
|
+
*/
|
|
49
|
+
type: 'conversion_simulation';
|
|
50
|
+
}
|
|
51
|
+
export declare namespace Conversions {
|
|
52
|
+
export { type ConversionCompleteResponse as ConversionCompleteResponse, type ConversionFailResponse as ConversionFailResponse, };
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=conversions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversions.d.ts","sourceRoot":"","sources":["../../src/resources/simulations/conversions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;IAItF;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;CAG/E;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,IAAI,EAAE,uBAAuB,CAAC;CAC/B;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,IAAI,EAAE,uBAAuB,CAAC;CAC/B;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Conversions = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
7
|
+
class Conversions extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Releases a controlled (sandbox) conversion paused at its first step so it runs
|
|
10
|
+
* to completion normally. This endpoint is unavailable in live production.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const response =
|
|
15
|
+
* await client.simulations.conversions.complete(
|
|
16
|
+
* '550e8400-e29b-41d4-a716-446655440006',
|
|
17
|
+
* );
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
complete(id, options) {
|
|
21
|
+
return this._client.post((0, path_1.path) `/v1/simulations/conversions/${id}/complete`, options);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Fails a controlled (sandbox) conversion paused at its first step, before any
|
|
25
|
+
* funds move. This endpoint is unavailable in live production.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const response = await client.simulations.conversions.fail(
|
|
30
|
+
* '550e8400-e29b-41d4-a716-446655440006',
|
|
31
|
+
* );
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
fail(id, options) {
|
|
35
|
+
return this._client.post((0, path_1.path) `/v1/simulations/conversions/${id}/fail`, options);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.Conversions = Conversions;
|
|
39
|
+
//# sourceMappingURL=conversions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversions.js","sourceRoot":"","sources":["../../src/resources/simulations/conversions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,+BAA+B,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IACtF,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAU,EAAE,OAAwB;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,+BAA+B,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;CACF;AA/BD,kCA+BC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
4
|
+
export class Conversions extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Releases a controlled (sandbox) conversion paused at its first step so it runs
|
|
7
|
+
* to completion normally. This endpoint is unavailable in live production.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const response =
|
|
12
|
+
* await client.simulations.conversions.complete(
|
|
13
|
+
* '550e8400-e29b-41d4-a716-446655440006',
|
|
14
|
+
* );
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
complete(id, options) {
|
|
18
|
+
return this._client.post(path `/v1/simulations/conversions/${id}/complete`, options);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Fails a controlled (sandbox) conversion paused at its first step, before any
|
|
22
|
+
* funds move. This endpoint is unavailable in live production.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const response = await client.simulations.conversions.fail(
|
|
27
|
+
* '550e8400-e29b-41d4-a716-446655440006',
|
|
28
|
+
* );
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
fail(id, options) {
|
|
32
|
+
return this._client.post(path `/v1/simulations/conversions/${id}/fail`, options);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=conversions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversions.mjs","sourceRoot":"","sources":["../../src/resources/simulations/conversions.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAGlD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,+BAA+B,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IACtF,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAU,EAAE,OAAwB;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,+BAA+B,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;CACF"}
|