@naturalpay/sdk 0.2.1 → 0.3.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 +29 -0
- package/README.md +2 -2
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/client.d.mts +17 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +17 -5
- package/client.d.ts.map +1 -1
- package/client.js +16 -4
- package/client.js.map +1 -1
- package/client.mjs +16 -4
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/qs/formats.d.mts.map +1 -1
- package/internal/qs/formats.d.ts.map +1 -1
- package/internal/qs/index.d.mts +2 -2
- package/internal/qs/index.d.mts.map +1 -1
- package/internal/qs/index.d.ts +2 -2
- package/internal/qs/index.d.ts.map +1 -1
- package/internal/qs/index.mjs.map +1 -1
- package/internal/qs/stringify.d.mts.map +1 -1
- package/internal/qs/stringify.d.ts.map +1 -1
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/utils.d.mts.map +1 -1
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +4 -4
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +4 -4
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/lib/envelope.d.mts.map +1 -1
- package/lib/envelope.d.ts.map +1 -1
- package/lib/envelope.mjs.map +1 -1
- package/package.json +1 -1
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/agents.d.mts +4 -153
- package/resources/agents.d.mts.map +1 -1
- package/resources/agents.d.ts +4 -153
- package/resources/agents.d.ts.map +1 -1
- package/resources/agents.js +5 -5
- package/resources/agents.js.map +1 -1
- package/resources/agents.mjs +5 -5
- package/resources/agents.mjs.map +1 -1
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/api-keys.js +1 -1
- package/resources/api-keys.js.map +1 -1
- package/resources/api-keys.mjs +1 -1
- package/resources/api-keys.mjs.map +1 -1
- package/resources/counterparties.d.mts +5 -55
- package/resources/counterparties.d.mts.map +1 -1
- package/resources/counterparties.d.ts +5 -55
- package/resources/counterparties.d.ts.map +1 -1
- package/resources/counterparties.js +1 -3
- package/resources/counterparties.js.map +1 -1
- package/resources/counterparties.mjs +1 -3
- package/resources/counterparties.mjs.map +1 -1
- package/resources/customers.d.mts.map +1 -1
- package/resources/customers.d.ts.map +1 -1
- package/resources/customers.mjs.map +1 -1
- package/resources/delegations.d.mts.map +1 -1
- package/resources/delegations.d.ts.map +1 -1
- package/resources/delegations.mjs.map +1 -1
- package/resources/external-accounts.d.mts +239 -0
- package/resources/external-accounts.d.mts.map +1 -0
- package/resources/external-accounts.d.ts +239 -0
- package/resources/external-accounts.d.ts.map +1 -0
- package/resources/external-accounts.js +47 -0
- package/resources/external-accounts.js.map +1 -0
- package/resources/external-accounts.mjs +43 -0
- package/resources/external-accounts.mjs.map +1 -0
- package/resources/index.d.mts +3 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -1
- 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/invitations.d.mts +1 -1
- package/resources/invitations.d.mts.map +1 -1
- package/resources/invitations.d.ts +1 -1
- package/resources/invitations.d.ts.map +1 -1
- package/resources/invitations.js +1 -1
- package/resources/invitations.mjs +1 -1
- package/resources/invitations.mjs.map +1 -1
- package/resources/parties.d.mts +2 -2
- package/resources/parties.d.mts.map +1 -1
- package/resources/parties.d.ts +2 -2
- package/resources/parties.d.ts.map +1 -1
- package/resources/parties.js +3 -3
- package/resources/parties.js.map +1 -1
- package/resources/parties.mjs +3 -3
- package/resources/parties.mjs.map +1 -1
- package/resources/payment-requests.d.mts +24 -17
- package/resources/payment-requests.d.mts.map +1 -1
- package/resources/payment-requests.d.ts +24 -17
- package/resources/payment-requests.d.ts.map +1 -1
- package/resources/payment-requests.js +0 -1
- package/resources/payment-requests.js.map +1 -1
- package/resources/payment-requests.mjs +0 -1
- package/resources/payment-requests.mjs.map +1 -1
- package/resources/payments.d.mts +1 -1
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +1 -1
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.mjs.map +1 -1
- package/resources/transactions.d.mts +18 -10
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +18 -10
- package/resources/transactions.d.ts.map +1 -1
- package/resources/transactions.js +2 -2
- package/resources/transactions.mjs +2 -2
- package/resources/transactions.mjs.map +1 -1
- package/resources/wallet.d.mts +196 -328
- package/resources/wallet.d.mts.map +1 -1
- package/resources/wallet.d.ts +196 -328
- package/resources/wallet.d.ts.map +1 -1
- package/resources/wallet.js +16 -63
- package/resources/wallet.js.map +1 -1
- package/resources/wallet.mjs +16 -63
- package/resources/wallet.mjs.map +1 -1
- package/resources/webhooks.d.mts +775 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts +775 -0
- package/resources/webhooks.d.ts.map +1 -0
- package/resources/webhooks.js +163 -0
- package/resources/webhooks.js.map +1 -0
- package/resources/webhooks.mjs +159 -0
- package/resources/webhooks.mjs.map +1 -0
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/client.ts +69 -21
- package/src/resources/agents.ts +5 -185
- package/src/resources/api-keys.ts +1 -1
- package/src/resources/counterparties.ts +5 -64
- package/src/resources/external-accounts.ts +324 -0
- package/src/resources/index.ts +26 -8
- package/src/resources/invitations.ts +1 -1
- package/src/resources/parties.ts +3 -3
- package/src/resources/payment-requests.ts +28 -18
- package/src/resources/payments.ts +1 -1
- package/src/resources/transactions.ts +20 -10
- package/src/resources/wallet.ts +223 -419
- package/src/resources/webhooks.ts +1225 -0
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/wallet.ts
CHANGED
|
@@ -7,24 +7,24 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
7
7
|
import { path } from '../internal/utils/path';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* Wallet balance, deposits, withdrawals, and external
|
|
10
|
+
* Wallet balance, deposits, withdrawals, and external accounts
|
|
11
11
|
*/
|
|
12
12
|
export class Wallet extends APIResource {
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* List wallets for the authenticated party, including balance and ACH deposit
|
|
15
|
+
* instructions when available. Currently returns at most one wallet.
|
|
15
16
|
*
|
|
16
17
|
* @example
|
|
17
18
|
* ```ts
|
|
18
|
-
* const
|
|
19
|
+
* const wallets = await client.wallet.list();
|
|
19
20
|
* ```
|
|
20
21
|
*/
|
|
21
|
-
|
|
22
|
-
params:
|
|
22
|
+
list(
|
|
23
|
+
params: WalletListParams | null | undefined = {},
|
|
23
24
|
options?: RequestOptions,
|
|
24
|
-
): APIPromise<
|
|
25
|
-
const { 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID
|
|
26
|
-
return this._client.get('/
|
|
27
|
-
query,
|
|
25
|
+
): APIPromise<WalletListResponse> {
|
|
26
|
+
const { 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID } = params ?? {};
|
|
27
|
+
return this._client.get('/wallets', {
|
|
28
28
|
...options,
|
|
29
29
|
headers: buildHeaders([
|
|
30
30
|
{
|
|
@@ -37,20 +37,23 @@ export class Wallet extends APIResource {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
|
-
* Get
|
|
40
|
+
* Get a wallet visible to the authenticated party, including balance and ACH
|
|
41
|
+
* deposit instructions when available.
|
|
41
42
|
*
|
|
42
43
|
* @example
|
|
43
44
|
* ```ts
|
|
44
|
-
* const
|
|
45
|
-
*
|
|
45
|
+
* const wallet = await client.wallet.get(
|
|
46
|
+
* 'wal_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
47
|
+
* );
|
|
46
48
|
* ```
|
|
47
49
|
*/
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
get(
|
|
51
|
+
walletID: string,
|
|
52
|
+
params: WalletGetParams | null | undefined = {},
|
|
50
53
|
options?: RequestOptions,
|
|
51
|
-
): APIPromise<
|
|
54
|
+
): APIPromise<WalletGetResponse> {
|
|
52
55
|
const { 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID } = params ?? {};
|
|
53
|
-
return this._client.get(
|
|
56
|
+
return this._client.get(path`/wallets/${walletID}`, {
|
|
54
57
|
...options,
|
|
55
58
|
headers: buildHeaders([
|
|
56
59
|
{
|
|
@@ -69,8 +72,7 @@ export class Wallet extends APIResource {
|
|
|
69
72
|
* ```ts
|
|
70
73
|
* const response = await client.wallet.initiateDeposit({
|
|
71
74
|
* amount: 1,
|
|
72
|
-
*
|
|
73
|
-
* 'efs_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
75
|
+
* externalAccountId: 'ea_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
74
76
|
* 'Idempotency-Key': 'Idempotency-Key',
|
|
75
77
|
* });
|
|
76
78
|
* ```
|
|
@@ -106,8 +108,7 @@ export class Wallet extends APIResource {
|
|
|
106
108
|
* ```ts
|
|
107
109
|
* const response = await client.wallet.initiateWithdrawal({
|
|
108
110
|
* amount: 1,
|
|
109
|
-
*
|
|
110
|
-
* 'efs_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
111
|
+
* externalAccountId: 'ea_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
111
112
|
* 'Idempotency-Key': 'Idempotency-Key',
|
|
112
113
|
* });
|
|
113
114
|
* ```
|
|
@@ -135,69 +136,15 @@ export class Wallet extends APIResource {
|
|
|
135
136
|
]),
|
|
136
137
|
});
|
|
137
138
|
}
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* List linked external funding sources with cursor pagination.
|
|
141
|
-
*
|
|
142
|
-
* @example
|
|
143
|
-
* ```ts
|
|
144
|
-
* const response =
|
|
145
|
-
* await client.wallet.listPaymentInstruments();
|
|
146
|
-
* ```
|
|
147
|
-
*/
|
|
148
|
-
listPaymentInstruments(
|
|
149
|
-
params: WalletListPaymentInstrumentsParams | null | undefined = {},
|
|
150
|
-
options?: RequestOptions,
|
|
151
|
-
): APIPromise<WalletListPaymentInstrumentsResponse> {
|
|
152
|
-
const { 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID, ...query } = params ?? {};
|
|
153
|
-
return this._client.get('/wallet/external-funding-sources', {
|
|
154
|
-
query,
|
|
155
|
-
...options,
|
|
156
|
-
headers: buildHeaders([
|
|
157
|
-
{
|
|
158
|
-
...(xAgentID != null ? { 'X-Agent-ID': xAgentID } : undefined),
|
|
159
|
-
...(xInstanceID != null ? { 'X-Instance-ID': xInstanceID } : undefined),
|
|
160
|
-
},
|
|
161
|
-
options?.headers,
|
|
162
|
-
]),
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Remove (unlink) a bank account.
|
|
168
|
-
*
|
|
169
|
-
* @example
|
|
170
|
-
* ```ts
|
|
171
|
-
* const response =
|
|
172
|
-
* await client.wallet.removePaymentInstrument(
|
|
173
|
-
* 'efs_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
174
|
-
* );
|
|
175
|
-
* ```
|
|
176
|
-
*/
|
|
177
|
-
removePaymentInstrument(
|
|
178
|
-
externalFundingSourceID: string,
|
|
179
|
-
params: WalletRemovePaymentInstrumentParams | null | undefined = {},
|
|
180
|
-
options?: RequestOptions,
|
|
181
|
-
): APIPromise<WalletRemovePaymentInstrumentResponse> {
|
|
182
|
-
const { 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID } = params ?? {};
|
|
183
|
-
return this._client.delete(path`/wallet/external-funding-sources/${externalFundingSourceID}`, {
|
|
184
|
-
...options,
|
|
185
|
-
headers: buildHeaders([
|
|
186
|
-
{
|
|
187
|
-
...(xAgentID != null ? { 'X-Agent-ID': xAgentID } : undefined),
|
|
188
|
-
...(xInstanceID != null ? { 'X-Instance-ID': xInstanceID } : undefined),
|
|
189
|
-
},
|
|
190
|
-
options?.headers,
|
|
191
|
-
]),
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
139
|
}
|
|
195
140
|
|
|
196
|
-
export interface
|
|
197
|
-
data:
|
|
141
|
+
export interface WalletListResponse {
|
|
142
|
+
data: Array<WalletListResponse.Data>;
|
|
143
|
+
|
|
144
|
+
meta: WalletListResponse.Meta;
|
|
198
145
|
}
|
|
199
146
|
|
|
200
|
-
export namespace
|
|
147
|
+
export namespace WalletListResponse {
|
|
201
148
|
export interface Data {
|
|
202
149
|
/**
|
|
203
150
|
* Resource ID
|
|
@@ -226,19 +173,81 @@ export namespace WalletGetBalanceResponse {
|
|
|
226
173
|
*/
|
|
227
174
|
export interface Attributes {
|
|
228
175
|
/**
|
|
229
|
-
*
|
|
176
|
+
* Wallet ledger balance
|
|
230
177
|
*/
|
|
231
|
-
|
|
178
|
+
balance: Attributes.Balance;
|
|
232
179
|
|
|
233
180
|
/**
|
|
234
|
-
*
|
|
181
|
+
* Claimable payment totals
|
|
182
|
+
*/
|
|
183
|
+
claims: Attributes.Claims;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* ACH deposit instructions for this wallet, when available
|
|
235
187
|
*/
|
|
236
|
-
|
|
188
|
+
depositInstructions: Attributes.DepositInstructions | null;
|
|
237
189
|
|
|
238
190
|
/**
|
|
239
|
-
*
|
|
191
|
+
* Wallet readiness status
|
|
240
192
|
*/
|
|
241
|
-
|
|
193
|
+
status: 'active';
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export namespace Attributes {
|
|
197
|
+
/**
|
|
198
|
+
* Wallet ledger balance
|
|
199
|
+
*/
|
|
200
|
+
export interface Balance {
|
|
201
|
+
/**
|
|
202
|
+
* Amount currently available to spend or withdraw (cents)
|
|
203
|
+
*/
|
|
204
|
+
available: number;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Currency code
|
|
208
|
+
*/
|
|
209
|
+
currency: 'USD';
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Total wallet ledger balance (cents)
|
|
213
|
+
*/
|
|
214
|
+
total: number;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Claimable payment totals
|
|
219
|
+
*/
|
|
220
|
+
export interface Claims {
|
|
221
|
+
/**
|
|
222
|
+
* Total unclaimed product-payment amount (cents)
|
|
223
|
+
*/
|
|
224
|
+
amount: number;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Number of unclaimed product payments
|
|
228
|
+
*/
|
|
229
|
+
count: number;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* ACH deposit instructions for this wallet, when available
|
|
234
|
+
*/
|
|
235
|
+
export interface DepositInstructions {
|
|
236
|
+
/**
|
|
237
|
+
* Account number for ACH deposits
|
|
238
|
+
*/
|
|
239
|
+
accountNumber: string;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Name of the receiving bank
|
|
243
|
+
*/
|
|
244
|
+
bankName: string;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Bank routing number for ACH deposits
|
|
248
|
+
*/
|
|
249
|
+
routingNumber: string;
|
|
250
|
+
}
|
|
242
251
|
}
|
|
243
252
|
|
|
244
253
|
/**
|
|
@@ -277,62 +286,28 @@ export namespace WalletGetBalanceResponse {
|
|
|
277
286
|
}
|
|
278
287
|
}
|
|
279
288
|
}
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
export interface WalletGetDepositInstructionsResponse {
|
|
283
|
-
data: WalletGetDepositInstructionsResponse.Data;
|
|
284
|
-
}
|
|
285
289
|
|
|
286
|
-
export
|
|
287
|
-
|
|
288
|
-
/**
|
|
289
|
-
* Resource ID (the wallet handle)
|
|
290
|
-
*/
|
|
291
|
-
id: string;
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* Resource attributes
|
|
295
|
-
*/
|
|
296
|
-
attributes: Data.Attributes;
|
|
297
|
-
|
|
298
|
-
/**
|
|
299
|
-
* Resource type
|
|
300
|
-
*/
|
|
301
|
-
type: string;
|
|
290
|
+
export interface Meta {
|
|
291
|
+
pagination: Meta.Pagination;
|
|
302
292
|
}
|
|
303
293
|
|
|
304
|
-
export namespace
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
*/
|
|
308
|
-
export interface Attributes {
|
|
309
|
-
/**
|
|
310
|
-
* Account number for ACH deposits
|
|
311
|
-
*/
|
|
312
|
-
accountNumber: string;
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* Name of the receiving bank
|
|
316
|
-
*/
|
|
317
|
-
bankName: string;
|
|
294
|
+
export namespace Meta {
|
|
295
|
+
export interface Pagination {
|
|
296
|
+
hasMore: boolean;
|
|
318
297
|
|
|
319
|
-
|
|
320
|
-
* Bank routing number for ACH deposits
|
|
321
|
-
*/
|
|
322
|
-
routingNumber: string;
|
|
298
|
+
nextCursor: string | null;
|
|
323
299
|
}
|
|
324
300
|
}
|
|
325
301
|
}
|
|
326
302
|
|
|
327
|
-
export interface
|
|
328
|
-
data:
|
|
303
|
+
export interface WalletGetResponse {
|
|
304
|
+
data: WalletGetResponse.Data;
|
|
329
305
|
}
|
|
330
306
|
|
|
331
|
-
export namespace
|
|
307
|
+
export namespace WalletGetResponse {
|
|
332
308
|
export interface Data {
|
|
333
309
|
/**
|
|
334
|
-
*
|
|
335
|
-
* transaction was created.
|
|
310
|
+
* Resource ID
|
|
336
311
|
*/
|
|
337
312
|
id: string;
|
|
338
313
|
|
|
@@ -342,65 +317,9 @@ export namespace WalletInitiateDepositResponse {
|
|
|
342
317
|
attributes: Data.Attributes;
|
|
343
318
|
|
|
344
319
|
/**
|
|
345
|
-
* Resource
|
|
346
|
-
*/
|
|
347
|
-
type: string;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
export namespace Data {
|
|
351
|
-
/**
|
|
352
|
-
* Resource attributes
|
|
353
|
-
*/
|
|
354
|
-
export interface Attributes {
|
|
355
|
-
/**
|
|
356
|
-
* Amount in cents
|
|
357
|
-
*/
|
|
358
|
-
amount: number;
|
|
359
|
-
|
|
360
|
-
/**
|
|
361
|
-
* Currency code
|
|
362
|
-
*/
|
|
363
|
-
currency: string;
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
* Error message if failed
|
|
367
|
-
*/
|
|
368
|
-
error: string | null;
|
|
369
|
-
|
|
370
|
-
/**
|
|
371
|
-
* Detailed error information
|
|
372
|
-
*/
|
|
373
|
-
errorDetails: string | null;
|
|
374
|
-
|
|
375
|
-
/**
|
|
376
|
-
* Estimated settlement time
|
|
377
|
-
*/
|
|
378
|
-
estimatedSettlement: string | null;
|
|
379
|
-
|
|
380
|
-
/**
|
|
381
|
-
* Operation status
|
|
382
|
-
*/
|
|
383
|
-
status: 'PROCESSING' | 'IN_REVIEW' | 'COMPLETED' | 'FAILED' | 'RETURNED';
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
export interface WalletInitiateWithdrawalResponse {
|
|
389
|
-
data: WalletInitiateWithdrawalResponse.Data;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
export namespace WalletInitiateWithdrawalResponse {
|
|
393
|
-
export interface Data {
|
|
394
|
-
/**
|
|
395
|
-
* Transaction handle (txn_xxx). Empty when the operation failed before a
|
|
396
|
-
* transaction was created.
|
|
397
|
-
*/
|
|
398
|
-
id: string;
|
|
399
|
-
|
|
400
|
-
/**
|
|
401
|
-
* Resource attributes
|
|
320
|
+
* Resource relationships
|
|
402
321
|
*/
|
|
403
|
-
|
|
322
|
+
relationships: Data.Relationships;
|
|
404
323
|
|
|
405
324
|
/**
|
|
406
325
|
* Resource type
|
|
@@ -414,126 +333,81 @@ export namespace WalletInitiateWithdrawalResponse {
|
|
|
414
333
|
*/
|
|
415
334
|
export interface Attributes {
|
|
416
335
|
/**
|
|
417
|
-
*
|
|
418
|
-
*/
|
|
419
|
-
amount: number;
|
|
420
|
-
|
|
421
|
-
/**
|
|
422
|
-
* Currency code
|
|
336
|
+
* Wallet ledger balance
|
|
423
337
|
*/
|
|
424
|
-
|
|
338
|
+
balance: Attributes.Balance;
|
|
425
339
|
|
|
426
340
|
/**
|
|
427
|
-
*
|
|
341
|
+
* Claimable payment totals
|
|
428
342
|
*/
|
|
429
|
-
|
|
343
|
+
claims: Attributes.Claims;
|
|
430
344
|
|
|
431
345
|
/**
|
|
432
|
-
*
|
|
346
|
+
* ACH deposit instructions for this wallet, when available
|
|
433
347
|
*/
|
|
434
|
-
|
|
348
|
+
depositInstructions: Attributes.DepositInstructions | null;
|
|
435
349
|
|
|
436
350
|
/**
|
|
437
|
-
*
|
|
351
|
+
* Wallet readiness status
|
|
438
352
|
*/
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
/**
|
|
442
|
-
* Payment instruction ID
|
|
443
|
-
*/
|
|
444
|
-
instructionId: string | null;
|
|
445
|
-
|
|
446
|
-
/**
|
|
447
|
-
* MFA challenge ID
|
|
448
|
-
*/
|
|
449
|
-
mfaChallengeId: string | null;
|
|
450
|
-
|
|
451
|
-
/**
|
|
452
|
-
* MFA challenge expiration
|
|
453
|
-
*/
|
|
454
|
-
mfaExpiresAt: string | null;
|
|
455
|
-
|
|
456
|
-
/**
|
|
457
|
-
* Whether MFA is required
|
|
458
|
-
*/
|
|
459
|
-
mfaRequired: boolean;
|
|
460
|
-
|
|
461
|
-
/**
|
|
462
|
-
* Operation status
|
|
463
|
-
*/
|
|
464
|
-
status: 'PROCESSING' | 'IN_REVIEW' | 'COMPLETED' | 'FAILED' | 'RETURNED';
|
|
353
|
+
status: 'active';
|
|
465
354
|
}
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
export interface WalletListPaymentInstrumentsResponse {
|
|
470
|
-
data: Array<WalletListPaymentInstrumentsResponse.Data>;
|
|
471
355
|
|
|
472
|
-
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
export namespace WalletListPaymentInstrumentsResponse {
|
|
476
|
-
export interface Data {
|
|
477
|
-
/**
|
|
478
|
-
* Resource ID
|
|
479
|
-
*/
|
|
480
|
-
id: string;
|
|
481
|
-
|
|
482
|
-
/**
|
|
483
|
-
* Resource attributes
|
|
484
|
-
*/
|
|
485
|
-
attributes: Data.Attributes;
|
|
486
|
-
|
|
487
|
-
/**
|
|
488
|
-
* Resource relationships
|
|
489
|
-
*/
|
|
490
|
-
relationships: Data.Relationships;
|
|
491
|
-
|
|
492
|
-
/**
|
|
493
|
-
* Resource type
|
|
494
|
-
*/
|
|
495
|
-
type: string;
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
export namespace Data {
|
|
499
|
-
/**
|
|
500
|
-
* Resource attributes
|
|
501
|
-
*/
|
|
502
|
-
export interface Attributes {
|
|
356
|
+
export namespace Attributes {
|
|
503
357
|
/**
|
|
504
|
-
*
|
|
358
|
+
* Wallet ledger balance
|
|
505
359
|
*/
|
|
506
|
-
|
|
360
|
+
export interface Balance {
|
|
361
|
+
/**
|
|
362
|
+
* Amount currently available to spend or withdraw (cents)
|
|
363
|
+
*/
|
|
364
|
+
available: number;
|
|
507
365
|
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
366
|
+
/**
|
|
367
|
+
* Currency code
|
|
368
|
+
*/
|
|
369
|
+
currency: 'USD';
|
|
512
370
|
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
371
|
+
/**
|
|
372
|
+
* Total wallet ledger balance (cents)
|
|
373
|
+
*/
|
|
374
|
+
total: number;
|
|
375
|
+
}
|
|
517
376
|
|
|
518
377
|
/**
|
|
519
|
-
*
|
|
378
|
+
* Claimable payment totals
|
|
520
379
|
*/
|
|
521
|
-
|
|
380
|
+
export interface Claims {
|
|
381
|
+
/**
|
|
382
|
+
* Total unclaimed product-payment amount (cents)
|
|
383
|
+
*/
|
|
384
|
+
amount: number;
|
|
522
385
|
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
386
|
+
/**
|
|
387
|
+
* Number of unclaimed product payments
|
|
388
|
+
*/
|
|
389
|
+
count: number;
|
|
390
|
+
}
|
|
527
391
|
|
|
528
392
|
/**
|
|
529
|
-
*
|
|
393
|
+
* ACH deposit instructions for this wallet, when available
|
|
530
394
|
*/
|
|
531
|
-
|
|
395
|
+
export interface DepositInstructions {
|
|
396
|
+
/**
|
|
397
|
+
* Account number for ACH deposits
|
|
398
|
+
*/
|
|
399
|
+
accountNumber: string;
|
|
532
400
|
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
401
|
+
/**
|
|
402
|
+
* Name of the receiving bank
|
|
403
|
+
*/
|
|
404
|
+
bankName: string;
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* Bank routing number for ACH deposits
|
|
408
|
+
*/
|
|
409
|
+
routingNumber: string;
|
|
410
|
+
}
|
|
537
411
|
}
|
|
538
412
|
|
|
539
413
|
/**
|
|
@@ -541,14 +415,14 @@ export namespace WalletListPaymentInstrumentsResponse {
|
|
|
541
415
|
*/
|
|
542
416
|
export interface Relationships {
|
|
543
417
|
/**
|
|
544
|
-
* Party that owns the
|
|
418
|
+
* Party that owns the wallet
|
|
545
419
|
*/
|
|
546
420
|
party: Relationships.Party;
|
|
547
421
|
}
|
|
548
422
|
|
|
549
423
|
export namespace Relationships {
|
|
550
424
|
/**
|
|
551
|
-
* Party that owns the
|
|
425
|
+
* Party that owns the wallet
|
|
552
426
|
*/
|
|
553
427
|
export interface Party {
|
|
554
428
|
/**
|
|
@@ -572,30 +446,17 @@ export namespace WalletListPaymentInstrumentsResponse {
|
|
|
572
446
|
}
|
|
573
447
|
}
|
|
574
448
|
}
|
|
575
|
-
|
|
576
|
-
export interface Meta {
|
|
577
|
-
pagination: Meta.Pagination;
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
export namespace Meta {
|
|
581
|
-
export interface Pagination {
|
|
582
|
-
hasMore: boolean;
|
|
583
|
-
|
|
584
|
-
nextCursor: string | null;
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
449
|
}
|
|
588
450
|
|
|
589
|
-
export interface
|
|
590
|
-
data:
|
|
591
|
-
|
|
592
|
-
meta: WalletRemovePaymentInstrumentResponse.Meta;
|
|
451
|
+
export interface WalletInitiateDepositResponse {
|
|
452
|
+
data: WalletInitiateDepositResponse.Data;
|
|
593
453
|
}
|
|
594
454
|
|
|
595
|
-
export namespace
|
|
455
|
+
export namespace WalletInitiateDepositResponse {
|
|
596
456
|
export interface Data {
|
|
597
457
|
/**
|
|
598
|
-
*
|
|
458
|
+
* Transaction handle (txn_xxx). Empty when the operation failed before a
|
|
459
|
+
* transaction was created.
|
|
599
460
|
*/
|
|
600
461
|
id: string;
|
|
601
462
|
|
|
@@ -604,11 +465,6 @@ export namespace WalletRemovePaymentInstrumentResponse {
|
|
|
604
465
|
*/
|
|
605
466
|
attributes: Data.Attributes;
|
|
606
467
|
|
|
607
|
-
/**
|
|
608
|
-
* Resource relationships
|
|
609
|
-
*/
|
|
610
|
-
relationships: Data.Relationships;
|
|
611
|
-
|
|
612
468
|
/**
|
|
613
469
|
* Resource type
|
|
614
470
|
*/
|
|
@@ -621,105 +477,93 @@ export namespace WalletRemovePaymentInstrumentResponse {
|
|
|
621
477
|
*/
|
|
622
478
|
export interface Attributes {
|
|
623
479
|
/**
|
|
624
|
-
*
|
|
480
|
+
* Amount in cents
|
|
625
481
|
*/
|
|
626
|
-
|
|
482
|
+
amount: number;
|
|
627
483
|
|
|
628
484
|
/**
|
|
629
|
-
*
|
|
485
|
+
* Currency code
|
|
630
486
|
*/
|
|
631
|
-
|
|
487
|
+
currency: string;
|
|
632
488
|
|
|
633
489
|
/**
|
|
634
|
-
*
|
|
490
|
+
* Estimated settlement time
|
|
635
491
|
*/
|
|
636
|
-
|
|
492
|
+
estimatedSettlement: string | null;
|
|
637
493
|
|
|
638
494
|
/**
|
|
639
|
-
*
|
|
495
|
+
* Operation status
|
|
640
496
|
*/
|
|
641
|
-
|
|
497
|
+
status: 'PROCESSING' | 'IN_REVIEW' | 'AWAITING_APPROVAL' | 'COMPLETED' | 'FAILED' | 'RETURNED';
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
}
|
|
642
501
|
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
lastFour: string;
|
|
502
|
+
export interface WalletInitiateWithdrawalResponse {
|
|
503
|
+
data: WalletInitiateWithdrawalResponse.Data;
|
|
504
|
+
}
|
|
647
505
|
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
506
|
+
export namespace WalletInitiateWithdrawalResponse {
|
|
507
|
+
export interface Data {
|
|
508
|
+
/**
|
|
509
|
+
* Transaction handle (txn_xxx). Empty when the operation failed before a
|
|
510
|
+
* transaction was created.
|
|
511
|
+
*/
|
|
512
|
+
id: string;
|
|
652
513
|
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
}
|
|
514
|
+
/**
|
|
515
|
+
* Resource attributes
|
|
516
|
+
*/
|
|
517
|
+
attributes: Data.Attributes;
|
|
658
518
|
|
|
659
519
|
/**
|
|
660
|
-
* Resource
|
|
520
|
+
* Resource type
|
|
661
521
|
*/
|
|
662
|
-
|
|
522
|
+
type: string;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
export namespace Data {
|
|
526
|
+
/**
|
|
527
|
+
* Resource attributes
|
|
528
|
+
*/
|
|
529
|
+
export interface Attributes {
|
|
663
530
|
/**
|
|
664
|
-
*
|
|
531
|
+
* Amount in cents
|
|
665
532
|
*/
|
|
666
|
-
|
|
667
|
-
}
|
|
533
|
+
amount: number;
|
|
668
534
|
|
|
669
|
-
export namespace Relationships {
|
|
670
535
|
/**
|
|
671
|
-
*
|
|
536
|
+
* Currency code
|
|
672
537
|
*/
|
|
673
|
-
|
|
674
|
-
/**
|
|
675
|
-
* Related resource identifier
|
|
676
|
-
*/
|
|
677
|
-
data: Party.Data;
|
|
678
|
-
}
|
|
538
|
+
currency: string;
|
|
679
539
|
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
export interface Data {
|
|
685
|
-
id: string;
|
|
540
|
+
/**
|
|
541
|
+
* Estimated settlement time
|
|
542
|
+
*/
|
|
543
|
+
estimatedSettlement: string | null;
|
|
686
544
|
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
}
|
|
692
|
-
}
|
|
545
|
+
/**
|
|
546
|
+
* Operation status
|
|
547
|
+
*/
|
|
548
|
+
status: 'PROCESSING' | 'IN_REVIEW' | 'AWAITING_APPROVAL' | 'COMPLETED' | 'FAILED' | 'RETURNED';
|
|
693
549
|
}
|
|
694
550
|
}
|
|
695
|
-
|
|
696
|
-
export interface Meta {
|
|
697
|
-
/**
|
|
698
|
-
* Indicates the resource was deleted
|
|
699
|
-
*/
|
|
700
|
-
deleted: true;
|
|
701
|
-
}
|
|
702
551
|
}
|
|
703
552
|
|
|
704
|
-
export interface
|
|
553
|
+
export interface WalletListParams {
|
|
705
554
|
/**
|
|
706
|
-
*
|
|
707
|
-
*/
|
|
708
|
-
partyId?: string;
|
|
709
|
-
|
|
710
|
-
/**
|
|
711
|
-
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
555
|
+
* Agent ID (agt_xxx) identifying which agent is making the request.
|
|
712
556
|
*/
|
|
713
557
|
'X-Agent-ID'?: string;
|
|
714
558
|
|
|
715
559
|
/**
|
|
716
|
-
*
|
|
717
|
-
*
|
|
560
|
+
* Required when X-Agent-ID is present. Session or conversation ID for agent
|
|
561
|
+
* observability.
|
|
718
562
|
*/
|
|
719
563
|
'X-Instance-ID'?: string;
|
|
720
564
|
}
|
|
721
565
|
|
|
722
|
-
export interface
|
|
566
|
+
export interface WalletGetParams {
|
|
723
567
|
/**
|
|
724
568
|
* Agent ID (agt_xxx) identifying which agent is making the request.
|
|
725
569
|
*/
|
|
@@ -739,9 +583,9 @@ export interface WalletInitiateDepositParams {
|
|
|
739
583
|
amount: number;
|
|
740
584
|
|
|
741
585
|
/**
|
|
742
|
-
* Body param: External
|
|
586
|
+
* Body param: External account ID (ea\_\*)
|
|
743
587
|
*/
|
|
744
|
-
|
|
588
|
+
externalAccountId: string;
|
|
745
589
|
|
|
746
590
|
/**
|
|
747
591
|
* Header param: Unique key for idempotent request handling. If a request with the
|
|
@@ -778,9 +622,9 @@ export interface WalletInitiateWithdrawalParams {
|
|
|
778
622
|
amount: number;
|
|
779
623
|
|
|
780
624
|
/**
|
|
781
|
-
* Body param: External
|
|
625
|
+
* Body param: External account ID (ea\_\*)
|
|
782
626
|
*/
|
|
783
|
-
|
|
627
|
+
externalAccountId: string;
|
|
784
628
|
|
|
785
629
|
/**
|
|
786
630
|
* Header param: Unique key for idempotent request handling. If a request with the
|
|
@@ -810,55 +654,15 @@ export interface WalletInitiateWithdrawalParams {
|
|
|
810
654
|
'X-Instance-ID'?: string;
|
|
811
655
|
}
|
|
812
656
|
|
|
813
|
-
export interface WalletListPaymentInstrumentsParams {
|
|
814
|
-
/**
|
|
815
|
-
* Query param
|
|
816
|
-
*/
|
|
817
|
-
cursor?: string;
|
|
818
|
-
|
|
819
|
-
/**
|
|
820
|
-
* Query param
|
|
821
|
-
*/
|
|
822
|
-
limit?: number;
|
|
823
|
-
|
|
824
|
-
/**
|
|
825
|
-
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
826
|
-
*/
|
|
827
|
-
'X-Agent-ID'?: string;
|
|
828
|
-
|
|
829
|
-
/**
|
|
830
|
-
* Header param: Required when X-Agent-ID is present. Session or conversation ID
|
|
831
|
-
* for agent observability.
|
|
832
|
-
*/
|
|
833
|
-
'X-Instance-ID'?: string;
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
export interface WalletRemovePaymentInstrumentParams {
|
|
837
|
-
/**
|
|
838
|
-
* Agent ID (agt_xxx) identifying which agent is making the request.
|
|
839
|
-
*/
|
|
840
|
-
'X-Agent-ID'?: string;
|
|
841
|
-
|
|
842
|
-
/**
|
|
843
|
-
* Required when X-Agent-ID is present. Session or conversation ID for agent
|
|
844
|
-
* observability.
|
|
845
|
-
*/
|
|
846
|
-
'X-Instance-ID'?: string;
|
|
847
|
-
}
|
|
848
|
-
|
|
849
657
|
export declare namespace Wallet {
|
|
850
658
|
export {
|
|
851
|
-
type
|
|
852
|
-
type
|
|
659
|
+
type WalletListResponse as WalletListResponse,
|
|
660
|
+
type WalletGetResponse as WalletGetResponse,
|
|
853
661
|
type WalletInitiateDepositResponse as WalletInitiateDepositResponse,
|
|
854
662
|
type WalletInitiateWithdrawalResponse as WalletInitiateWithdrawalResponse,
|
|
855
|
-
type
|
|
856
|
-
type
|
|
857
|
-
type WalletGetBalanceParams as WalletGetBalanceParams,
|
|
858
|
-
type WalletGetDepositInstructionsParams as WalletGetDepositInstructionsParams,
|
|
663
|
+
type WalletListParams as WalletListParams,
|
|
664
|
+
type WalletGetParams as WalletGetParams,
|
|
859
665
|
type WalletInitiateDepositParams as WalletInitiateDepositParams,
|
|
860
666
|
type WalletInitiateWithdrawalParams as WalletInitiateWithdrawalParams,
|
|
861
|
-
type WalletListPaymentInstrumentsParams as WalletListPaymentInstrumentsParams,
|
|
862
|
-
type WalletRemovePaymentInstrumentParams as WalletRemovePaymentInstrumentParams,
|
|
863
667
|
};
|
|
864
668
|
}
|