From cb6932179c78d51fa1f53e5e5abb45ccd5fcb62e Mon Sep 17 00:00:00 2001 From: svc-developer Date: Thu, 13 Jun 2024 16:49:37 +0000 Subject: [PATCH] 24.6.1 --- lib/AvaTaxClient.ts | 448 ++++++++++++------ lib/enums/APStatus.ts | 26 +- lib/enums/BatchType.ts | 1 + lib/enums/ErrorCodeId.ts | 4 + .../ClassificationParameterUsageMapModel.ts | 6 + lib/models/FilterModel.ts | 33 ++ lib/models/GLAccountBulkUploadInputModel.ts | 34 ++ lib/models/GLAccountBulkUploadOutputModel.ts | 40 ++ lib/models/GLAccountRequestModel.ts | 58 +++ lib/models/GLAccountSuccessResponseModel.ts | 77 +++ lib/models/GLAccountUploadErrorModel.ts | 45 ++ lib/models/ItemCatalogueInputModel.ts | 14 +- lib/models/ItemModel.ts | 26 + lib/models/ItemStatusModel.ts | 39 ++ lib/models/ItemStatusOutputModel.ts | 39 ++ ...mTaxCodeClassificationRequestInputModel.ts | 12 - .../ItemTaxCodeRecommendationStatusModel.ts | 39 ++ lib/models/ParameterModel.ts | 6 + lib/models/ParameterUsageModel.ts | 6 + lib/models/ResourceFileUploadRequestModel.ts | 6 - lib/models/ReturnsParameterUsageModel.ts | 6 + .../TaxCodeRecommendationStatusOutputModel.ts | 39 ++ .../TaxCodeRecommendationsOutputModel.ts | 39 ++ lib/models/index.ts | 17 +- package.json | 2 +- 25 files changed, 888 insertions(+), 174 deletions(-) create mode 100644 lib/models/FilterModel.ts create mode 100644 lib/models/GLAccountBulkUploadInputModel.ts create mode 100644 lib/models/GLAccountBulkUploadOutputModel.ts create mode 100644 lib/models/GLAccountRequestModel.ts create mode 100644 lib/models/GLAccountSuccessResponseModel.ts create mode 100644 lib/models/GLAccountUploadErrorModel.ts create mode 100644 lib/models/ItemStatusModel.ts create mode 100644 lib/models/ItemStatusOutputModel.ts create mode 100644 lib/models/ItemTaxCodeRecommendationStatusModel.ts create mode 100644 lib/models/TaxCodeRecommendationStatusOutputModel.ts create mode 100644 lib/models/TaxCodeRecommendationsOutputModel.ts diff --git a/lib/AvaTaxClient.ts b/lib/AvaTaxClient.ts index 311a612..27a9743 100644 --- a/lib/AvaTaxClient.ts +++ b/lib/AvaTaxClient.ts @@ -10,7 +10,7 @@ * @author Sachin Baijal * @copyright 2004-2018 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version 24.4.2 + * @version 24.6.1 * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK */ @@ -50,7 +50,7 @@ export default class AvaTaxClient { public auth: string; public customHttpAgent: https.Agent; public enableStrictTypeConversion: boolean; - private apiVersion: string = '24.4.2'; + private apiVersion: string = '24.6.1'; private logger: Logger; /** * Construct a new AvaTaxClient @@ -4724,7 +4724,7 @@ export default class AvaTaxClient { * Swagger Name: AvaTaxClient * * - * @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/).
*Not filterable:* values + * @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/).
*Not filterable:* attributeSubType, values * @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`. @@ -5103,6 +5103,56 @@ export default class AvaTaxClient { return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); } + /** + * List of all recommendation status which can be assigned to an item + * ### Security Policies + * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * + * + * @return {Models.ItemTaxCodeRecommendationStatusModel[]} + */ + + listItemsRecommendationsStatus(): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/items/recommendationstatus`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Array); + } + + /** + * List of all possible status which can be assigned to an item + * ### Security Policies + * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * + * + * @return {Models.ItemStatusModel[]} + */ + + listItemsStatus(): Promise> { + var path = this.buildUrl({ + url: `/api/v2/definitions/items/status`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Array); + } + /** * List jurisdictions based on the filter provided * Returns a list of all Avalara-supported taxing jurisdictions. @@ -5990,7 +6040,7 @@ export default class AvaTaxClient { * Swagger Name: AvaTaxClient * * - * @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/).
*Not filterable:* serviceTypes, regularExpression, values + * @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/).
*Not filterable:* serviceTypes, regularExpression, attributeSubType, values * @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`. @@ -6023,7 +6073,7 @@ export default class AvaTaxClient { * * * @param {number} accountId The ID of the account to retrieve the parameters. - * @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/).
*Not filterable:* serviceTypes, regularExpression, values + * @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/).
*Not filterable:* serviceTypes, regularExpression, attributeSubType, values * @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`. @@ -6074,7 +6124,7 @@ export default class AvaTaxClient { * * @param {string} companyCode Company code. * @param {string} itemCode Item code. - * @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/).
*Not filterable:* serviceTypes, regularExpression, values + * @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/).
*Not filterable:* serviceTypes, regularExpression, attributeSubType, values * @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`. @@ -6108,7 +6158,7 @@ export default class AvaTaxClient { * Swagger Name: AvaTaxClient * * - * @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/).
*Not filterable:* values, valueDescriptions + * @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/).
*Not filterable:* attributeSubType, values, valueDescriptions * @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`. @@ -6497,39 +6547,6 @@ export default class AvaTaxClient { return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); } - /** - * Retrieve the full list of Avalara-supported resource file types - * Returns the full list of Avalara-supported resource file types - * This API is intended to be useful to identify all the different resource file types. - * Swagger Name: AvaTaxClient - * - * - * @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/). - * @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`. - * @return {FetchResult} - */ - - listResourceFileTypes({ filter, top, skip, orderBy }: { filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/definitions/resourcefiletypes`, - parameters: { - $filter: filter, - $top: top, - $skip: skip, - $orderBy: orderBy - } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; - return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - /** * Retrieve the full list of Avalara-supported usage of parameters used for returns. * Returns the full list of Avalara-supported usage of extra parameters for the returns. @@ -6538,7 +6555,7 @@ export default class AvaTaxClient { * Swagger Name: AvaTaxClient * * - * @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/).
*Not filterable:* values + * @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/).
*Not filterable:* attributeSubType, values * @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`. @@ -7820,6 +7837,169 @@ export default class AvaTaxClient { return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.FundingStatusModel); } + /** + * Bulk upload GL accounts + * Allows a bulk upload of GL accounts for the specified company. Use the companyid path parameter to identify the company for which the GL accounts should be uploaded. + * Swagger Name: AvaTaxClient + * + * + * @param {number} companyid The ID of the company that owns this GL account object + * @param {Models.GLAccountBulkUploadInputModel} model The GL account bulk upload model. + * @return {Models.GLAccountBulkUploadOutputModel} + */ + + bulkUploadGLAccounts({ companyid, model }: { companyid: number, model?: Models.GLAccountBulkUploadInputModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyid}/glaccounts/$upload`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.GLAccountBulkUploadOutputModel); + } + + /** + * Create a new GL account + * Creates one or more new GL account objects attached to this company. + * + * A GL account is a general ledger account that can be passed to transactions at the line level to apply the multiple rules of the transactions, including exemptions, allocations, etc. to a specific general ledger. + * Swagger Name: AvaTaxClient + * + * + * @param {number} companyid The ID of the company that owns this GL Account object + * @param {Models.GLAccountRequestModel} model The GL Account you want to create + * @return {Models.GLAccountSuccessResponseModel} + */ + + createGLAccount({ companyid, model }: { companyid: number, model?: Models.GLAccountRequestModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyid}/glaccounts`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, Models.GLAccountSuccessResponseModel); + } + + /** + * Delete the GL account associated with the given company ID and GL account ID + * Deletes the GL account associated with the specified `glaccountid` and `companyid` + * Swagger Name: AvaTaxClient + * + * + * @param {number} companyid The ID of the company that owns this GL account object + * @param {number} glaccountid The primary key of this GL account + * @return {Models.TaxProfileErrorResponseModel} + */ + + deleteGLAccount({ companyid, glaccountid }: { companyid: number, glaccountid: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyid}/glaccounts/${glaccountid}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Models.TaxProfileErrorResponseModel); + } + + /** + * Retrieve a single GL account + * Retrieve details of a single GL account identified by its `glaccountid` and `companyid` + * Swagger Name: AvaTaxClient + * + * + * @param {number} companyid The ID of the company that owns this GL account object + * @param {number} glaccountid The primary key of this GL account + * @return {Models.GLAccountSuccessResponseModel} + */ + + getGLAccountById({ companyid, glaccountid }: { companyid: number, glaccountid: number }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyid}/glaccounts/${glaccountid}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.GLAccountSuccessResponseModel); + } + + /** + * Retrieve GL accounts for this company + * Retrieves a list of GL accounts attached to this company. You can apply filters to retrieve specific records. + * Swagger Name: AvaTaxClient + * + * + * @param {number} companyid The ID of the company that owns these GL accounts + * @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/).
*Not filterable:* companyId, meta, defaultItem + * @param {string} include A comma separated list of objects to fetch underneath this company. Any object with a URL path underneath this company can be fetched by specifying its name. + * @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`. + * @return {FetchResult} + */ + + listGLAccountsByCompany({ companyid, filter, include, top, skip, orderBy }: { companyid: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyid}/glaccounts`, + parameters: { + $filter: filter, + $include: include, + $top: top, + $skip: skip, + $orderBy: orderBy + } + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); + } + + /** + * Update a single GL account + * Updates a single GL account owned by the company. Use the glaccountid path parameter to identify the GL account to update. + * Swagger Name: AvaTaxClient + * + * + * @param {number} companyid The ID of the company that owns this GL Account object + * @param {number} glaccountid The primary key of this GL Account + * @param {Models.GLAccountRequestModel} model The GL account object you want to update + * @return {Models.GLAccountSuccessResponseModel} + */ + + updateGLAccount({ companyid, glaccountid, model }: { companyid: number, glaccountid: number, model?: Models.GLAccountRequestModel }): Promise { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyid}/glaccounts/${glaccountid}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }, Models.GLAccountSuccessResponseModel); + } + /** * Delete all classifications for an item * Delete all the classifications for a given item. @@ -8020,14 +8200,17 @@ export default class AvaTaxClient { * * * @param {number} companyId The ID of the company that owns this item. + * @param {boolean} processRecommendationsSynchronously If true then Indix api will be called synchronously to get tax code recommendations. * @param {Models.ItemModel[]} model The item you wish to create. * @return {Models.ItemModel[]} */ - createItems({ companyId, model }: { companyId: number, model: Models.ItemModel[] }): Promise> { + createItems({ companyId, processRecommendationsSynchronously, model }: { companyId: number, processRecommendationsSynchronously?: boolean, model: Models.ItemModel[] }): Promise> { var path = this.buildUrl({ url: `/api/v2/companies/${companyId}/items`, - parameters: {} + parameters: { + processRecommendationsSynchronously: processRecommendationsSynchronously + } }); var strClientId = this.appNM + @@ -8089,7 +8272,7 @@ export default class AvaTaxClient { * @return {Models.ItemTaxCodeClassificationRequestOutputModel} */ - createTaxCodeClassificationRequest({ companyId, model }: { companyId: number, model: Models.ItemTaxCodeClassificationRequestInputModel }): Promise { + createTaxCodeClassificationRequest({ companyId, model }: { companyId: number, model?: Models.ItemTaxCodeClassificationRequestInputModel }): Promise { var path = this.buildUrl({ url: `/api/v2/companies/${companyId}/classificationrequests/taxcode`, parameters: {} @@ -8316,51 +8499,6 @@ export default class AvaTaxClient { return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }, Array); } - /** - * Get status of classification requests of a company - * Get status of tax code classification requests of a company. - * - * Avalara AvaTax system tax codes represent various goods and services classified by industry or consumer categories and - * major physical similarities. Taxability rules are associated with tax codes. Customers can map their Items to tax codes - * allowing them to take advantage of thousands of tax rules in the AvaTax engine resulting in accurate taxability determinations. - * - * Enable includeClassificationDetails flag to get details of classification request status. - * - * ### Security Policies - * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * - * - * @param {number} companyId The ID of the company that defined these items - * @param {boolean} includeClassificationDetails A boolean field to get detailed classification status. - * @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/).
*Not filterable:* classificationDetails, totalItems - * @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`. - * @return {FetchResult} - */ - - getClassificationStatus({ companyId, includeClassificationDetails, filter, top, skip, orderBy }: { companyId: number, includeClassificationDetails?: boolean, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/classificationrequests/taxcode`, - parameters: { - $includeClassificationDetails: includeClassificationDetails, - $filter: filter, - $top: top, - $skip: skip, - $orderBy: orderBy - } - }); - var strClientId = - this.appNM + - '; ' + - this.appVer + - '; JavascriptSdk; ' + this.apiVersion + '; ' + - this.machineNM; - return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); - } - /** * Retrieve a single item * Get the `Item` object identified by this URL. @@ -8508,17 +8646,8 @@ export default class AvaTaxClient { } /** - * Retrieve premium classification for a company's item based on its ItemCode and SystemCode. - * Retrieves the premium classification for an ItemCode and SystemCode. - * - * NOTE: If your item code contains any of these characters /, +, ?,",' ,% or #, please use the following encoding before making a request: - * * Replace '/' with '\_-ava2f-\_' For example: 'Item/Code' becomes 'Item_-ava2f-_Code' - * * Replace '+' with '\_-ava2b-\_' For example: 'Item+Code' becomes 'Item_-ava2b-_Code' - * * Replace '?' with '\_-ava3f-\_' For example: 'Item?Code' becomes 'Item_-ava3f-_Code' - * * Replace '%' with '\_-ava25-\_' For example: 'Item%Code' becomes 'Item_-ava25-_Code' - * * Replace '#' with '\_-ava23-\_' For example: 'Item#Code' becomes 'Item_-ava23-_Code' - * * Replace ''' with '\_-ava27-\_' For example: 'Item'Code' becomes 'Item_-ava27-_Code' - * * Replace '"' with '\_-ava22-\_' For example: 'Item"Code' becomes 'Item_-ava22-_Code' + * Get Item TaxCode Recommendations + * Provides at least three tax-code recommendations for the given company ID and item ID * * ### Security Policies * @@ -8526,15 +8655,14 @@ export default class AvaTaxClient { * Swagger Name: AvaTaxClient * * - * @param {number} companyId The ID of the company that owns this item object - * @param {string} itemCode The ItemCode of the item for which you want to retrieve premium classification - * @param {string} systemCode The SystemCode for which you want to retrieve premium classification - * @return {Models.ItemPremiumClassificationOutputModel} + * @param {number} companyId + * @param {number} itemId + * @return {Models.TaxCodeRecommendationsOutputModel} */ - getPremiumClassification({ companyId, itemCode, systemCode }: { companyId: number, itemCode: string, systemCode: string }): Promise { + getItemTaxCodeRecommendations({ companyId, itemId }: { companyId: number, itemId: number }): Promise { var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemCode}/premiumClassification/${systemCode}`, + url: `/api/v2/companies/${companyId}/items/${itemId}/taxcoderecommendations`, parameters: {} }); var strClientId = @@ -8543,16 +8671,21 @@ export default class AvaTaxClient { this.appVer + '; JavascriptSdk; ' + this.apiVersion + '; ' + this.machineNM; - return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.ItemPremiumClassificationOutputModel); + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.TaxCodeRecommendationsOutputModel); } /** - * Get tax code recommendations - * Get tax code recommendations. + * Retrieve premium classification for a company's item based on its ItemCode and SystemCode. + * Retrieves the premium classification for an ItemCode and SystemCode. * - * Avalara AvaTax system tax codes represent various goods and services classified by industry or consumer categories and - * major physical similarities. Taxability rules are associated with tax codes. Customers can map their Items to tax codes - * allowing them to take advantage of thousands of tax rules in the AvaTax engine resulting in accurate taxability determinations. + * NOTE: If your item code contains any of these characters /, +, ?,",' ,% or #, please use the following encoding before making a request: + * * Replace '/' with '\_-ava2f-\_' For example: 'Item/Code' becomes 'Item_-ava2f-_Code' + * * Replace '+' with '\_-ava2b-\_' For example: 'Item+Code' becomes 'Item_-ava2b-_Code' + * * Replace '?' with '\_-ava3f-\_' For example: 'Item?Code' becomes 'Item_-ava3f-_Code' + * * Replace '%' with '\_-ava25-\_' For example: 'Item%Code' becomes 'Item_-ava25-_Code' + * * Replace '#' with '\_-ava23-\_' For example: 'Item#Code' becomes 'Item_-ava23-_Code' + * * Replace ''' with '\_-ava27-\_' For example: 'Item'Code' becomes 'Item_-ava27-_Code' + * * Replace '"' with '\_-ava22-\_' For example: 'Item"Code' becomes 'Item_-ava22-_Code' * * ### Security Policies * @@ -8560,24 +8693,16 @@ export default class AvaTaxClient { * Swagger Name: AvaTaxClient * * - * @param {number} companyId The ID of the company that defined these items - * @param {number} requestId The ID of the classification request - * @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/).
*Not filterable:* recommendations, url - * @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`. - * @return {FetchResult} + * @param {number} companyId The ID of the company that owns this item object + * @param {string} itemCode The ItemCode of the item for which you want to retrieve premium classification + * @param {string} systemCode The SystemCode for which you want to retrieve premium classification + * @return {Models.ItemPremiumClassificationOutputModel} */ - getTaxCodeRecommendations({ companyId, requestId, filter, top, skip, orderBy }: { companyId: number, requestId: number, filter?: string, top?: number, skip?: number, orderBy?: string }): Promise> { + getPremiumClassification({ companyId, itemCode, systemCode }: { companyId: number, itemCode: string, systemCode: string }): Promise { var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/classificationrequests/taxcode/${requestId}/recommendations`, - parameters: { - $filter: filter, - $top: top, - $skip: skip, - $orderBy: orderBy - } + url: `/api/v2/companies/${companyId}/items/${itemCode}/premiumClassification/${systemCode}`, + parameters: {} }); var strClientId = this.appNM + @@ -8585,7 +8710,7 @@ export default class AvaTaxClient { this.appVer + '; JavascriptSdk; ' + this.apiVersion + '; ' + this.machineNM; - return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, Models.ItemPremiumClassificationOutputModel); } /** @@ -8742,6 +8867,10 @@ export default class AvaTaxClient { * * You may specify Tag Name in the `tagName` query parameter if you want to filter items on the basis of tagName * + * You may specify comma seperated item status in the `itemStatus` query parameter if you want to filter items on the basis of item status + * + * You may specify Tax Code recommendation status in the `taxCodeRecommendationStatus` query parameter if you want to filter items on the basis of tax code recommendation status + * * 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: * * * Parameters @@ -8756,16 +8885,18 @@ export default class AvaTaxClient { * * * @param {number} companyId The ID of the company that defined these items - * @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/).
*Not filterable:* taxCode, source, sourceEntityId, upc, classifications, parameters, tags, properties + * @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/).
*Not filterable:* taxCode, source, sourceEntityId, itemType, upc, summary, classifications, parameters, tags, properties, itemStatus, taxCodeRecommendationStatus * @param {string} include A comma separated list of additional data to retrieve. * @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`. - * @param {string} tagName Tag Name on the basis of which you want to filter Items + * @param {string} tagName Tag Name on the basis of which you want to filter Items + * @param {string} itemStatus A comma separated list of item status on the basis of which you want to filter Items + * @param {string} taxCodeRecommendationStatus Tax code recommendation status on the basis of which you want to filter Items * @return {FetchResult} */ - listItemsByCompany({ companyId, filter, include, top, skip, orderBy, tagName }: { companyId: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string, tagName?: string }): Promise> { + listItemsByCompany({ companyId, filter, include, top, skip, orderBy, tagName, itemStatus, taxCodeRecommendationStatus }: { companyId: number, filter?: string, include?: string, top?: number, skip?: number, orderBy?: string, tagName?: string, itemStatus?: string, taxCodeRecommendationStatus?: string }): Promise> { var path = this.buildUrl({ url: `/api/v2/companies/${companyId}/items`, parameters: { @@ -8774,7 +8905,9 @@ export default class AvaTaxClient { $top: top, $skip: skip, $orderBy: orderBy, - tagName: tagName + tagName: tagName, + itemStatus: itemStatus, + taxCodeRecommendationStatus: taxCodeRecommendationStatus } }); var strClientId = @@ -8806,7 +8939,7 @@ export default class AvaTaxClient { * Swagger Name: AvaTaxClient * * - * @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/).
*Not filterable:* taxCode, source, sourceEntityId, upc, classifications, parameters, tags, properties + * @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/).
*Not filterable:* taxCode, source, sourceEntityId, itemType, upc, summary, classifications, parameters, tags, properties, itemStatus, taxCodeRecommendationStatus * @param {string} include A comma separated list of additional data to retrieve. * @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. @@ -8834,6 +8967,53 @@ export default class AvaTaxClient { return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }, FetchResult); } + /** + * Retrieve items for this company based on System Code and filter criteria(optional) provided + * Retrieve items based on System Code + * + * Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you + * can provide `itemCode` values for each `CreateTransaction()` API call rather than specifying tax codes, parameters, descriptions, + * and other data fields. AvaTax will automatically look up each `itemCode` and apply the correct tax codes and parameters + * from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance + * team can manage your item catalog and adjust the tax behavior of items without having to modify your software. + * + * Search for specific objects by passing the `$filter` criteria in the body; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) . + * + * Paginate your results using the `$top`, `$skip`, and `$orderby` parameters. + * + * ### Security Policies + * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * + * + * @param {number} companyId The ID of the company that defined these items + * @param {string} systemCode System code on the basis of which you want to filter Items + * @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`. + * @param {Models.FilterModel} model A filter statement to select specific records, as defined by https://github.com/Microsoft/api-guidelines/blob/master/Guidelines.md#97-filtering . + * @return {FetchResult} + */ + + queryItemsBySystemCode({ companyId, systemCode, top, skip, orderBy, model }: { companyId: number, systemCode: string, top?: number, skip?: number, orderBy?: string, model?: Models.FilterModel }): Promise> { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/internal/bySystemCode/${systemCode}`, + parameters: { + $top: top, + $skip: skip, + $orderBy: orderBy + } + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ' + this.apiVersion + '; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }, FetchResult); + } + /** * Retrieve all items associated with given tag * Get multiple item objects associated with given tag. @@ -8856,7 +9036,7 @@ export default class AvaTaxClient { * * @param {number} companyId The ID of the company that defined these items. * @param {string} tag The master tag to be associated with item. - * @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/).
*Not filterable:* taxCode, source, sourceEntityId, upc, classifications, parameters, tags, properties + * @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/).
*Not filterable:* taxCode, source, sourceEntityId, itemType, upc, summary, classifications, parameters, tags, properties, itemStatus, taxCodeRecommendationStatus * @param {string} include A comma separated list of additional data to retrieve. * @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. diff --git a/lib/enums/APStatus.ts b/lib/enums/APStatus.ts index 3939e2a..15e711c 100644 --- a/lib/enums/APStatus.ts +++ b/lib/enums/APStatus.ts @@ -20,26 +20,30 @@ import { JsonConverter, JsonCustomConvert } from "json2typescript"; * @enum {string} */ export enum APStatus { - PayAsBilledMatch = 0, + NoAccrualMatch = 0, ShortPayItemsAccrueMatch = 1, MarkForReviewMatch = 2, RejectMatch = 3, - PayAsBilledNoAccrual = 4, - PayAsBilledAccrueUndercharge = 5, + NoAccrualUndercharge = 4, + AccruedUndercharge = 5, ShortPayItemsAccrueUndercharge = 6, - MarkForReviewUndercharge = 7, + NeedReviewUndercharge = 7, RejectUndercharge = 8, - PayAsBilledOvercharge = 9, + NoAccrualOvercharge = 9, ShortPayAvalaraCalculated = 10, ShortPayItemsAccrueOvercharge = 11, MarkForReviewOvercharge = 12, RejectOvercharge = 13, - AmountThresholdNotMet = 14, - CostCenterExempted = 15, - ItemExempted = 16, - TrustedVendor = 17, - AccruedByVendor = 18, - Ignored = 19, + NoAccrualAmountThresholdNotMet = 14, + NoAccrualExemptedCostCenter = 15, + NoAccrualExemptedItem = 16, + NoAccrualTrustedVendor = 17, + AccruedVendor = 18, + NeedReviewVendor = 19, + NoAccrualExemptedVendor = 20, + NoAccrualExemptedGLAccount = 21, + PendingAccrualVendor = 22, + PendingAccrualUndercharge = 23, } @JsonConverter diff --git a/lib/enums/BatchType.ts b/lib/enums/BatchType.ts index 66ab1a2..f1dc96a 100644 --- a/lib/enums/BatchType.ts +++ b/lib/enums/BatchType.ts @@ -36,6 +36,7 @@ import { JsonConverter, JsonCustomConvert } from "json2typescript"; CustomerSupplierImport = 13, VarianceImport = 14, CostCenterImport = 15, + GLAccountImport = 16, } @JsonConverter diff --git a/lib/enums/ErrorCodeId.ts b/lib/enums/ErrorCodeId.ts index ae3fb36..6c12301 100644 --- a/lib/enums/ErrorCodeId.ts +++ b/lib/enums/ErrorCodeId.ts @@ -322,6 +322,8 @@ import { JsonConverter, JsonCustomConvert } from "json2typescript"; NoClassificationForSameHsCode = 1738, InvalidValueError = 1739, ItemDualWriteParameterValueMismatchError = 1740, + DuplicateItemIdsInTaxCodeClassificationRequest = 1741, + TooManyItemIdsInTaxCodeClassificationRequest = 1742, UnsupportedFileFormat = 1800, UnsupportedOutputFileType = 1801, TaxProfileNotProvided = 1900, @@ -388,6 +390,8 @@ import { JsonConverter, JsonCustomConvert } from "json2typescript"; ContentNotFound = 2811, RegistrationNumberNotFound = 2812, InvalidCostCenter = 2813, + TooManyItemsInSyncFlowRequest = 2814, + InvalidTaxCodeIdInRecommendationStatusUpdate = 2815, InvalidHTTPHeader = 3000, } diff --git a/lib/models/ClassificationParameterUsageMapModel.ts b/lib/models/ClassificationParameterUsageMapModel.ts index 1b336cd..903d928 100644 --- a/lib/models/ClassificationParameterUsageMapModel.ts +++ b/lib/models/ClassificationParameterUsageMapModel.ts @@ -58,6 +58,12 @@ import { DateConverter } from "../utils/dateConverter"; * @type {string} * @memberof ClassificationParameterUsageMapModel */ + @JsonProperty("attributeSubType", String, true) + attributeSubType?: string | undefined = undefined; + /** + * @type {string} + * @memberof ClassificationParameterUsageMapModel + */ @JsonProperty("name", String, true) name?: string | undefined = undefined; /** diff --git a/lib/models/FilterModel.ts b/lib/models/FilterModel.ts new file mode 100644 index 0000000..c911c2c --- /dev/null +++ b/lib/models/FilterModel.ts @@ -0,0 +1,33 @@ +/* + * AvaTax Software Development Kit for JavaScript + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * @copyright 2004-2018 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK + */ + +import * as Enums from '../enums/index'; +import { JsonObject, JsonProperty } from "json2typescript"; +import { DateConverter } from "../utils/dateConverter"; + +/** + * Filter Model + * @export + * @class FilterModel + */ + @JsonObject("FilterModel") + export class FilterModel { + /** + * @type {string} + * @memberof FilterModel + */ + @JsonProperty("filter", String, true) + filter?: string | undefined = undefined; + } \ No newline at end of file diff --git a/lib/models/GLAccountBulkUploadInputModel.ts b/lib/models/GLAccountBulkUploadInputModel.ts new file mode 100644 index 0000000..8ca06ca --- /dev/null +++ b/lib/models/GLAccountBulkUploadInputModel.ts @@ -0,0 +1,34 @@ +/* + * AvaTax Software Development Kit for JavaScript + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * @copyright 2004-2018 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK + */ + +import * as Enums from '../enums/index'; +import { GLAccountRequestModel } from "./GLAccountRequestModel"; +import { JsonObject, JsonProperty } from "json2typescript"; +import { DateConverter } from "../utils/dateConverter"; + +/** + * Represents a bulk upload input model. + * @export + * @class GLAccountBulkUploadInputModel + */ + @JsonObject("GLAccountBulkUploadInputModel") + export class GLAccountBulkUploadInputModel { + /** + * @type {GLAccountRequestModel[]} + * @memberof GLAccountBulkUploadInputModel + */ + @JsonProperty("glAccounts", [GLAccountRequestModel], true) + glAccounts?: GLAccountRequestModel[] | undefined = undefined; + } \ No newline at end of file diff --git a/lib/models/GLAccountBulkUploadOutputModel.ts b/lib/models/GLAccountBulkUploadOutputModel.ts new file mode 100644 index 0000000..2273f61 --- /dev/null +++ b/lib/models/GLAccountBulkUploadOutputModel.ts @@ -0,0 +1,40 @@ +/* + * AvaTax Software Development Kit for JavaScript + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * @copyright 2004-2018 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK + */ + +import * as Enums from '../enums/index'; +import { GLAccountUploadErrorModel } from "./GLAccountUploadErrorModel"; +import { JsonObject, JsonProperty } from "json2typescript"; +import { DateConverter } from "../utils/dateConverter"; + +/** + * Represents a bulk upload response model. + * @export + * @class GLAccountBulkUploadOutputModel + */ + @JsonObject("GLAccountBulkUploadOutputModel") + export class GLAccountBulkUploadOutputModel { + /** + * @type {number} + * @memberof GLAccountBulkUploadOutputModel + */ + @JsonProperty("total", Number, true) + total?: number | undefined = undefined; + /** + * @type {GLAccountUploadErrorModel[]} + * @memberof GLAccountBulkUploadOutputModel + */ + @JsonProperty("failed", [GLAccountUploadErrorModel], true) + failed?: GLAccountUploadErrorModel[] | undefined = undefined; + } \ No newline at end of file diff --git a/lib/models/GLAccountRequestModel.ts b/lib/models/GLAccountRequestModel.ts new file mode 100644 index 0000000..3d65e6d --- /dev/null +++ b/lib/models/GLAccountRequestModel.ts @@ -0,0 +1,58 @@ +/* + * AvaTax Software Development Kit for JavaScript + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * @copyright 2004-2018 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK + */ + +import * as Enums from '../enums/index'; +import { Int64TaxProfileObjectReferenceModel } from "./Int64TaxProfileObjectReferenceModel"; +import { JsonObject, JsonProperty } from "json2typescript"; +import { DateConverter } from "../utils/dateConverter"; + +/** + * GL account request model + * @export + * @class GLAccountRequestModel + */ + @JsonObject("GLAccountRequestModel") + export class GLAccountRequestModel { + /** + * @type {string} + * @memberof GLAccountRequestModel + */ + @JsonProperty("entityUseCode", String, true) + entityUseCode?: string | undefined = undefined; + /** + * @type {Date} + * @memberof GLAccountRequestModel + */ + @JsonProperty("effectiveDate", DateConverter, true) + effectiveDate?: Date | undefined = undefined; + /** + * @type {Date} + * @memberof GLAccountRequestModel + */ + @JsonProperty("endDate", DateConverter, true) + endDate?: Date | undefined = undefined; + /** + * @type {Int64TaxProfileObjectReferenceModel} + * @memberof GLAccountRequestModel + */ + @JsonProperty("defaultItem", Int64TaxProfileObjectReferenceModel, true) + defaultItem?: Int64TaxProfileObjectReferenceModel | undefined = undefined; + /** + * @type {string} + * @memberof GLAccountRequestModel + */ + @JsonProperty("glAccountCode", String) + glAccountCode: string = undefined; + } \ No newline at end of file diff --git a/lib/models/GLAccountSuccessResponseModel.ts b/lib/models/GLAccountSuccessResponseModel.ts new file mode 100644 index 0000000..9544e46 --- /dev/null +++ b/lib/models/GLAccountSuccessResponseModel.ts @@ -0,0 +1,77 @@ +/* + * AvaTax Software Development Kit for JavaScript + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * @copyright 2004-2018 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK + */ + +import * as Enums from '../enums/index'; +import { TaxProfileMetaDataModel } from "./TaxProfileMetaDataModel"; +import { Int64TaxProfileObjectReferenceModel } from "./Int64TaxProfileObjectReferenceModel"; +import { JsonObject, JsonProperty } from "json2typescript"; +import { DateConverter } from "../utils/dateConverter"; + +/** + * GL account response model + * @export + * @class GLAccountSuccessResponseModel + */ + @JsonObject("GLAccountSuccessResponseModel") + export class GLAccountSuccessResponseModel { + /** + * @type {number} + * @memberof GLAccountSuccessResponseModel + */ + @JsonProperty("glAccountId", Number, true) + glAccountId?: number | undefined = undefined; + /** + * @type {number} + * @memberof GLAccountSuccessResponseModel + */ + @JsonProperty("companyId", Number, true) + companyId?: number | undefined = undefined; + /** + * @type {TaxProfileMetaDataModel} + * @memberof GLAccountSuccessResponseModel + */ + @JsonProperty("meta", TaxProfileMetaDataModel, true) + meta?: TaxProfileMetaDataModel | undefined = undefined; + /** + * @type {string} + * @memberof GLAccountSuccessResponseModel + */ + @JsonProperty("entityUseCode", String, true) + entityUseCode?: string | undefined = undefined; + /** + * @type {Date} + * @memberof GLAccountSuccessResponseModel + */ + @JsonProperty("effectiveDate", DateConverter, true) + effectiveDate?: Date | undefined = undefined; + /** + * @type {Date} + * @memberof GLAccountSuccessResponseModel + */ + @JsonProperty("endDate", DateConverter, true) + endDate?: Date | undefined = undefined; + /** + * @type {Int64TaxProfileObjectReferenceModel} + * @memberof GLAccountSuccessResponseModel + */ + @JsonProperty("defaultItem", Int64TaxProfileObjectReferenceModel, true) + defaultItem?: Int64TaxProfileObjectReferenceModel | undefined = undefined; + /** + * @type {string} + * @memberof GLAccountSuccessResponseModel + */ + @JsonProperty("glAccountCode", String) + glAccountCode: string = undefined; + } \ No newline at end of file diff --git a/lib/models/GLAccountUploadErrorModel.ts b/lib/models/GLAccountUploadErrorModel.ts new file mode 100644 index 0000000..599b284 --- /dev/null +++ b/lib/models/GLAccountUploadErrorModel.ts @@ -0,0 +1,45 @@ +/* + * AvaTax Software Development Kit for JavaScript + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * @copyright 2004-2018 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK + */ + +import * as Enums from '../enums/index'; +import { JsonObject, JsonProperty } from "json2typescript"; +import { DateConverter } from "../utils/dateConverter"; + +/** + * Represents a GL account upload error model + * @export + * @class GLAccountUploadErrorModel + */ + @JsonObject("GLAccountUploadErrorModel") + export class GLAccountUploadErrorModel { + /** + * @type {number} + * @memberof GLAccountUploadErrorModel + */ + @JsonProperty("rowIndex", Number, true) + rowIndex?: number | undefined = undefined; + /** + * @type {string} + * @memberof GLAccountUploadErrorModel + */ + @JsonProperty("glAccountCode", String, true) + glAccountCode?: string | undefined = undefined; + /** + * @type {string[]} + * @memberof GLAccountUploadErrorModel + */ + @JsonProperty("errors", [String], true) + errors?: string[] | undefined = undefined; + } \ No newline at end of file diff --git a/lib/models/ItemCatalogueInputModel.ts b/lib/models/ItemCatalogueInputModel.ts index 49fbfa4..3220ef7 100644 --- a/lib/models/ItemCatalogueInputModel.ts +++ b/lib/models/ItemCatalogueInputModel.ts @@ -48,14 +48,14 @@ import { DateConverter } from "../utils/dateConverter"; * @type {string} * @memberof ItemCatalogueInputModel */ - @JsonProperty("summary", String, true) - summary?: string | undefined = undefined; + @JsonProperty("taxCode", String, true) + taxCode?: string | undefined = undefined; /** * @type {string} * @memberof ItemCatalogueInputModel */ - @JsonProperty("taxCode", String, true) - taxCode?: string | undefined = undefined; + @JsonProperty("itemType", String, true) + itemType?: string | undefined = undefined; /** * @type {string} * @memberof ItemCatalogueInputModel @@ -66,6 +66,12 @@ import { DateConverter } from "../utils/dateConverter"; * @type {string} * @memberof ItemCatalogueInputModel */ + @JsonProperty("summary", String, true) + summary?: string | undefined = undefined; + /** + * @type {string} + * @memberof ItemCatalogueInputModel + */ @JsonProperty("itemGroup", String, true) itemGroup?: string | undefined = undefined; /** diff --git a/lib/models/ItemModel.ts b/lib/models/ItemModel.ts index 1b7879c..335bb62 100644 --- a/lib/models/ItemModel.ts +++ b/lib/models/ItemModel.ts @@ -17,6 +17,8 @@ import * as Enums from '../enums/index'; import { ClassificationModel } from "./ClassificationModel"; import { ItemParameterModel } from "./ItemParameterModel"; import { ItemTagDetailInputModel } from "./ItemTagDetailInputModel"; +import { ItemStatusOutputModel } from "./ItemStatusOutputModel"; +import { TaxCodeRecommendationStatusOutputModel } from "./TaxCodeRecommendationStatusOutputModel"; import { JsonObject, JsonProperty } from "json2typescript"; import { DateConverter } from "../utils/dateConverter"; @@ -115,8 +117,20 @@ import { DateConverter } from "../utils/dateConverter"; * @type {string} * @memberof ItemModel */ + @JsonProperty("itemType", String, true) + itemType?: string | undefined = undefined; + /** + * @type {string} + * @memberof ItemModel + */ @JsonProperty("upc", String, true) upc?: string | undefined = undefined; + /** + * @type {string} + * @memberof ItemModel + */ + @JsonProperty("summary", String, true) + summary?: string | undefined = undefined; /** * @type {ClassificationModel[]} * @memberof ItemModel @@ -141,4 +155,16 @@ import { DateConverter } from "../utils/dateConverter"; */ @JsonProperty("properties", Object, true) properties?: object | undefined = undefined; + /** + * @type {ItemStatusOutputModel[]} + * @memberof ItemModel + */ + @JsonProperty("itemStatus", [ItemStatusOutputModel], true) + itemStatus?: ItemStatusOutputModel[] | undefined = undefined; + /** + * @type {TaxCodeRecommendationStatusOutputModel} + * @memberof ItemModel + */ + @JsonProperty("taxCodeRecommendationStatus", TaxCodeRecommendationStatusOutputModel, true) + taxCodeRecommendationStatus?: TaxCodeRecommendationStatusOutputModel | undefined = undefined; } \ No newline at end of file diff --git a/lib/models/ItemStatusModel.ts b/lib/models/ItemStatusModel.ts new file mode 100644 index 0000000..ab4b9a8 --- /dev/null +++ b/lib/models/ItemStatusModel.ts @@ -0,0 +1,39 @@ +/* + * AvaTax Software Development Kit for JavaScript + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * @copyright 2004-2018 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK + */ + +import * as Enums from '../enums/index'; +import { JsonObject, JsonProperty } from "json2typescript"; +import { DateConverter } from "../utils/dateConverter"; + +/** + * Status Output Model + * @export + * @class ItemStatusModel + */ + @JsonObject("ItemStatusModel") + export class ItemStatusModel { + /** + * @type {string} + * @memberof ItemStatusModel + */ + @JsonProperty("name", String, true) + name?: string | undefined = undefined; + /** + * @type {string} + * @memberof ItemStatusModel + */ + @JsonProperty("description", String, true) + description?: string | undefined = undefined; + } \ No newline at end of file diff --git a/lib/models/ItemStatusOutputModel.ts b/lib/models/ItemStatusOutputModel.ts new file mode 100644 index 0000000..c1eb107 --- /dev/null +++ b/lib/models/ItemStatusOutputModel.ts @@ -0,0 +1,39 @@ +/* + * AvaTax Software Development Kit for JavaScript + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * @copyright 2004-2018 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK + */ + +import * as Enums from '../enums/index'; +import { JsonObject, JsonProperty } from "json2typescript"; +import { DateConverter } from "../utils/dateConverter"; + +/** + * Output model for item status + * @export + * @class ItemStatusOutputModel + */ + @JsonObject("ItemStatusOutputModel") + export class ItemStatusOutputModel { + /** + * @type {string} + * @memberof ItemStatusOutputModel + */ + @JsonProperty("status", String, true) + status?: string | undefined = undefined; + /** + * @type {Date} + * @memberof ItemStatusOutputModel + */ + @JsonProperty("modifiedDate", DateConverter, true) + modifiedDate?: Date | undefined = undefined; + } \ No newline at end of file diff --git a/lib/models/ItemTaxCodeClassificationRequestInputModel.ts b/lib/models/ItemTaxCodeClassificationRequestInputModel.ts index 80dde38..c3db9f8 100644 --- a/lib/models/ItemTaxCodeClassificationRequestInputModel.ts +++ b/lib/models/ItemTaxCodeClassificationRequestInputModel.ts @@ -24,22 +24,10 @@ import { DateConverter } from "../utils/dateConverter"; */ @JsonObject("ItemTaxCodeClassificationRequestInputModel") export class ItemTaxCodeClassificationRequestInputModel { - /** - * @type {boolean} - * @memberof ItemTaxCodeClassificationRequestInputModel - */ - @JsonProperty("classifyAllItems", Boolean) - classifyAllItems: boolean = undefined; /** * @type {number[]} * @memberof ItemTaxCodeClassificationRequestInputModel */ @JsonProperty("itemIds", [Number], true) itemIds?: number[] | undefined = undefined; - /** - * @type {string[]} - * @memberof ItemTaxCodeClassificationRequestInputModel - */ - @JsonProperty("productCategories", [String]) - productCategories: string[] = undefined; } \ No newline at end of file diff --git a/lib/models/ItemTaxCodeRecommendationStatusModel.ts b/lib/models/ItemTaxCodeRecommendationStatusModel.ts new file mode 100644 index 0000000..6531349 --- /dev/null +++ b/lib/models/ItemTaxCodeRecommendationStatusModel.ts @@ -0,0 +1,39 @@ +/* + * AvaTax Software Development Kit for JavaScript + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * @copyright 2004-2018 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK + */ + +import * as Enums from '../enums/index'; +import { JsonObject, JsonProperty } from "json2typescript"; +import { DateConverter } from "../utils/dateConverter"; + +/** + * Status Output Model + * @export + * @class ItemTaxCodeRecommendationStatusModel + */ + @JsonObject("ItemTaxCodeRecommendationStatusModel") + export class ItemTaxCodeRecommendationStatusModel { + /** + * @type {string} + * @memberof ItemTaxCodeRecommendationStatusModel + */ + @JsonProperty("name", String, true) + name?: string | undefined = undefined; + /** + * @type {string} + * @memberof ItemTaxCodeRecommendationStatusModel + */ + @JsonProperty("description", String, true) + description?: string | undefined = undefined; + } \ No newline at end of file diff --git a/lib/models/ParameterModel.ts b/lib/models/ParameterModel.ts index eb6fc9d..ae87b2d 100644 --- a/lib/models/ParameterModel.ts +++ b/lib/models/ParameterModel.ts @@ -90,6 +90,12 @@ import { DateConverter } from "../utils/dateConverter"; */ @JsonProperty("attributeType", String, true) attributeType?: string | undefined = undefined; + /** + * @type {string} + * @memberof ParameterModel + */ + @JsonProperty("attributeSubType", String, true) + attributeSubType?: string | undefined = undefined; /** * @type {string[]} * @memberof ParameterModel diff --git a/lib/models/ParameterUsageModel.ts b/lib/models/ParameterUsageModel.ts index 5a308f5..49ab7a0 100644 --- a/lib/models/ParameterUsageModel.ts +++ b/lib/models/ParameterUsageModel.ts @@ -76,6 +76,12 @@ import { DateConverter } from "../utils/dateConverter"; * @type {string} * @memberof ParameterUsageModel */ + @JsonProperty("attributeSubType", String, true) + attributeSubType?: string | undefined = undefined; + /** + * @type {string} + * @memberof ParameterUsageModel + */ @JsonProperty("name", String, true) name?: string | undefined = undefined; /** diff --git a/lib/models/ResourceFileUploadRequestModel.ts b/lib/models/ResourceFileUploadRequestModel.ts index 2239418..656e2ed 100644 --- a/lib/models/ResourceFileUploadRequestModel.ts +++ b/lib/models/ResourceFileUploadRequestModel.ts @@ -58,12 +58,6 @@ import { DateConverter } from "../utils/dateConverter"; * @type {number} * @memberof ResourceFileUploadRequestModel */ - @JsonProperty("resourceFileTypeId", Number, true) - resourceFileTypeId?: number | undefined = undefined; - /** - * @type {number} - * @memberof ResourceFileUploadRequestModel - */ @JsonProperty("length", Number, true) length?: number | undefined = undefined; } \ No newline at end of file diff --git a/lib/models/ReturnsParameterUsageModel.ts b/lib/models/ReturnsParameterUsageModel.ts index 6a8da43..4c7f28c 100644 --- a/lib/models/ReturnsParameterUsageModel.ts +++ b/lib/models/ReturnsParameterUsageModel.ts @@ -58,6 +58,12 @@ import { DateConverter } from "../utils/dateConverter"; * @type {string} * @memberof ReturnsParameterUsageModel */ + @JsonProperty("attributeSubType", String, true) + attributeSubType?: string | undefined = undefined; + /** + * @type {string} + * @memberof ReturnsParameterUsageModel + */ @JsonProperty("name", String, true) name?: string | undefined = undefined; /** diff --git a/lib/models/TaxCodeRecommendationStatusOutputModel.ts b/lib/models/TaxCodeRecommendationStatusOutputModel.ts new file mode 100644 index 0000000..e593c96 --- /dev/null +++ b/lib/models/TaxCodeRecommendationStatusOutputModel.ts @@ -0,0 +1,39 @@ +/* + * AvaTax Software Development Kit for JavaScript + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * @copyright 2004-2018 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK + */ + +import * as Enums from '../enums/index'; +import { JsonObject, JsonProperty } from "json2typescript"; +import { DateConverter } from "../utils/dateConverter"; + +/** + * Output model for item tax code recommendation status + * @export + * @class TaxCodeRecommendationStatusOutputModel + */ + @JsonObject("TaxCodeRecommendationStatusOutputModel") + export class TaxCodeRecommendationStatusOutputModel { + /** + * @type {string} + * @memberof TaxCodeRecommendationStatusOutputModel + */ + @JsonProperty("status", String, true) + status?: string | undefined = undefined; + /** + * @type {string} + * @memberof TaxCodeRecommendationStatusOutputModel + */ + @JsonProperty("message", String, true) + message?: string | undefined = undefined; + } \ No newline at end of file diff --git a/lib/models/TaxCodeRecommendationsOutputModel.ts b/lib/models/TaxCodeRecommendationsOutputModel.ts new file mode 100644 index 0000000..efbf5db --- /dev/null +++ b/lib/models/TaxCodeRecommendationsOutputModel.ts @@ -0,0 +1,39 @@ +/* + * AvaTax Software Development Kit for JavaScript + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * @copyright 2004-2018 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK + */ + +import * as Enums from '../enums/index'; +import { JsonObject, JsonProperty } from "json2typescript"; +import { DateConverter } from "../utils/dateConverter"; + +/** + * Tax Code Recommendation Output Model + * @export + * @class TaxCodeRecommendationsOutputModel + */ + @JsonObject("TaxCodeRecommendationsOutputModel") + export class TaxCodeRecommendationsOutputModel { + /** + * @type {string} + * @memberof TaxCodeRecommendationsOutputModel + */ + @JsonProperty("taxCode", String, true) + taxCode?: string | undefined = undefined; + /** + * @type {string} + * @memberof TaxCodeRecommendationsOutputModel + */ + @JsonProperty("level", String, true) + level?: string | undefined = undefined; + } \ No newline at end of file diff --git a/lib/models/index.ts b/lib/models/index.ts index f28071b..3c6cb2f 100644 --- a/lib/models/index.ts +++ b/lib/models/index.ts @@ -61,7 +61,6 @@ export * from './CertExpressInvitationStatusModel'; export * from './CertificateAttributeModel'; export * from './CertificateModel'; export * from './ChangeTransactionCodeModel'; -export * from './ClassificationDetailsModel'; export * from './ClassificationModel'; export * from './ClassificationParameterUsageMapModel'; export * from './CombinedHSTConfigModel'; @@ -163,6 +162,7 @@ export * from './FilingsCheckupModel'; export * from './FilingsCheckupSuggestedFormModel'; export * from './FilingsTaxDetailsModel'; export * from './FilingsTaxSummaryModel'; +export * from './FilterModel'; export * from './FirmClientLinkageInputModel'; export * from './FirmClientLinkageOutputModel'; export * from './ForbiddenErrorResponse'; @@ -173,6 +173,11 @@ export * from './FundingConfigurationModel'; export * from './FundingESignMethodReturn'; export * from './FundingInitiateModel'; export * from './FundingStatusModel'; +export * from './GLAccountBulkUploadInputModel'; +export * from './GLAccountBulkUploadOutputModel'; +export * from './GLAccountRequestModel'; +export * from './GLAccountSuccessResponseModel'; +export * from './GLAccountUploadErrorModel'; export * from './HsCode'; export * from './HsCodeModel'; export * from './InspectResponseModel'; @@ -195,14 +200,14 @@ export * from './ItemPremiumClassificationInputModel'; export * from './ItemPremiumClassificationOutputModel'; export * from './ItemRestrictionInputModel'; export * from './ItemRestrictionOutputModel'; +export * from './ItemStatusModel'; +export * from './ItemStatusOutputModel'; export * from './ItemSyncModel'; export * from './ItemTagDetailInputModel'; export * from './ItemTagDetailOutputModel'; export * from './ItemTaxCodeClassificationRequestInputModel'; export * from './ItemTaxCodeClassificationRequestOutputModel'; -export * from './ItemTaxCodeClassificationRequestStatusOutputModel'; -export * from './ItemTaxCodeModel'; -export * from './ItemTaxCodeRecommendationsOutputModel'; +export * from './ItemTaxCodeRecommendationStatusModel'; export * from './ItemUploadErrorModel'; export * from './JurisNameModel'; export * from './JurisdictionHierarchyModel'; @@ -293,9 +298,7 @@ export * from './ReportModel'; export * from './ReportParametersModel'; export * from './ResetLicenseKeyModel'; export * from './ResourceFileDownloadResult'; -export * from './ResourceFileTypeModel'; export * from './ResourceFileUploadRequestModel'; -export * from './ResourceFileUploadResultModel'; export * from './ReturnsParameterUsageModel'; export * from './SecurityRoleModel'; export * from './SendSalesRequestModel'; @@ -313,6 +316,8 @@ export * from './TaxAuthorityInfo'; export * from './TaxAuthorityModel'; export * from './TaxAuthorityTypeModel'; export * from './TaxCodeModel'; +export * from './TaxCodeRecommendationStatusOutputModel'; +export * from './TaxCodeRecommendationsOutputModel'; export * from './TaxCodeTypesModel'; export * from './TaxDetailsByTaxSubType'; export * from './TaxDetailsByTaxType'; diff --git a/package.json b/package.json index 9f4b7f7..007cbb1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "avatax", - "version": "24.4.2", + "version": "24.6.1", "description": "AvaTax v2 SDK for languages using JavaScript", "main": "index.js", "types": "index.d.ts",