Skip to content

Commit

Permalink
Merge pull request #279 from avadev/23.6.1
Browse files Browse the repository at this point in the history
Update for 23.6.1
  • Loading branch information
svc-developer authored Jun 15, 2023
2 parents 3ddeb2e + bbc9bb4 commit dee5c73
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 105 deletions.
107 changes: 3 additions & 104 deletions lib/AvaTaxClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @author Sachin Baijal <sachin.baijal@avalara.com>
* @copyright 2004-2018 Avalara, Inc.
* @license https://www.apache.org/licenses/LICENSE-2.0
* @version 23.5.0
* @version 23.6.1
* @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK
*/

Expand Down Expand Up @@ -50,7 +50,7 @@ export default class AvaTaxClient {
public auth: string;
public customHttpAgent: https.Agent;
public enableStrictTypeConversion: boolean;
private apiVersion: string = '23.5.0';
private apiVersion: string = '23.6.1';
private logger: Logger;
/**
* Construct a new AvaTaxClient
Expand Down Expand Up @@ -8164,7 +8164,7 @@ export default class AvaTaxClient {
*
* @param {number} companyId The company id.
* @param {number} itemId The item id.
* @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:* productCode, systemCode
* @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:* productCode, systemCode, IsPremium
* @param {number} 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.
* @param {number} skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
* @param {string} orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
Expand Down Expand Up @@ -10839,41 +10839,6 @@ export default class AvaTaxClient {
return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Array<Models.NotificationModel>);
}

/**
* Create Avalara-supported subscription (ServiceTypes)
* For Registrar Use Only
* This API is for use by Avalara Registrar administrative users only.
*
* Create one service/subscription object.
*
* Returns the newly created Avalara-supported subscription (service) type.
* This API is intended to be useful for adding new Avalara-supported subscription type (service type).
* You may always contact Avalara's sales department for information on available products or services.
*
* ### Security Policies
*
* * This API requires one of the following user roles: BatchServiceAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
* Swagger Name: AvaTaxClient
*
*
* @param {Models.SubscriptionTypeModel} model The subscription type object you wish to create.
* @return {Models.SubscriptionTypeModel}
*/

createServiceTypes({ model }: { model: Models.SubscriptionTypeModel }): Promise<Models.SubscriptionTypeModel> {
var path = this.buildUrl({
url: `/api/v2/servicetypes`,
parameters: {}
});
var strClientId =
this.appNM +
'; ' +
this.appVer +
'; JavascriptSdk; ' + this.apiVersion + '; ' +
this.machineNM;
return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.SubscriptionTypeModel);
}

/**
* Create a new subscription
* This API is for use by Avalara Registrar administrative users only.
Expand Down Expand Up @@ -10977,38 +10942,6 @@ export default class AvaTaxClient {
return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array<Models.ErrorDetail>);
}

/**
* Delete a single Subscription (ServiceTypes) object
* For Registrar Use Only
* This API is for use by Avalara Registrar administrative users only.
*
* Marks the Subscription (ServiceTypes) object identified by this URL as deleted.
* This API is useful for deleting an existing Avalara-supported subscription type (service type).
*
* ### Security Policies
*
* * This API requires one of the following user roles: BatchServiceAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
* Swagger Name: AvaTaxClient
*
*
* @param {number} id The unique ID number of the Subscription object you wish to delete.
* @return {Models.ErrorDetail[]}
*/

deleteServiceType({ id }: { id: number }): Promise<Array<Models.ErrorDetail>> {
var path = this.buildUrl({
url: `/api/v2/servicetypes/${id}`,
parameters: {}
});
var strClientId =
this.appNM +
'; ' +
this.appVer +
'; JavascriptSdk; ' + this.apiVersion + '; ' +
this.machineNM;
return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array<Models.ErrorDetail>);
}

/**
* Delete a single subscription
* # For Registrar Use Only
Expand Down Expand Up @@ -11192,40 +11125,6 @@ export default class AvaTaxClient {
return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.NotificationModel);
}

/**
* Update existing Avalara-supported subscription (ServiceTypes)
* For Registrar Use Only
* This API is for use by Avalara Registrar administrative users only.
*
* Returns the updated Avalara-supported service types.
* This API is intended to be useful for updating an existing subscription(service) type detail.
* You may always contact Avalara's sales department for information on available products or services.
*
* ### Security Policies
*
* * This API requires one of the following user roles: BatchServiceAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
* Swagger Name: AvaTaxClient
*
*
* @param {number} id The unique ID number of the existing subscription type object to replace.
* @param {Models.SubscriptionTypeModel} model The subscription type object to update.
* @return {Models.SubscriptionTypeModel}
*/

updateServiceType({ id, model }: { id: number, model: Models.SubscriptionTypeModel }): Promise<Models.SubscriptionTypeModel> {
var path = this.buildUrl({
url: `/api/v2/servicetypes/${id}`,
parameters: {}
});
var strClientId =
this.appNM +
'; ' +
this.appVer +
'; JavascriptSdk; ' + this.apiVersion + '; ' +
this.machineNM;
return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.SubscriptionTypeModel);
}

/**
* Update a single subscription
* # For Registrar Use Only
Expand Down
9 changes: 9 additions & 0 deletions lib/enums/DeliveryTerms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ import { JsonConverter, JsonCustomConvert } from "json2typescript";
export enum DeliveryTerms {
DAP = 1,
DDP = 2,
FOB = 3,
FCA = 4,
FAS = 5,
EXW = 6,
DPU = 7,
CPT = 8,
CIP = 9,
CIF = 10,
CFR = 11,
}

@JsonConverter
Expand Down
1 change: 1 addition & 0 deletions lib/enums/ErrorCodeId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ import { JsonConverter, JsonCustomConvert } from "json2typescript";
InvalidSystemCode = 1735,
NoItemsForClassification = 1736,
InvalidFileName = 1737,
NoClassificationForSameHsCode = 1738,
UnsupportedFileFormat = 1800,
UnsupportedOutputFileType = 1801,
TaxProfileNotProvided = 1900,
Expand Down
6 changes: 6 additions & 0 deletions lib/models/ClassificationModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,10 @@ import { DateConverter } from "../utils/dateConverter";
*/
@JsonProperty("systemCode", String, true)
systemCode?: string | undefined = undefined;
/**
* @type {boolean}
* @memberof ClassificationModel
*/
@JsonProperty("isPremium", Boolean, true)
isPremium?: boolean | undefined = undefined;
}
6 changes: 6 additions & 0 deletions lib/models/ItemClassificationOutputModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,10 @@ import { DateConverter } from "../utils/dateConverter";
*/
@JsonProperty("systemCode", String, true)
systemCode?: string | undefined = undefined;
/**
* @type {boolean}
* @memberof ItemClassificationOutputModel
*/
@JsonProperty("isPremium", Boolean, true)
isPremium?: boolean | undefined = undefined;
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "avatax",
"version": "23.5.0",
"version": "23.6.1",
"description": "AvaTax v2 SDK for languages using JavaScript",
"main": "index.js",
"types": "index.d.ts",
Expand Down

0 comments on commit dee5c73

Please sign in to comment.