Skip to content

Commit ac5528e

Browse files
Merge pull request #191 from avadev/21.8.0
Update for 21.8.0
2 parents 46da50c + 8dc4894 commit ac5528e

File tree

2 files changed

+21
-17
lines changed

2 files changed

+21
-17
lines changed

lib/AvaTaxClient.js

Lines changed: 20 additions & 16 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.7.1
13+
* @version 21.8.0
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.7.1; ' +
45+
'; JavascriptSdk; 21.8.0; ' +
4646
machineName;
4747
}
4848

@@ -85,7 +85,7 @@ 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;
@@ -763,7 +763,7 @@ export default class AvaTaxClient {
763763
*
764764
* Marks the in progress batch identified by this URL as cancelled.
765765
*
766-
* Only JSON batches can be cancelled.If you attempt to cancel a file batch, you will receive an error message.
766+
* Only JSON batches can be cancelled. If you attempt to cancel a file batch, you will receive an error message.
767767
*
768768
* Only in progress batches can be cancelled. If you attempt to cancel a batch that its status is not Waiting or Processing, you will receive an error message.
769769
* Cancelling an in progress batch does not delete any transactions that were created before the cancellation.
@@ -2260,7 +2260,7 @@ export default class AvaTaxClient {
22602260
*
22612261
* @return FetchResult
22622262
*/
2263-
listMrsCompanies() {
2263+
listMrsCompanies({ } = {}) {
22642264
var path = this.buildUrl({
22652265
url: `/api/v2/companies/mrs`,
22662266
parameters: {}
@@ -3658,7 +3658,7 @@ export default class AvaTaxClient {
36583658
*
36593659
* @return FetchResult
36603660
*/
3661-
listCrossBorderSections() {
3661+
listCrossBorderSections({ } = {}) {
36623662
var path = this.buildUrl({
36633663
url: `/api/v2/definitions/crossborder/sections`,
36643664
parameters: {}
@@ -3932,7 +3932,7 @@ export default class AvaTaxClient {
39323932
* This API is intended to be useful if your user interface needs to display a selectable list of nexus.
39333933
*
39343934
*
3935-
* @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/).<br />*Not filterable:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters, taxableNexus
3935+
* @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/).<br />*Not filterable:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters, taxableNexus
39363936
* @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.
39373937
* @param int skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
39383938
* @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
@@ -3968,7 +3968,7 @@ export default class AvaTaxClient {
39683968
* @param string region Name or ISO 3166 code identifying the region portion of the address. This field supports many different region identifiers: * Two and three character ISO 3166 region codes * Fully spelled out names of the region in ISO supported languages * Common alternative spellings for many regions For a full list of all supported codes and names, please see the Definitions API `ListRegions`.
39693969
* @param string postalCode The postal code or zip code portion of this address.
39703970
* @param string country Name or ISO 3166 code identifying the country portion of this address. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`.
3971-
* @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/).<br />*Not filterable:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters, taxableNexus
3971+
* @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/).<br />*Not filterable:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters, taxableNexus
39723972
* @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.
39733973
* @param int skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
39743974
* @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
@@ -4003,7 +4003,7 @@ export default class AvaTaxClient {
40034003
*
40044004
*
40054005
* @param string country The country in which you want to fetch the system nexus
4006-
* @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/).<br />*Not filterable:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters, taxableNexus
4006+
* @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/).<br />*Not filterable:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters, taxableNexus
40074007
* @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.
40084008
* @param int skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
40094009
* @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
@@ -4032,7 +4032,7 @@ export default class AvaTaxClient {
40324032
*
40334033
* @param string country The two-character ISO-3166 code for the country.
40344034
* @param string region The two or three character region code for the region.
4035-
* @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/).<br />*Not filterable:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters, taxableNexus
4035+
* @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/).<br />*Not filterable:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters, taxableNexus
40364036
* @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.
40374037
* @param int skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
40384038
* @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
@@ -6217,6 +6217,8 @@ export default class AvaTaxClient {
62176217
*
62186218
* Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
62196219
*
6220+
* You may specify Tag Name in the `tagName` query parameter if you want to filter items on the basis of tagName
6221+
*
62206222
* You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
62216223
*
62226224
* * Parameters
@@ -6234,17 +6236,19 @@ export default class AvaTaxClient {
62346236
* @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.
62356237
* @param int skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
62366238
* @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
6239+
* @param string tagName Tag Name on the basis of which you want to filter Items
62376240
* @return FetchResult
62386241
*/
6239-
listItemsByCompany({ companyId, filter, include, top, skip, orderBy } = {}) {
6242+
listItemsByCompany({ companyId, filter, include, top, skip, orderBy, tagName } = {}) {
62406243
var path = this.buildUrl({
62416244
url: `/api/v2/companies/${companyId}/items`,
62426245
parameters: {
62436246
$filter: filter,
62446247
$include: include,
62456248
$top: top,
62466249
$skip: skip,
6247-
$orderBy: orderBy
6250+
$orderBy: orderBy,
6251+
tagName: tagName
62486252
}
62496253
});
62506254
return this.restCall({ url: path, verb: 'get', payload: null });
@@ -7815,7 +7819,7 @@ export default class AvaTaxClient {
78157819
*
78167820
*
78177821
* @param int companyId The ID of the company that owns these nexus objects
7818-
* @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/).<br />*Not filterable:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters, taxableNexus
7822+
* @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/).<br />*Not filterable:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters, taxableNexus
78197823
* @param string include A comma separated list of additional data to retrieve.
78207824
* @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.
78217825
* @param int skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
@@ -7895,7 +7899,7 @@ export default class AvaTaxClient {
78957899
* * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
78967900
*
78977901
*
7898-
* @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/).<br />*Not filterable:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters, taxableNexus
7902+
* @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/).<br />*Not filterable:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters, taxableNexus
78997903
* @param string include A comma separated list of additional data to retrieve.
79007904
* @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.
79017905
* @param int skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
@@ -11201,7 +11205,7 @@ export default class AvaTaxClient {
1120111205
*
1120211206
* @return FetchResult
1120311207
*/
11204-
listMySubscriptions() {
11208+
listMySubscriptions({ } = {}) {
1120511209
var path = this.buildUrl({
1120611210
url: `/api/v2/utilities/subscriptions`,
1120711211
parameters: {}
@@ -11236,7 +11240,7 @@ export default class AvaTaxClient {
1123611240
*
1123711241
* @return object
1123811242
*/
11239-
ping() {
11243+
ping({ } = {}) {
1124011244
var path = this.buildUrl({
1124111245
url: `/api/v2/utilities/ping`,
1124211246
parameters: {}

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.7.1",
3+
"version": "21.8.0",
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)