Skip to content

Commit ffe9e03

Browse files
Merge pull request #187 from avadev/21.7.1-new
21.7.1 update
2 parents 1c9b295 + 61456e4 commit ffe9e03

File tree

2 files changed

+60
-15
lines changed

2 files changed

+60
-15
lines changed

lib/AvaTaxClient.js

Lines changed: 59 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @author Ted Spence <ted.spence@avalara.com>
1111
* @copyright 2004-2018 Avalara, Inc.
1212
* @license https://www.apache.org/licenses/LICENSE-2.0
13-
* @version 21.6.0
13+
* @version 21.7.1
1414
* @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK
1515
*/
1616

@@ -42,7 +42,7 @@ export default class AvaTaxClient {
4242
appName +
4343
'; ' +
4444
appVersion +
45-
'; JavascriptSdk; 21.6.0; ' +
45+
'; JavascriptSdk; 21.7.1; ' +
4646
machineName;
4747
}
4848

@@ -85,24 +85,24 @@ export default class AvaTaxClient {
8585
},
8686
body: JSON.stringify(payload)
8787
})).then(res => {
88-
var contentType = res.headers._headers['content-type'][0];
88+
var contentType = res.headers._headers['content-type'][0];
8989

9090
if (contentType === 'application/vnd.ms-excel' || contentType === 'text/csv') {
9191
return res;
9292
}
9393
return res.json();
9494
}).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+
})
106106
}
107107

108108
/**
@@ -3289,6 +3289,31 @@ export default class AvaTaxClient {
32893289
return this.restCall({ url: path, verb: 'get', payload: null });
32903290
}
32913291

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+
32923317
/**
32933318
* Retrieve the full list of the AvaFile Forms available
32943319
*
@@ -6196,6 +6221,7 @@ export default class AvaTaxClient {
61966221
*
61976222
* * Parameters
61986223
* * Classifications
6224+
* * Tags
61996225
*
62006226
* ### Security Policies
62016227
*
@@ -8375,6 +8401,25 @@ export default class AvaTaxClient {
83758401
return this.restCall({ url: path, verb: 'delete', payload: null });
83768402
}
83778403

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+
83788423
/**
83798424
* Reset a user's password programmatically
83808425
*

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "avatax",
3-
"version": "21.6.0",
3+
"version": "21.7.1",
44
"description": "AvaTax v2 SDK for languages using JavaScript",
55
"main": "index.js",
66
"homepage": "https://github.com/avadev/AvaTax-REST-V2-JS-SDK",

0 commit comments

Comments
 (0)