@moovio/sdk 0.21.0 → 0.21.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/bin/mcp-server.js +79 -61
- package/bin/mcp-server.js.map +11 -10
- package/examples/package-lock.json +1 -1
- package/hooks/hooks.d.ts +3 -2
- package/hooks/hooks.d.ts.map +1 -1
- package/hooks/hooks.js.map +1 -1
- package/hooks/moov-version-hook.d.ts +6 -0
- package/hooks/moov-version-hook.d.ts.map +1 -0
- package/hooks/moov-version-hook.js +12 -0
- package/hooks/moov-version-hook.js.map +1 -0
- package/hooks/registration.d.ts.map +1 -1
- package/hooks/registration.js +3 -1
- package/hooks/registration.js.map +1 -1
- package/hooks/types.d.ts +2 -6
- package/hooks/types.d.ts.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +5 -6
- package/lib/sdks.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/package.json +1 -1
- package/src/hooks/hooks.ts +2 -2
- package/src/hooks/moov-version-hook.ts +9 -0
- package/src/hooks/registration.ts +4 -1
- package/src/hooks/types.ts +2 -7
- package/src/lib/config.ts +3 -3
- package/src/lib/sdks.ts +6 -7
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/docs/sdks/accounts/README.md +0 -1038
- package/docs/sdks/accountterminalapplications/README.md +0 -371
- package/docs/sdks/adjustments/README.md +0 -185
- package/docs/sdks/applepay/README.md +0 -572
- package/docs/sdks/authentication/README.md +0 -191
- package/docs/sdks/avatars/README.md +0 -95
- package/docs/sdks/bankaccounts/README.md +0 -951
- package/docs/sdks/branding/README.md +0 -407
- package/docs/sdks/capabilities/README.md +0 -380
- package/docs/sdks/cardissuing/README.md +0 -533
- package/docs/sdks/cards/README.md +0 -544
- package/docs/sdks/disputes/README.md +0 -1085
- package/docs/sdks/endtoendencryption/README.md +0 -174
- package/docs/sdks/enrichedaddress/README.md +0 -95
- package/docs/sdks/enrichedprofile/README.md +0 -95
- package/docs/sdks/feeplans/README.md +0 -921
- package/docs/sdks/files/README.md +0 -293
- package/docs/sdks/images/README.md +0 -616
- package/docs/sdks/industries/README.md +0 -91
- package/docs/sdks/institutions/README.md +0 -184
- package/docs/sdks/issuingtransactions/README.md +0 -465
- package/docs/sdks/onboarding/README.md +0 -389
- package/docs/sdks/paymentlinks/README.md +0 -615
- package/docs/sdks/paymentmethods/README.md +0 -187
- package/docs/sdks/ping/README.md +0 -91
- package/docs/sdks/products/README.md +0 -616
- package/docs/sdks/receipts/README.md +0 -180
- package/docs/sdks/representatives/README.md +0 -603
- package/docs/sdks/scheduling/README.md +0 -1018
- package/docs/sdks/statements/README.md +0 -194
- package/docs/sdks/support/README.md +0 -505
- package/docs/sdks/sweeps/README.md +0 -571
- package/docs/sdks/terminalapplications/README.md +0 -460
- package/docs/sdks/transfers/README.md +0 -1136
- package/docs/sdks/underwriting/README.md +0 -331
- package/docs/sdks/wallets/README.md +0 -416
- package/docs/sdks/wallettransactions/README.md +0 -202
- package/examples/README.md +0 -31
- package/test/README.md +0 -14
|
@@ -1,1038 +0,0 @@
|
|
|
1
|
-
# Accounts
|
|
2
|
-
(*accounts*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
### Available Operations
|
|
7
|
-
|
|
8
|
-
* [create](#create) - You can create **business** or **individual** accounts for your users (i.e., customers, merchants) by passing the required
|
|
9
|
-
information to Moov. Requirements differ per account type and requested [capabilities](https://docs.moov.io/guides/accounts/capabilities/requirements/).
|
|
10
|
-
|
|
11
|
-
If you're requesting the `wallet`, `send-funds`, `collect-funds`, or `card-issuing` capabilities, you'll need to:
|
|
12
|
-
+ Send Moov the user [platform terms of service agreement](https://docs.moov.io/guides/accounts/requirements/platform-agreement/) acceptance.
|
|
13
|
-
This can be done upon account creation, or by [patching](https://docs.moov.io/api/moov-accounts/accounts/patch/) the account using the `termsOfService` field.
|
|
14
|
-
If you're creating a business account with the business type `llc`, `partnership`, or `privateCorporation`, you'll need to:
|
|
15
|
-
+ Provide [business representatives](https://docs.moov.io/api/moov-accounts/representatives/) after creating the account.
|
|
16
|
-
+ [Patch](https://docs.moov.io/api/moov-accounts/accounts/patch/) the account to indicate that business representative ownership information is complete.
|
|
17
|
-
|
|
18
|
-
Visit our documentation to read more about [creating accounts](https://docs.moov.io/guides/accounts/create-accounts/) and [verification requirements](https://docs.moov.io/guides/accounts/requirements/identity-verification/).
|
|
19
|
-
Note that the `mode` field (for production or sandbox) is only required when creating a _facilitator_ account. All non-facilitator account requests will ignore the mode field and be set to the calling facilitator's mode.
|
|
20
|
-
|
|
21
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
|
|
22
|
-
to specify the `/accounts.write` scope.
|
|
23
|
-
* [list](#list) - List or search accounts to which the caller is connected.
|
|
24
|
-
|
|
25
|
-
All supported query parameters are optional. If none are provided the response will include all connected accounts.
|
|
26
|
-
Pagination is supported via the `skip` and `count` query parameters. Searching by name and email will overlap and
|
|
27
|
-
return results based on relevance. Accounts with AccountType `guest` will not be included in the response.
|
|
28
|
-
|
|
29
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
|
|
30
|
-
to specify the `/accounts.read` scope.
|
|
31
|
-
* [get](#get) - Retrieves details for the account with the specified ID.
|
|
32
|
-
|
|
33
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
|
|
34
|
-
to specify the `/accounts/{accountID}/profile.read` scope.
|
|
35
|
-
* [update](#update) - When **can** profile data be updated:
|
|
36
|
-
+ For unverified accounts, all profile data can be edited.
|
|
37
|
-
+ During the verification process, missing or incomplete profile data can be edited.
|
|
38
|
-
+ Verified accounts can only add missing profile data.
|
|
39
|
-
|
|
40
|
-
When **can't** profile data be updated:
|
|
41
|
-
+ Verified accounts cannot change any existing profile data.
|
|
42
|
-
|
|
43
|
-
If you need to update information in a locked state, please contact Moov support.
|
|
44
|
-
|
|
45
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
|
|
46
|
-
to specify the `/accounts/{accountID}/profile.write` scope.
|
|
47
|
-
* [disconnect](#disconnect) - This will sever the connection between you and the account specified and it will no longer be listed as
|
|
48
|
-
active in the list of accounts. This also means you'll only have read-only access to the account going
|
|
49
|
-
forward for reporting purposes.
|
|
50
|
-
|
|
51
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
52
|
-
you'll need to specify the `/accounts/{accountID}/profile.disconnect` scope.
|
|
53
|
-
* [getCountries](#getcountries) - Retrieve the specified countries of operation for an account.
|
|
54
|
-
|
|
55
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
56
|
-
you'll need to specify the `/accounts/{accountID}/profile.read` scope.
|
|
57
|
-
* [assignCountries](#assigncountries) - Assign the countries of operation for an account.
|
|
58
|
-
|
|
59
|
-
This endpoint will always overwrite the previously assigned values.
|
|
60
|
-
|
|
61
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
62
|
-
you'll need to specify the `/accounts/{accountID}/profile.write` scope.
|
|
63
|
-
* [getMerchantProcessingAgreement](#getmerchantprocessingagreement) - Retrieve a merchant account's processing agreement.
|
|
64
|
-
|
|
65
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
66
|
-
you'll need to specify the `/accounts/{accountID}/profile.read` scope.
|
|
67
|
-
* [getTermsOfServiceToken](#gettermsofservicetoken) - Generates a non-expiring token that can then be used to accept Moov's terms of service.
|
|
68
|
-
|
|
69
|
-
This token can only be generated via API. Any Moov account requesting the collect funds, send funds, wallet,
|
|
70
|
-
or card issuing capabilities must accept Moov's terms of service, then have the generated terms of service
|
|
71
|
-
token patched to the account. Read more in our [documentation](https://docs.moov.io/guides/accounts/requirements/platform-agreement/).
|
|
72
|
-
|
|
73
|
-
## create
|
|
74
|
-
|
|
75
|
-
You can create **business** or **individual** accounts for your users (i.e., customers, merchants) by passing the required
|
|
76
|
-
information to Moov. Requirements differ per account type and requested [capabilities](https://docs.moov.io/guides/accounts/capabilities/requirements/).
|
|
77
|
-
|
|
78
|
-
If you're requesting the `wallet`, `send-funds`, `collect-funds`, or `card-issuing` capabilities, you'll need to:
|
|
79
|
-
+ Send Moov the user [platform terms of service agreement](https://docs.moov.io/guides/accounts/requirements/platform-agreement/) acceptance.
|
|
80
|
-
This can be done upon account creation, or by [patching](https://docs.moov.io/api/moov-accounts/accounts/patch/) the account using the `termsOfService` field.
|
|
81
|
-
If you're creating a business account with the business type `llc`, `partnership`, or `privateCorporation`, you'll need to:
|
|
82
|
-
+ Provide [business representatives](https://docs.moov.io/api/moov-accounts/representatives/) after creating the account.
|
|
83
|
-
+ [Patch](https://docs.moov.io/api/moov-accounts/accounts/patch/) the account to indicate that business representative ownership information is complete.
|
|
84
|
-
|
|
85
|
-
Visit our documentation to read more about [creating accounts](https://docs.moov.io/guides/accounts/create-accounts/) and [verification requirements](https://docs.moov.io/guides/accounts/requirements/identity-verification/).
|
|
86
|
-
Note that the `mode` field (for production or sandbox) is only required when creating a _facilitator_ account. All non-facilitator account requests will ignore the mode field and be set to the calling facilitator's mode.
|
|
87
|
-
|
|
88
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
|
|
89
|
-
to specify the `/accounts.write` scope.
|
|
90
|
-
|
|
91
|
-
### Example Usage
|
|
92
|
-
|
|
93
|
-
<!-- UsageSnippet language="typescript" operationID="createAccount" method="post" path="/accounts" -->
|
|
94
|
-
```typescript
|
|
95
|
-
import { Moov } from "@moovio/sdk";
|
|
96
|
-
|
|
97
|
-
const moov = new Moov({
|
|
98
|
-
xMoovVersion: "v2024.01.00",
|
|
99
|
-
security: {
|
|
100
|
-
username: "",
|
|
101
|
-
password: "",
|
|
102
|
-
},
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
async function run() {
|
|
106
|
-
const result = await moov.accounts.create({
|
|
107
|
-
accountType: "business",
|
|
108
|
-
profile: {
|
|
109
|
-
business: {
|
|
110
|
-
legalBusinessName: "Whole Body Fitness LLC",
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
console.log(result);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
run();
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
### Standalone function
|
|
122
|
-
|
|
123
|
-
The standalone function version of this method:
|
|
124
|
-
|
|
125
|
-
```typescript
|
|
126
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
127
|
-
import { accountsCreate } from "@moovio/sdk/funcs/accountsCreate.js";
|
|
128
|
-
|
|
129
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
130
|
-
// You can create one instance of it to use across an application.
|
|
131
|
-
const moov = new MoovCore({
|
|
132
|
-
xMoovVersion: "v2024.01.00",
|
|
133
|
-
security: {
|
|
134
|
-
username: "",
|
|
135
|
-
password: "",
|
|
136
|
-
},
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
async function run() {
|
|
140
|
-
const res = await accountsCreate(moov, {
|
|
141
|
-
accountType: "business",
|
|
142
|
-
profile: {
|
|
143
|
-
business: {
|
|
144
|
-
legalBusinessName: "Whole Body Fitness LLC",
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
});
|
|
148
|
-
if (res.ok) {
|
|
149
|
-
const { value: result } = res;
|
|
150
|
-
console.log(result);
|
|
151
|
-
} else {
|
|
152
|
-
console.log("accountsCreate failed:", res.error);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
run();
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
### Parameters
|
|
160
|
-
|
|
161
|
-
| Parameter | Type | Required | Description |
|
|
162
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
163
|
-
| `request` | [components.CreateAccount](../../models/components/createaccount.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
164
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
165
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
166
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
167
|
-
|
|
168
|
-
### Response
|
|
169
|
-
|
|
170
|
-
**Promise\<[operations.CreateAccountResponse](../../models/operations/createaccountresponse.md)\>**
|
|
171
|
-
|
|
172
|
-
### Errors
|
|
173
|
-
|
|
174
|
-
| Error Type | Status Code | Content Type |
|
|
175
|
-
| ------------------------- | ------------------------- | ------------------------- |
|
|
176
|
-
| errors.GenericError | 400, 409 | application/json |
|
|
177
|
-
| errors.CreateAccountError | 422 | application/json |
|
|
178
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
179
|
-
|
|
180
|
-
## list
|
|
181
|
-
|
|
182
|
-
List or search accounts to which the caller is connected.
|
|
183
|
-
|
|
184
|
-
All supported query parameters are optional. If none are provided the response will include all connected accounts.
|
|
185
|
-
Pagination is supported via the `skip` and `count` query parameters. Searching by name and email will overlap and
|
|
186
|
-
return results based on relevance. Accounts with AccountType `guest` will not be included in the response.
|
|
187
|
-
|
|
188
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
|
|
189
|
-
to specify the `/accounts.read` scope.
|
|
190
|
-
|
|
191
|
-
### Example Usage
|
|
192
|
-
|
|
193
|
-
<!-- UsageSnippet language="typescript" operationID="listAccounts" method="get" path="/accounts" -->
|
|
194
|
-
```typescript
|
|
195
|
-
import { Moov } from "@moovio/sdk";
|
|
196
|
-
|
|
197
|
-
const moov = new Moov({
|
|
198
|
-
xMoovVersion: "v2024.01.00",
|
|
199
|
-
security: {
|
|
200
|
-
username: "",
|
|
201
|
-
password: "",
|
|
202
|
-
},
|
|
203
|
-
});
|
|
204
|
-
|
|
205
|
-
async function run() {
|
|
206
|
-
const result = await moov.accounts.list({
|
|
207
|
-
type: "business",
|
|
208
|
-
skip: 60,
|
|
209
|
-
count: 20,
|
|
210
|
-
});
|
|
211
|
-
|
|
212
|
-
console.log(result);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
run();
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
### Standalone function
|
|
219
|
-
|
|
220
|
-
The standalone function version of this method:
|
|
221
|
-
|
|
222
|
-
```typescript
|
|
223
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
224
|
-
import { accountsList } from "@moovio/sdk/funcs/accountsList.js";
|
|
225
|
-
|
|
226
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
227
|
-
// You can create one instance of it to use across an application.
|
|
228
|
-
const moov = new MoovCore({
|
|
229
|
-
xMoovVersion: "v2024.01.00",
|
|
230
|
-
security: {
|
|
231
|
-
username: "",
|
|
232
|
-
password: "",
|
|
233
|
-
},
|
|
234
|
-
});
|
|
235
|
-
|
|
236
|
-
async function run() {
|
|
237
|
-
const res = await accountsList(moov, {
|
|
238
|
-
type: "business",
|
|
239
|
-
skip: 60,
|
|
240
|
-
count: 20,
|
|
241
|
-
});
|
|
242
|
-
if (res.ok) {
|
|
243
|
-
const { value: result } = res;
|
|
244
|
-
console.log(result);
|
|
245
|
-
} else {
|
|
246
|
-
console.log("accountsList failed:", res.error);
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
run();
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
### Parameters
|
|
254
|
-
|
|
255
|
-
| Parameter | Type | Required | Description |
|
|
256
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
257
|
-
| `request` | [operations.ListAccountsRequest](../../models/operations/listaccountsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
258
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
259
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
260
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
261
|
-
|
|
262
|
-
### Response
|
|
263
|
-
|
|
264
|
-
**Promise\<[operations.ListAccountsResponse](../../models/operations/listaccountsresponse.md)\>**
|
|
265
|
-
|
|
266
|
-
### Errors
|
|
267
|
-
|
|
268
|
-
| Error Type | Status Code | Content Type |
|
|
269
|
-
| --------------- | --------------- | --------------- |
|
|
270
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
271
|
-
|
|
272
|
-
## get
|
|
273
|
-
|
|
274
|
-
Retrieves details for the account with the specified ID.
|
|
275
|
-
|
|
276
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
|
|
277
|
-
to specify the `/accounts/{accountID}/profile.read` scope.
|
|
278
|
-
|
|
279
|
-
### Example Usage
|
|
280
|
-
|
|
281
|
-
<!-- UsageSnippet language="typescript" operationID="getAccount" method="get" path="/accounts/{accountID}" -->
|
|
282
|
-
```typescript
|
|
283
|
-
import { Moov } from "@moovio/sdk";
|
|
284
|
-
|
|
285
|
-
const moov = new Moov({
|
|
286
|
-
xMoovVersion: "v2024.01.00",
|
|
287
|
-
security: {
|
|
288
|
-
username: "",
|
|
289
|
-
password: "",
|
|
290
|
-
},
|
|
291
|
-
});
|
|
292
|
-
|
|
293
|
-
async function run() {
|
|
294
|
-
const result = await moov.accounts.get({
|
|
295
|
-
accountID: "2f93a6cf-3b3b-4c17-8d3b-110dfadccea4",
|
|
296
|
-
});
|
|
297
|
-
|
|
298
|
-
console.log(result);
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
run();
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
### Standalone function
|
|
305
|
-
|
|
306
|
-
The standalone function version of this method:
|
|
307
|
-
|
|
308
|
-
```typescript
|
|
309
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
310
|
-
import { accountsGet } from "@moovio/sdk/funcs/accountsGet.js";
|
|
311
|
-
|
|
312
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
313
|
-
// You can create one instance of it to use across an application.
|
|
314
|
-
const moov = new MoovCore({
|
|
315
|
-
xMoovVersion: "v2024.01.00",
|
|
316
|
-
security: {
|
|
317
|
-
username: "",
|
|
318
|
-
password: "",
|
|
319
|
-
},
|
|
320
|
-
});
|
|
321
|
-
|
|
322
|
-
async function run() {
|
|
323
|
-
const res = await accountsGet(moov, {
|
|
324
|
-
accountID: "2f93a6cf-3b3b-4c17-8d3b-110dfadccea4",
|
|
325
|
-
});
|
|
326
|
-
if (res.ok) {
|
|
327
|
-
const { value: result } = res;
|
|
328
|
-
console.log(result);
|
|
329
|
-
} else {
|
|
330
|
-
console.log("accountsGet failed:", res.error);
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
run();
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
### Parameters
|
|
338
|
-
|
|
339
|
-
| Parameter | Type | Required | Description |
|
|
340
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
341
|
-
| `request` | [operations.GetAccountRequest](../../models/operations/getaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
342
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
343
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
344
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
345
|
-
|
|
346
|
-
### Response
|
|
347
|
-
|
|
348
|
-
**Promise\<[operations.GetAccountResponse](../../models/operations/getaccountresponse.md)\>**
|
|
349
|
-
|
|
350
|
-
### Errors
|
|
351
|
-
|
|
352
|
-
| Error Type | Status Code | Content Type |
|
|
353
|
-
| --------------- | --------------- | --------------- |
|
|
354
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
355
|
-
|
|
356
|
-
## update
|
|
357
|
-
|
|
358
|
-
When **can** profile data be updated:
|
|
359
|
-
+ For unverified accounts, all profile data can be edited.
|
|
360
|
-
+ During the verification process, missing or incomplete profile data can be edited.
|
|
361
|
-
+ Verified accounts can only add missing profile data.
|
|
362
|
-
|
|
363
|
-
When **can't** profile data be updated:
|
|
364
|
-
+ Verified accounts cannot change any existing profile data.
|
|
365
|
-
|
|
366
|
-
If you need to update information in a locked state, please contact Moov support.
|
|
367
|
-
|
|
368
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
|
|
369
|
-
to specify the `/accounts/{accountID}/profile.write` scope.
|
|
370
|
-
|
|
371
|
-
### Example Usage
|
|
372
|
-
|
|
373
|
-
<!-- UsageSnippet language="typescript" operationID="updateAccount" method="patch" path="/accounts/{accountID}" -->
|
|
374
|
-
```typescript
|
|
375
|
-
import { Moov } from "@moovio/sdk";
|
|
376
|
-
|
|
377
|
-
const moov = new Moov({
|
|
378
|
-
xMoovVersion: "v2024.01.00",
|
|
379
|
-
security: {
|
|
380
|
-
username: "",
|
|
381
|
-
password: "",
|
|
382
|
-
},
|
|
383
|
-
});
|
|
384
|
-
|
|
385
|
-
async function run() {
|
|
386
|
-
const result = await moov.accounts.update({
|
|
387
|
-
accountID: "433cb9d1-5943-4fd5-91b4-2aef5b30e2e7",
|
|
388
|
-
patchAccount: {
|
|
389
|
-
profile: {
|
|
390
|
-
individual: {
|
|
391
|
-
name: {
|
|
392
|
-
firstName: "Jordan",
|
|
393
|
-
middleName: "Reese",
|
|
394
|
-
lastName: "Lee",
|
|
395
|
-
suffix: "Jr",
|
|
396
|
-
},
|
|
397
|
-
phone: {
|
|
398
|
-
number: "8185551212",
|
|
399
|
-
countryCode: "1",
|
|
400
|
-
},
|
|
401
|
-
email: "jordan.lee@classbooker.dev",
|
|
402
|
-
address: {
|
|
403
|
-
addressLine1: "123 Main Street",
|
|
404
|
-
addressLine2: "Apt 302",
|
|
405
|
-
city: "Boulder",
|
|
406
|
-
stateOrProvince: "CO",
|
|
407
|
-
postalCode: "80301",
|
|
408
|
-
country: "US",
|
|
409
|
-
},
|
|
410
|
-
birthDate: {
|
|
411
|
-
day: 9,
|
|
412
|
-
month: 11,
|
|
413
|
-
year: 1989,
|
|
414
|
-
},
|
|
415
|
-
},
|
|
416
|
-
business: {
|
|
417
|
-
businessType: "llc",
|
|
418
|
-
address: {
|
|
419
|
-
addressLine1: "123 Main Street",
|
|
420
|
-
addressLine2: "Apt 302",
|
|
421
|
-
city: "Boulder",
|
|
422
|
-
stateOrProvince: "CO",
|
|
423
|
-
postalCode: "80301",
|
|
424
|
-
country: "US",
|
|
425
|
-
},
|
|
426
|
-
phone: {
|
|
427
|
-
number: "8185551212",
|
|
428
|
-
countryCode: "1",
|
|
429
|
-
},
|
|
430
|
-
email: "jordan.lee@classbooker.dev",
|
|
431
|
-
taxID: {
|
|
432
|
-
ein: {
|
|
433
|
-
number: "12-3456789",
|
|
434
|
-
},
|
|
435
|
-
},
|
|
436
|
-
industryCodes: {
|
|
437
|
-
naics: "713940",
|
|
438
|
-
sic: "7991",
|
|
439
|
-
mcc: "7997",
|
|
440
|
-
},
|
|
441
|
-
industry: "electronics-appliances",
|
|
442
|
-
},
|
|
443
|
-
},
|
|
444
|
-
metadata: {
|
|
445
|
-
"optional": "metadata",
|
|
446
|
-
},
|
|
447
|
-
termsOfService: {
|
|
448
|
-
token: "kgT1uxoMAk7QKuyJcmQE8nqW_HjpyuXBabiXPi6T83fUQoxsyWYPcYzuHQTqrt7YRp4gCwyDQvb6U5REM9Pgl2EloCe35t-eiMAbUWGo3Kerxme6aqNcKrP_6-v0MTXViOEJ96IBxPFTvMV7EROI2dq3u4e-x4BbGSCedAX-ViAQND6hcreCDXwrO6sHuzh5Xi2IzSqZHxaovnWEboaxuZKRJkA3dsFID6fzitMpm2qrOh4",
|
|
449
|
-
},
|
|
450
|
-
customerSupport: {
|
|
451
|
-
phone: {
|
|
452
|
-
number: "8185551212",
|
|
453
|
-
countryCode: "1",
|
|
454
|
-
},
|
|
455
|
-
email: "jordan.lee@classbooker.dev",
|
|
456
|
-
address: {
|
|
457
|
-
addressLine1: "123 Main Street",
|
|
458
|
-
addressLine2: "Apt 302",
|
|
459
|
-
city: "Boulder",
|
|
460
|
-
stateOrProvince: "CO",
|
|
461
|
-
postalCode: "80301",
|
|
462
|
-
country: "US",
|
|
463
|
-
},
|
|
464
|
-
},
|
|
465
|
-
},
|
|
466
|
-
});
|
|
467
|
-
|
|
468
|
-
console.log(result);
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
run();
|
|
472
|
-
```
|
|
473
|
-
|
|
474
|
-
### Standalone function
|
|
475
|
-
|
|
476
|
-
The standalone function version of this method:
|
|
477
|
-
|
|
478
|
-
```typescript
|
|
479
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
480
|
-
import { accountsUpdate } from "@moovio/sdk/funcs/accountsUpdate.js";
|
|
481
|
-
|
|
482
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
483
|
-
// You can create one instance of it to use across an application.
|
|
484
|
-
const moov = new MoovCore({
|
|
485
|
-
xMoovVersion: "v2024.01.00",
|
|
486
|
-
security: {
|
|
487
|
-
username: "",
|
|
488
|
-
password: "",
|
|
489
|
-
},
|
|
490
|
-
});
|
|
491
|
-
|
|
492
|
-
async function run() {
|
|
493
|
-
const res = await accountsUpdate(moov, {
|
|
494
|
-
accountID: "433cb9d1-5943-4fd5-91b4-2aef5b30e2e7",
|
|
495
|
-
patchAccount: {
|
|
496
|
-
profile: {
|
|
497
|
-
individual: {
|
|
498
|
-
name: {
|
|
499
|
-
firstName: "Jordan",
|
|
500
|
-
middleName: "Reese",
|
|
501
|
-
lastName: "Lee",
|
|
502
|
-
suffix: "Jr",
|
|
503
|
-
},
|
|
504
|
-
phone: {
|
|
505
|
-
number: "8185551212",
|
|
506
|
-
countryCode: "1",
|
|
507
|
-
},
|
|
508
|
-
email: "jordan.lee@classbooker.dev",
|
|
509
|
-
address: {
|
|
510
|
-
addressLine1: "123 Main Street",
|
|
511
|
-
addressLine2: "Apt 302",
|
|
512
|
-
city: "Boulder",
|
|
513
|
-
stateOrProvince: "CO",
|
|
514
|
-
postalCode: "80301",
|
|
515
|
-
country: "US",
|
|
516
|
-
},
|
|
517
|
-
birthDate: {
|
|
518
|
-
day: 9,
|
|
519
|
-
month: 11,
|
|
520
|
-
year: 1989,
|
|
521
|
-
},
|
|
522
|
-
},
|
|
523
|
-
business: {
|
|
524
|
-
businessType: "llc",
|
|
525
|
-
address: {
|
|
526
|
-
addressLine1: "123 Main Street",
|
|
527
|
-
addressLine2: "Apt 302",
|
|
528
|
-
city: "Boulder",
|
|
529
|
-
stateOrProvince: "CO",
|
|
530
|
-
postalCode: "80301",
|
|
531
|
-
country: "US",
|
|
532
|
-
},
|
|
533
|
-
phone: {
|
|
534
|
-
number: "8185551212",
|
|
535
|
-
countryCode: "1",
|
|
536
|
-
},
|
|
537
|
-
email: "jordan.lee@classbooker.dev",
|
|
538
|
-
taxID: {
|
|
539
|
-
ein: {
|
|
540
|
-
number: "12-3456789",
|
|
541
|
-
},
|
|
542
|
-
},
|
|
543
|
-
industryCodes: {
|
|
544
|
-
naics: "713940",
|
|
545
|
-
sic: "7991",
|
|
546
|
-
mcc: "7997",
|
|
547
|
-
},
|
|
548
|
-
industry: "electronics-appliances",
|
|
549
|
-
},
|
|
550
|
-
},
|
|
551
|
-
metadata: {
|
|
552
|
-
"optional": "metadata",
|
|
553
|
-
},
|
|
554
|
-
termsOfService: {
|
|
555
|
-
token: "kgT1uxoMAk7QKuyJcmQE8nqW_HjpyuXBabiXPi6T83fUQoxsyWYPcYzuHQTqrt7YRp4gCwyDQvb6U5REM9Pgl2EloCe35t-eiMAbUWGo3Kerxme6aqNcKrP_6-v0MTXViOEJ96IBxPFTvMV7EROI2dq3u4e-x4BbGSCedAX-ViAQND6hcreCDXwrO6sHuzh5Xi2IzSqZHxaovnWEboaxuZKRJkA3dsFID6fzitMpm2qrOh4",
|
|
556
|
-
},
|
|
557
|
-
customerSupport: {
|
|
558
|
-
phone: {
|
|
559
|
-
number: "8185551212",
|
|
560
|
-
countryCode: "1",
|
|
561
|
-
},
|
|
562
|
-
email: "jordan.lee@classbooker.dev",
|
|
563
|
-
address: {
|
|
564
|
-
addressLine1: "123 Main Street",
|
|
565
|
-
addressLine2: "Apt 302",
|
|
566
|
-
city: "Boulder",
|
|
567
|
-
stateOrProvince: "CO",
|
|
568
|
-
postalCode: "80301",
|
|
569
|
-
country: "US",
|
|
570
|
-
},
|
|
571
|
-
},
|
|
572
|
-
},
|
|
573
|
-
});
|
|
574
|
-
if (res.ok) {
|
|
575
|
-
const { value: result } = res;
|
|
576
|
-
console.log(result);
|
|
577
|
-
} else {
|
|
578
|
-
console.log("accountsUpdate failed:", res.error);
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
run();
|
|
583
|
-
```
|
|
584
|
-
|
|
585
|
-
### Parameters
|
|
586
|
-
|
|
587
|
-
| Parameter | Type | Required | Description |
|
|
588
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
589
|
-
| `request` | [operations.UpdateAccountRequest](../../models/operations/updateaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
590
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
591
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
592
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
593
|
-
|
|
594
|
-
### Response
|
|
595
|
-
|
|
596
|
-
**Promise\<[operations.UpdateAccountResponse](../../models/operations/updateaccountresponse.md)\>**
|
|
597
|
-
|
|
598
|
-
### Errors
|
|
599
|
-
|
|
600
|
-
| Error Type | Status Code | Content Type |
|
|
601
|
-
| ------------------------ | ------------------------ | ------------------------ |
|
|
602
|
-
| errors.GenericError | 400, 409 | application/json |
|
|
603
|
-
| errors.PatchAccountError | 422 | application/json |
|
|
604
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
605
|
-
|
|
606
|
-
## disconnect
|
|
607
|
-
|
|
608
|
-
This will sever the connection between you and the account specified and it will no longer be listed as
|
|
609
|
-
active in the list of accounts. This also means you'll only have read-only access to the account going
|
|
610
|
-
forward for reporting purposes.
|
|
611
|
-
|
|
612
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
613
|
-
you'll need to specify the `/accounts/{accountID}/profile.disconnect` scope.
|
|
614
|
-
|
|
615
|
-
### Example Usage
|
|
616
|
-
|
|
617
|
-
<!-- UsageSnippet language="typescript" operationID="disconnectAccount" method="delete" path="/accounts/{accountID}" -->
|
|
618
|
-
```typescript
|
|
619
|
-
import { Moov } from "@moovio/sdk";
|
|
620
|
-
|
|
621
|
-
const moov = new Moov({
|
|
622
|
-
xMoovVersion: "v2024.01.00",
|
|
623
|
-
security: {
|
|
624
|
-
username: "",
|
|
625
|
-
password: "",
|
|
626
|
-
},
|
|
627
|
-
});
|
|
628
|
-
|
|
629
|
-
async function run() {
|
|
630
|
-
const result = await moov.accounts.disconnect({
|
|
631
|
-
accountID: "cfdfea7d-f185-4de5-ba90-b09f14fe6683",
|
|
632
|
-
});
|
|
633
|
-
|
|
634
|
-
console.log(result);
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
run();
|
|
638
|
-
```
|
|
639
|
-
|
|
640
|
-
### Standalone function
|
|
641
|
-
|
|
642
|
-
The standalone function version of this method:
|
|
643
|
-
|
|
644
|
-
```typescript
|
|
645
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
646
|
-
import { accountsDisconnect } from "@moovio/sdk/funcs/accountsDisconnect.js";
|
|
647
|
-
|
|
648
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
649
|
-
// You can create one instance of it to use across an application.
|
|
650
|
-
const moov = new MoovCore({
|
|
651
|
-
xMoovVersion: "v2024.01.00",
|
|
652
|
-
security: {
|
|
653
|
-
username: "",
|
|
654
|
-
password: "",
|
|
655
|
-
},
|
|
656
|
-
});
|
|
657
|
-
|
|
658
|
-
async function run() {
|
|
659
|
-
const res = await accountsDisconnect(moov, {
|
|
660
|
-
accountID: "cfdfea7d-f185-4de5-ba90-b09f14fe6683",
|
|
661
|
-
});
|
|
662
|
-
if (res.ok) {
|
|
663
|
-
const { value: result } = res;
|
|
664
|
-
console.log(result);
|
|
665
|
-
} else {
|
|
666
|
-
console.log("accountsDisconnect failed:", res.error);
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
run();
|
|
671
|
-
```
|
|
672
|
-
|
|
673
|
-
### Parameters
|
|
674
|
-
|
|
675
|
-
| Parameter | Type | Required | Description |
|
|
676
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
677
|
-
| `request` | [operations.DisconnectAccountRequest](../../models/operations/disconnectaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
678
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
679
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
680
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
681
|
-
|
|
682
|
-
### Response
|
|
683
|
-
|
|
684
|
-
**Promise\<[operations.DisconnectAccountResponse](../../models/operations/disconnectaccountresponse.md)\>**
|
|
685
|
-
|
|
686
|
-
### Errors
|
|
687
|
-
|
|
688
|
-
| Error Type | Status Code | Content Type |
|
|
689
|
-
| ------------------- | ------------------- | ------------------- |
|
|
690
|
-
| errors.GenericError | 400, 409 | application/json |
|
|
691
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
692
|
-
|
|
693
|
-
## getCountries
|
|
694
|
-
|
|
695
|
-
Retrieve the specified countries of operation for an account.
|
|
696
|
-
|
|
697
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
698
|
-
you'll need to specify the `/accounts/{accountID}/profile.read` scope.
|
|
699
|
-
|
|
700
|
-
### Example Usage
|
|
701
|
-
|
|
702
|
-
<!-- UsageSnippet language="typescript" operationID="getAccountCountries" method="get" path="/accounts/{accountID}/countries" -->
|
|
703
|
-
```typescript
|
|
704
|
-
import { Moov } from "@moovio/sdk";
|
|
705
|
-
|
|
706
|
-
const moov = new Moov({
|
|
707
|
-
xMoovVersion: "v2024.01.00",
|
|
708
|
-
security: {
|
|
709
|
-
username: "",
|
|
710
|
-
password: "",
|
|
711
|
-
},
|
|
712
|
-
});
|
|
713
|
-
|
|
714
|
-
async function run() {
|
|
715
|
-
const result = await moov.accounts.getCountries({
|
|
716
|
-
accountID: "a2026036-cc26-42c1-beef-950662d13b5d",
|
|
717
|
-
});
|
|
718
|
-
|
|
719
|
-
console.log(result);
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
run();
|
|
723
|
-
```
|
|
724
|
-
|
|
725
|
-
### Standalone function
|
|
726
|
-
|
|
727
|
-
The standalone function version of this method:
|
|
728
|
-
|
|
729
|
-
```typescript
|
|
730
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
731
|
-
import { accountsGetCountries } from "@moovio/sdk/funcs/accountsGetCountries.js";
|
|
732
|
-
|
|
733
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
734
|
-
// You can create one instance of it to use across an application.
|
|
735
|
-
const moov = new MoovCore({
|
|
736
|
-
xMoovVersion: "v2024.01.00",
|
|
737
|
-
security: {
|
|
738
|
-
username: "",
|
|
739
|
-
password: "",
|
|
740
|
-
},
|
|
741
|
-
});
|
|
742
|
-
|
|
743
|
-
async function run() {
|
|
744
|
-
const res = await accountsGetCountries(moov, {
|
|
745
|
-
accountID: "a2026036-cc26-42c1-beef-950662d13b5d",
|
|
746
|
-
});
|
|
747
|
-
if (res.ok) {
|
|
748
|
-
const { value: result } = res;
|
|
749
|
-
console.log(result);
|
|
750
|
-
} else {
|
|
751
|
-
console.log("accountsGetCountries failed:", res.error);
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
run();
|
|
756
|
-
```
|
|
757
|
-
|
|
758
|
-
### Parameters
|
|
759
|
-
|
|
760
|
-
| Parameter | Type | Required | Description |
|
|
761
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
762
|
-
| `request` | [operations.GetAccountCountriesRequest](../../models/operations/getaccountcountriesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
763
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
764
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
765
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
766
|
-
|
|
767
|
-
### Response
|
|
768
|
-
|
|
769
|
-
**Promise\<[operations.GetAccountCountriesResponse](../../models/operations/getaccountcountriesresponse.md)\>**
|
|
770
|
-
|
|
771
|
-
### Errors
|
|
772
|
-
|
|
773
|
-
| Error Type | Status Code | Content Type |
|
|
774
|
-
| --------------- | --------------- | --------------- |
|
|
775
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
776
|
-
|
|
777
|
-
## assignCountries
|
|
778
|
-
|
|
779
|
-
Assign the countries of operation for an account.
|
|
780
|
-
|
|
781
|
-
This endpoint will always overwrite the previously assigned values.
|
|
782
|
-
|
|
783
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
784
|
-
you'll need to specify the `/accounts/{accountID}/profile.write` scope.
|
|
785
|
-
|
|
786
|
-
### Example Usage
|
|
787
|
-
|
|
788
|
-
<!-- UsageSnippet language="typescript" operationID="assignAccountCountries" method="put" path="/accounts/{accountID}/countries" -->
|
|
789
|
-
```typescript
|
|
790
|
-
import { Moov } from "@moovio/sdk";
|
|
791
|
-
|
|
792
|
-
const moov = new Moov({
|
|
793
|
-
xMoovVersion: "v2024.01.00",
|
|
794
|
-
security: {
|
|
795
|
-
username: "",
|
|
796
|
-
password: "",
|
|
797
|
-
},
|
|
798
|
-
});
|
|
799
|
-
|
|
800
|
-
async function run() {
|
|
801
|
-
const result = await moov.accounts.assignCountries({
|
|
802
|
-
accountID: "46736fa8-4bf7-4144-8e0e-dbea1eb0805b",
|
|
803
|
-
accountCountries: {
|
|
804
|
-
countries: [
|
|
805
|
-
"United States",
|
|
806
|
-
],
|
|
807
|
-
},
|
|
808
|
-
});
|
|
809
|
-
|
|
810
|
-
console.log(result);
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
run();
|
|
814
|
-
```
|
|
815
|
-
|
|
816
|
-
### Standalone function
|
|
817
|
-
|
|
818
|
-
The standalone function version of this method:
|
|
819
|
-
|
|
820
|
-
```typescript
|
|
821
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
822
|
-
import { accountsAssignCountries } from "@moovio/sdk/funcs/accountsAssignCountries.js";
|
|
823
|
-
|
|
824
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
825
|
-
// You can create one instance of it to use across an application.
|
|
826
|
-
const moov = new MoovCore({
|
|
827
|
-
xMoovVersion: "v2024.01.00",
|
|
828
|
-
security: {
|
|
829
|
-
username: "",
|
|
830
|
-
password: "",
|
|
831
|
-
},
|
|
832
|
-
});
|
|
833
|
-
|
|
834
|
-
async function run() {
|
|
835
|
-
const res = await accountsAssignCountries(moov, {
|
|
836
|
-
accountID: "46736fa8-4bf7-4144-8e0e-dbea1eb0805b",
|
|
837
|
-
accountCountries: {
|
|
838
|
-
countries: [
|
|
839
|
-
"United States",
|
|
840
|
-
],
|
|
841
|
-
},
|
|
842
|
-
});
|
|
843
|
-
if (res.ok) {
|
|
844
|
-
const { value: result } = res;
|
|
845
|
-
console.log(result);
|
|
846
|
-
} else {
|
|
847
|
-
console.log("accountsAssignCountries failed:", res.error);
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
run();
|
|
852
|
-
```
|
|
853
|
-
|
|
854
|
-
### Parameters
|
|
855
|
-
|
|
856
|
-
| Parameter | Type | Required | Description |
|
|
857
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
858
|
-
| `request` | [operations.AssignAccountCountriesRequest](../../models/operations/assignaccountcountriesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
859
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
860
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
861
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
862
|
-
|
|
863
|
-
### Response
|
|
864
|
-
|
|
865
|
-
**Promise\<[operations.AssignAccountCountriesResponse](../../models/operations/assignaccountcountriesresponse.md)\>**
|
|
866
|
-
|
|
867
|
-
### Errors
|
|
868
|
-
|
|
869
|
-
| Error Type | Status Code | Content Type |
|
|
870
|
-
| --------------------------- | --------------------------- | --------------------------- |
|
|
871
|
-
| errors.GenericError | 400, 409 | application/json |
|
|
872
|
-
| errors.AssignCountriesError | 422 | application/json |
|
|
873
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
874
|
-
|
|
875
|
-
## getMerchantProcessingAgreement
|
|
876
|
-
|
|
877
|
-
Retrieve a merchant account's processing agreement.
|
|
878
|
-
|
|
879
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
880
|
-
you'll need to specify the `/accounts/{accountID}/profile.read` scope.
|
|
881
|
-
|
|
882
|
-
### Example Usage
|
|
883
|
-
|
|
884
|
-
<!-- UsageSnippet language="typescript" operationID="getMerchantProcessingAgreement" method="get" path="/accounts/{accountID}/merchant-agreement" -->
|
|
885
|
-
```typescript
|
|
886
|
-
import { Moov } from "@moovio/sdk";
|
|
887
|
-
|
|
888
|
-
const moov = new Moov({
|
|
889
|
-
xMoovVersion: "v2024.01.00",
|
|
890
|
-
security: {
|
|
891
|
-
username: "",
|
|
892
|
-
password: "",
|
|
893
|
-
},
|
|
894
|
-
});
|
|
895
|
-
|
|
896
|
-
async function run() {
|
|
897
|
-
const result = await moov.accounts.getMerchantProcessingAgreement({
|
|
898
|
-
accountID: "6180d9b9-2377-4190-8530-70a99d31a578",
|
|
899
|
-
});
|
|
900
|
-
|
|
901
|
-
console.log(result);
|
|
902
|
-
}
|
|
903
|
-
|
|
904
|
-
run();
|
|
905
|
-
```
|
|
906
|
-
|
|
907
|
-
### Standalone function
|
|
908
|
-
|
|
909
|
-
The standalone function version of this method:
|
|
910
|
-
|
|
911
|
-
```typescript
|
|
912
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
913
|
-
import { accountsGetMerchantProcessingAgreement } from "@moovio/sdk/funcs/accountsGetMerchantProcessingAgreement.js";
|
|
914
|
-
|
|
915
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
916
|
-
// You can create one instance of it to use across an application.
|
|
917
|
-
const moov = new MoovCore({
|
|
918
|
-
xMoovVersion: "v2024.01.00",
|
|
919
|
-
security: {
|
|
920
|
-
username: "",
|
|
921
|
-
password: "",
|
|
922
|
-
},
|
|
923
|
-
});
|
|
924
|
-
|
|
925
|
-
async function run() {
|
|
926
|
-
const res = await accountsGetMerchantProcessingAgreement(moov, {
|
|
927
|
-
accountID: "6180d9b9-2377-4190-8530-70a99d31a578",
|
|
928
|
-
});
|
|
929
|
-
if (res.ok) {
|
|
930
|
-
const { value: result } = res;
|
|
931
|
-
console.log(result);
|
|
932
|
-
} else {
|
|
933
|
-
console.log("accountsGetMerchantProcessingAgreement failed:", res.error);
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
run();
|
|
938
|
-
```
|
|
939
|
-
|
|
940
|
-
### Parameters
|
|
941
|
-
|
|
942
|
-
| Parameter | Type | Required | Description |
|
|
943
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
944
|
-
| `request` | [operations.GetMerchantProcessingAgreementRequest](../../models/operations/getmerchantprocessingagreementrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
945
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
946
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
947
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
948
|
-
|
|
949
|
-
### Response
|
|
950
|
-
|
|
951
|
-
**Promise\<[operations.GetMerchantProcessingAgreementResponse](../../models/operations/getmerchantprocessingagreementresponse.md)\>**
|
|
952
|
-
|
|
953
|
-
### Errors
|
|
954
|
-
|
|
955
|
-
| Error Type | Status Code | Content Type |
|
|
956
|
-
| --------------- | --------------- | --------------- |
|
|
957
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
958
|
-
|
|
959
|
-
## getTermsOfServiceToken
|
|
960
|
-
|
|
961
|
-
Generates a non-expiring token that can then be used to accept Moov's terms of service.
|
|
962
|
-
|
|
963
|
-
This token can only be generated via API. Any Moov account requesting the collect funds, send funds, wallet,
|
|
964
|
-
or card issuing capabilities must accept Moov's terms of service, then have the generated terms of service
|
|
965
|
-
token patched to the account. Read more in our [documentation](https://docs.moov.io/guides/accounts/requirements/platform-agreement/).
|
|
966
|
-
|
|
967
|
-
### Example Usage
|
|
968
|
-
|
|
969
|
-
<!-- UsageSnippet language="typescript" operationID="getTermsOfServiceToken" method="get" path="/tos-token" -->
|
|
970
|
-
```typescript
|
|
971
|
-
import { Moov } from "@moovio/sdk";
|
|
972
|
-
|
|
973
|
-
const moov = new Moov({
|
|
974
|
-
xMoovVersion: "v2024.01.00",
|
|
975
|
-
security: {
|
|
976
|
-
username: "",
|
|
977
|
-
password: "",
|
|
978
|
-
},
|
|
979
|
-
});
|
|
980
|
-
|
|
981
|
-
async function run() {
|
|
982
|
-
const result = await moov.accounts.getTermsOfServiceToken({});
|
|
983
|
-
|
|
984
|
-
console.log(result);
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
run();
|
|
988
|
-
```
|
|
989
|
-
|
|
990
|
-
### Standalone function
|
|
991
|
-
|
|
992
|
-
The standalone function version of this method:
|
|
993
|
-
|
|
994
|
-
```typescript
|
|
995
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
996
|
-
import { accountsGetTermsOfServiceToken } from "@moovio/sdk/funcs/accountsGetTermsOfServiceToken.js";
|
|
997
|
-
|
|
998
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
999
|
-
// You can create one instance of it to use across an application.
|
|
1000
|
-
const moov = new MoovCore({
|
|
1001
|
-
xMoovVersion: "v2024.01.00",
|
|
1002
|
-
security: {
|
|
1003
|
-
username: "",
|
|
1004
|
-
password: "",
|
|
1005
|
-
},
|
|
1006
|
-
});
|
|
1007
|
-
|
|
1008
|
-
async function run() {
|
|
1009
|
-
const res = await accountsGetTermsOfServiceToken(moov, {});
|
|
1010
|
-
if (res.ok) {
|
|
1011
|
-
const { value: result } = res;
|
|
1012
|
-
console.log(result);
|
|
1013
|
-
} else {
|
|
1014
|
-
console.log("accountsGetTermsOfServiceToken failed:", res.error);
|
|
1015
|
-
}
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
run();
|
|
1019
|
-
```
|
|
1020
|
-
|
|
1021
|
-
### Parameters
|
|
1022
|
-
|
|
1023
|
-
| Parameter | Type | Required | Description |
|
|
1024
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1025
|
-
| `request` | [operations.GetTermsOfServiceTokenRequest](../../models/operations/gettermsofservicetokenrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1026
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1027
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
1028
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1029
|
-
|
|
1030
|
-
### Response
|
|
1031
|
-
|
|
1032
|
-
**Promise\<[operations.GetTermsOfServiceTokenResponse](../../models/operations/gettermsofservicetokenresponse.md)\>**
|
|
1033
|
-
|
|
1034
|
-
### Errors
|
|
1035
|
-
|
|
1036
|
-
| Error Type | Status Code | Content Type |
|
|
1037
|
-
| --------------- | --------------- | --------------- |
|
|
1038
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|