|
10 | 10 | * @author Ted Spence <ted.spence@avalara.com> |
11 | 11 | * @copyright 2004-2018 Avalara, Inc. |
12 | 12 | * @license https://www.apache.org/licenses/LICENSE-2.0 |
13 | | - * @version 21.6.0 |
| 13 | + * @version 21.7.1 |
14 | 14 | * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK |
15 | 15 | */ |
16 | 16 |
|
@@ -42,7 +42,7 @@ export default class AvaTaxClient { |
42 | 42 | appName + |
43 | 43 | '; ' + |
44 | 44 | appVersion + |
45 | | - '; JavascriptSdk; 21.6.0; ' + |
| 45 | + '; JavascriptSdk; 21.7.1; ' + |
46 | 46 | machineName; |
47 | 47 | } |
48 | 48 |
|
@@ -85,24 +85,24 @@ export default class AvaTaxClient { |
85 | 85 | }, |
86 | 86 | body: JSON.stringify(payload) |
87 | 87 | })).then(res => { |
88 | | - var contentType = res.headers._headers['content-type'][0]; |
| 88 | + var contentType = res.headers._headers['content-type'][0]; |
89 | 89 |
|
90 | 90 | if (contentType === 'application/vnd.ms-excel' || contentType === 'text/csv') { |
91 | 91 | return res; |
92 | 92 | } |
93 | 93 | return res.json(); |
94 | 94 | }).then(json => { |
95 | | - // handle error |
96 | | - if (json.error) { |
97 | | - let ex = new Error(json.error.message); |
98 | | - ex.code = json.error.code; |
99 | | - ex.target = json.error.target; |
100 | | - ex.details = json.error.details; |
101 | | - throw ex; |
102 | | - } else { |
103 | | - return json; |
104 | | - } |
105 | | - }) |
| 95 | + // handle error |
| 96 | + if (json.error) { |
| 97 | + let ex = new Error(json.error.message); |
| 98 | + ex.code = json.error.code; |
| 99 | + ex.target = json.error.target; |
| 100 | + ex.details = json.error.details; |
| 101 | + throw ex; |
| 102 | + } else { |
| 103 | + return json; |
| 104 | + } |
| 105 | + }) |
106 | 106 | } |
107 | 107 |
|
108 | 108 | /** |
@@ -3289,6 +3289,31 @@ export default class AvaTaxClient { |
3289 | 3289 | return this.restCall({ url: path, verb: 'get', payload: null }); |
3290 | 3290 | } |
3291 | 3291 |
|
| 3292 | + /** |
| 3293 | + * List all market place locations. |
| 3294 | + * |
| 3295 | + * List all market place locations. |
| 3296 | + * |
| 3297 | + * |
| 3298 | + * @param string filter A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/). |
| 3299 | + * @param int top If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. |
| 3300 | + * @param int skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. |
| 3301 | + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. |
| 3302 | + * @return FetchResult |
| 3303 | + */ |
| 3304 | + listAllMarketplaceLocations({ filter, top, skip, orderBy } = {}) { |
| 3305 | + var path = this.buildUrl({ |
| 3306 | + url: `/api/v2/definitions/listallmarketplacelocations`, |
| 3307 | + parameters: { |
| 3308 | + $filter: filter, |
| 3309 | + $top: top, |
| 3310 | + $skip: skip, |
| 3311 | + $orderBy: orderBy |
| 3312 | + } |
| 3313 | + }); |
| 3314 | + return this.restCall({ url: path, verb: 'get', payload: null }); |
| 3315 | + } |
| 3316 | + |
3292 | 3317 | /** |
3293 | 3318 | * Retrieve the full list of the AvaFile Forms available |
3294 | 3319 | * |
@@ -6196,6 +6221,7 @@ export default class AvaTaxClient { |
6196 | 6221 | * |
6197 | 6222 | * * Parameters |
6198 | 6223 | * * Classifications |
| 6224 | + * * Tags |
6199 | 6225 | * |
6200 | 6226 | * ### Security Policies |
6201 | 6227 | * |
@@ -8375,6 +8401,25 @@ export default class AvaTaxClient { |
8375 | 8401 | return this.restCall({ url: path, verb: 'delete', payload: null }); |
8376 | 8402 | } |
8377 | 8403 |
|
| 8404 | + /** |
| 8405 | + * Retrieve List of Accounts by Account Migration Status |
| 8406 | + * |
| 8407 | + * ### Security Policies |
| 8408 | + * |
| 8409 | + * * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. |
| 8410 | + * |
| 8411 | + * |
| 8412 | + * @param string writeMode (See TssAccountMigrationId::* for a list of allowable values) |
| 8413 | + * @return object |
| 8414 | + */ |
| 8415 | + listAccountsByTssWriteMode({ writeMode } = {}) { |
| 8416 | + var path = this.buildUrl({ |
| 8417 | + url: `/api/v2/accounts/ListAccountsByTssWriteMode/${writeMode}`, |
| 8418 | + parameters: {} |
| 8419 | + }); |
| 8420 | + return this.restCall({ url: path, verb: 'get', payload: null }); |
| 8421 | + } |
| 8422 | + |
8378 | 8423 | /** |
8379 | 8424 | * Reset a user's password programmatically |
8380 | 8425 | * |
|
0 commit comments