diff --git a/lib/AvaTaxClient.js b/lib/AvaTaxClient.js index 7a6cb7b6..5636129e 100644 --- a/lib/AvaTaxClient.js +++ b/lib/AvaTaxClient.js @@ -1,138 +1,146 @@ -/* - * AvaTax Software Development Kit for JavaScript - * - * (c) 2004-2018 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * @author Justin Soliz - * @author Ted Spence - * @copyright 2004-2018 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version 21.10.0 - * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK - */ - -import fetch from 'isomorphic-fetch'; -import { createBasicAuthHeader } from './utils/basic_auth'; -import { withTimeout } from './utils/withTimeout'; - -export default class AvaTaxClient { - /** - * Construct a new AvaTaxClient - * - * @constructor - * @param string appName Specify the name of your application here. Should not contain any semicolons. - * @param string appVersion Specify the version number of your application here. Should not contain any semicolons. - * @param string machineName Specify the machine name of the machine on which this code is executing here. Should not contain any semicolons. - * @param string environment Indicates which server to use; acceptable values are "sandbox" or "production", or the full URL of your AvaTax instance. - * @param number timeout Specify the timeout for AvaTax requests; default value 20 minutes. - */ - constructor({ appName, appVersion, machineName, environment, timeout = 1200000 }) { - this.baseUrl = 'https://rest.avatax.com'; - if (environment == 'sandbox') { - this.baseUrl = 'https://sandbox-rest.avatax.com'; - } else if ( - typeof environment !== "undefined" && - (environment.substring(0, 8) == 'https://' || - environment.substring(0, 7) == 'http://') - ) { - this.baseUrl = environment; - } - this.clientId = - appName + - '; ' + - appVersion + - '; JavascriptSdk; 21.10.0; ' + - machineName; - this.timeout = timeout; - } - - /** - * Configure this client to use the specified username/password security settings - * - * @param string username The username for your AvaTax user account - * @param string password The password for your AvaTax user account - * @param int accountId The account ID of your avatax account - * @param string licenseKey The license key of your avatax account - * @param string bearerToken The OAuth 2.0 token provided by Avalara Identity - * @return AvaTaxClient - */ - withSecurity({ username, password, accountId, licenseKey, bearerToken }) { - if (username != null && password != null) { - this.auth = createBasicAuthHeader(username, password); - } else if (accountId != null && licenseKey != null) { - this.auth = createBasicAuthHeader(accountId, licenseKey); - } else if (bearerToken != null) { - this.auth = 'Bearer ' + bearerToken; - } - return this; - } - - /** - * Make a single REST call to the AvaTax v2 API server - * - * @param string url The relative path of the API on the server - * @param string verb The HTTP verb being used in this request - * @param string payload The request body, if this is being sent to a POST/PUT API call - */ - restCall({ url, verb, payload }) { - return withTimeout(this.timeout, fetch(url, { - method: verb, - headers: { - Accept: 'application/json', - 'Content-Type': 'application/json', - Authorization: this.auth, - 'X-Avalara-Client': this.clientId - }, - body: JSON.stringify(payload) - })).then(res => { - var contentType = res.headers._headers['content-type'][0]; - - if (contentType === 'application/vnd.ms-excel' || contentType === 'text/csv') { - return res; - } - return res.json(); - }).then(json => { - // handle error - if (json.error) { - let ex = new Error(json.error.message); - ex.code = json.error.code; - ex.target = json.error.target; - ex.details = json.error.details; - throw ex; - } else { - return json; - } - }) - } - - /** - * Construct a URL with query string parameters - * - * @param string url The root URL of the API being called - * @param string parameters A list of name-value pairs in a javascript object to create as query string parameters - */ - buildUrl({ url, parameters }) { - var qs = ''; - for (var key in parameters) { - var value = parameters[key]; - if (value) { - qs += encodeURIComponent(key) + '=' + encodeURIComponent(value) + '&'; - } - } - if (qs.length > 0) { - qs = qs.substring(0, qs.length - 1); //chop off last "&" - url = url + '?' + qs; - } - return this.baseUrl + url; - } - - - /** - * Reset this account's license key - * +/* + * AvaTax Software Development Kit for JavaScript + * + * (c) 2004-2018 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Justin Soliz + * @author Ted Spence + * @copyright 2004-2018 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @version 21.12.0 + * @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK + */ + +import fetch from 'isomorphic-fetch'; +import { createBasicAuthHeader } from './utils/basic_auth'; +import { withTimeout } from './utils/withTimeout'; + +export default class AvaTaxClient { + /** + * Construct a new AvaTaxClient + * + * @constructor + * @param string appName Specify the name of your application here. Should not contain any semicolons. + * @param string appVersion Specify the version number of your application here. Should not contain any semicolons. + * @param string machineName Specify the machine name of the machine on which this code is executing here. Should not contain any semicolons. + * @param string environment Indicates which server to use; acceptable values are "sandbox" or "production", or the full URL of your AvaTax instance. + * @param number timeout Specify the timeout for AvaTax requests; default value 20 minutes. + */ + constructor({ appName, appVersion, machineName, environment, timeout = 1200000 }) { + this.appNM=appName; + this.appVer=appVersion; + this.machineNM=machineName + this.baseUrl = 'https://rest.avatax.com'; + if (environment == 'sandbox') { + this.baseUrl = 'https://sandbox-rest.avatax.com'; + } else if ( + typeof environment !== "undefined" && + (environment.substring(0, 8) == 'https://' || + environment.substring(0, 7) == 'http://') + ) { + this.baseUrl = environment; + } + this.timeout = timeout; + } + + /** + * Configure this client to use the specified username/password security settings + * + * @param string username The username for your AvaTax user account + * @param string password The password for your AvaTax user account + * @param int accountId The account ID of your avatax account + * @param string licenseKey The license key of your avatax account + * @param string bearerToken The OAuth 2.0 token provided by Avalara Identity + * @return AvaTaxClient + */ + withSecurity({ username, password, accountId, licenseKey, bearerToken }) { + if (username != null && password != null) { + this.auth = createBasicAuthHeader(username, password); + } else if (accountId != null && licenseKey != null) { + this.auth = createBasicAuthHeader(accountId, licenseKey); + } else if (bearerToken != null) { + this.auth = 'Bearer ' + bearerToken; + } + return this; + } + + /** + * Make a single REST call to the AvaTax v2 API server + * + * @param string url The relative path of the API on the server + * @param string verb The HTTP verb being used in this request + * @param string payload The request body, if this is being sent to a POST/PUT API call + */ + restCall({ url, verb, payload, clientId="" }) { + return withTimeout(this.timeout, fetch(url, { + method: verb, + headers: { + Accept: 'application/json', + 'Content-Type': 'application/json', + Authorization: this.auth, + 'X-Avalara-Client': clientId + }, + body: JSON.stringify(payload) + })).then(res => { + var contentType = res.headers._headers['content-type']; + var contentLength = res.headers._headers['content-length']; + if (typeof contentLength !== "undefined" && contentLength != null) + { + contentLength = res.headers._headers['content-length'][0]; + } + + if (contentType[0] === 'application/vnd.ms-excel' || contentType[0] === 'text/csv') { + return res; + } + + if (res.headers._headers['content-type'].includes('application/json')) + { + if (typeof contentLength !== "undefined" && contentLength != null && contentLength == 0 && parseInt(res.status/100)==2 ){ + return null; + } + } + return res.json(); + }).then(json => { + // handle error + if (json && json.length>0 && json.error) { + let ex = new Error(json.error.message); + ex.code = json.error.code; + ex.target = json.error.target; + ex.details = json.error.details; + throw ex; + } else { + return json; + } + }) + } + + /** + * Construct a URL with query string parameters + * + * @param string url The root URL of the API being called + * @param string parameters A list of name-value pairs in a javascript object to create as query string parameters + */ + buildUrl({ url, parameters }) { + var qs = ''; + for (var key in parameters) { + var value = parameters[key]; + if (value) { + qs += encodeURIComponent(key) + '=' + encodeURIComponent(value) + '&'; + } + } + if (qs.length > 0) { + qs = qs.substring(0, qs.length - 1); //chop off last "&" + url = url + '?' + qs; + } + return this.baseUrl + url; + } + + + /** + * Reset this account's license key * Resets the existing license key for this account to a new key. * * To reset your account, you must specify the ID of the account you wish to reset and confirm the action. @@ -150,24 +158,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int id The ID of the account you wish to update. - * @param object model A request confirming that you wish to reset the license key of this account. - * @return object - */ - accountResetLicenseKey({ id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}/resetlicensekey`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Activate an account by accepting terms and conditions - * + * @param object model A request confirming that you wish to reset the license key of this account. + * @return object + */ + accountResetLicenseKey({ id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}/resetlicensekey`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Activate an account by accepting terms and conditions * Activate the account specified by the unique accountId number. * * This activation request can only be called by account administrators. You must indicate @@ -181,24 +195,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int id The ID of the account to activate - * @param object model The activation request - * @return object - */ - activateAccount({ id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}/activate`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Retrieve audit history for an account. - * + * @param object model The activation request + * @return object + */ + activateAccount({ id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}/activate`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Retrieve audit history for an account. * Retrieve audit trace history for an account. * * Your audit trace history contains a record of all API calls made against the AvaTax REST API that returned an error. You can use this API to investigate @@ -216,32 +236,38 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int id The ID of the account you wish to audit. * @param string start The start datetime of audit history you with to retrieve, e.g. "2018-06-08T17:00:00Z". Defaults to the past 15 minutes. * @param string end The end datetime of audit history you with to retrieve, e.g. "2018-06-08T17:15:00Z. Defaults to the current time. Maximum of an hour after the start time. * @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. - * @param int skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @return FetchResult - */ - auditAccount({ id, start, end, top, skip } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}/audit`, + * @param int skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. + * @return FetchResult + */ + auditAccount({ id, start, end, top, skip } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}/audit`, parameters: { start: start, end: end, $top: top, $skip: skip } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Create license key for this account - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Create license key for this account * Creates a new license key for this account. * * To create a license key for your account, you must specify the ID of the account and license key name. @@ -255,24 +281,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int id The ID of the account you wish to update. - * @param object model - * @return object - */ - createLicenseKey({ id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}/licensekey`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Delete license key for this account by license key name - * + * @param object model + * @return object + */ + createLicenseKey({ id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}/licensekey`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Delete license key for this account by license key name * Deletes the license key for this account using license key name. * * To delete a license key for your account, you must specify the accountID of the account and license key name. @@ -281,24 +313,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int id The ID of the account you wish to update. - * @param string licensekeyname The license key name you wish to update. - * @return object[] - */ - deleteLicenseKey({ id, licensekeyname } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}/licensekey/${licensekeyname}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Retrieve a single account - * + * @param string licensekeyname The license key name you wish to update. + * @return object[] + */ + deleteLicenseKey({ id, licensekeyname } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}/licensekey/${licensekeyname}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single account * Get the account object identified by this URL. * You may use the '$include' parameter to fetch additional nested data: * @@ -307,26 +345,32 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int id The ID of the account to retrieve - * @param string include A comma separated list of special fetch options - * @return object - */ - getAccount({ id, include } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}`, + * @param string include A comma separated list of special fetch options + * @return object + */ + getAccount({ id, include } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}`, parameters: { $include: include } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Get configuration settings for this account - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Get configuration settings for this account * Retrieve a list of all configuration settings tied to this account. * * Configuration settings provide you with the ability to control features of your account and of your @@ -342,64 +386,82 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * - * - * @param int id - * @return object[] - */ - getAccountConfiguration({ id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}/configuration`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve license key by license key name - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * + * + * @param int id + * @return object[] + */ + getAccountConfiguration({ id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}/configuration`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve license key by license key name * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int id The ID of the account to retrieve - * @param string licensekeyname The ID of the account to retrieve - * @return object - */ - getLicenseKey({ id, licensekeyname } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}/licensekey/${licensekeyname}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all license keys for this account - * + * @param string licensekeyname The ID of the account to retrieve + * @return object + */ + getLicenseKey({ id, licensekeyname } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}/licensekey/${licensekeyname}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all license keys for this account * Gets list of all the license keys used by the account. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * - * - * @param int id The ID of the account to retrieve - * @return object[] - */ - getLicenseKeys({ id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}/licensekeys`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all accounts - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * + * + * @param int id The ID of the account to retrieve + * @return object[] + */ + getLicenseKeys({ id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}/licensekeys`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all accounts * List all account objects that can be seen by the current user. * * This API lists all accounts you are allowed to see. In general, most users will only be able to see their own account. @@ -415,19 +477,20 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param string include A comma separated list of objects to fetch underneath this account. Any object with a URL path underneath this account can be fetched by specifying its name. * @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:* subscriptions, users * @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. * @param int 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 - */ - queryAccounts({ include, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + queryAccounts({ include, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts`, parameters: { $include: include, $filter: filter, @@ -435,13 +498,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Change configuration settings for this account - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Change configuration settings for this account * Update configuration settings tied to this account. * * Configuration settings provide you with the ability to control features of your account and of your @@ -457,24 +525,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int id - * @param object[] model - * @return object[] - */ - setAccountConfiguration({ id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}/configuration`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Retrieve geolocation information for a specified address - * + * @param object[] model + * @return object[] + */ + setAccountConfiguration({ id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}/configuration`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Retrieve geolocation information for a specified address * Resolve an address against Avalara's address-validation system. If the address can be resolved, this API * provides the latitude and longitude of the resolved location. The value 'resolutionQuality' can be used * to identify how closely this address can be located. If the address cannot be clearly located, use the @@ -490,8 +564,9 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AutoAddress. - * + * * This API depends on the following active services:*Required* (all): AutoAddress. + * Swagger Name: AvaTaxClient + * * * @param string line1 Line 1 * @param string line2 Line 2 @@ -500,12 +575,12 @@ export default class AvaTaxClient { * @param string region State / Province / Region * @param string postalCode Postal Code / Zip Code * @param string country Two character ISO 3166 Country Code (see /api/v2/definitions/countries for a full list) - * @param string textCase selectable text case for address validation (See TextCase::* for a list of allowable values) - * @return object - */ - resolveAddress({ line1, line2, line3, city, region, postalCode, country, textCase } = {}) { - var path = this.buildUrl({ - url: `/api/v2/addresses/resolve`, + * @param string textCase selectable text case for address validation (See TextCase::* for a list of allowable values) + * @return object + */ + resolveAddress({ line1, line2, line3, city, region, postalCode, country, textCase } = {}) { + var path = this.buildUrl({ + url: `/api/v2/addresses/resolve`, parameters: { line1: line1, line2: line2, @@ -516,13 +591,18 @@ export default class AvaTaxClient { country: country, textCase: textCase } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve geolocation information for a specified address - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve geolocation information for a specified address * Resolve an address against Avalara's address-validation system. If the address can be resolved, this API * provides the latitude and longitude of the resolved location. The value 'resolutionQuality' can be used * to identify how closely this address can be located. If the address cannot be clearly located, use the @@ -533,237 +613,303 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AutoAddress. - * - * - * @param object model The address to resolve - * @return object - */ - resolveAddressPost({ model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/addresses/resolve`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Create a lookup file for a company - * - * - * + * * This API depends on the following active services:*Required* (all): AutoAddress. + * Swagger Name: AvaTaxClient + * + * + * @param object model The address to resolve + * @return object + */ + resolveAddressPost({ model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/addresses/resolve`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Create a lookup file for a company + * + * Swagger Name: AvaTaxClient + * * * @param int accountId The ID of the account for the company * @param int companyId The ID of the company for which the lookup file is to be created - * @param object model The lookup file you wish to create - * @return object - */ - createCompanyLookupFile({ accountId, companyId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/advancedrules/accounts/${accountId}/companies/${companyId}/lookupFiles`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Delete a lookup file - * - * - * + * @param object model The lookup file you wish to create + * @return object + */ + createCompanyLookupFile({ accountId, companyId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/advancedrules/accounts/${accountId}/companies/${companyId}/lookupFiles`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Delete a lookup file + * + * Swagger Name: AvaTaxClient + * * * @param int accountId The ID of the account for the company the lookup file is for - * @param string id The unique ID/GUID for the company lookup file to be deleted - * @return object[] - */ - deleteLookupFile({ accountId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/advancedrules/accounts/${accountId}/lookupFiles/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Get the lookup files for a company - * - * - * + * @param string id The unique ID/GUID for the company lookup file to be deleted + * @return object[] + */ + deleteLookupFile({ accountId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/advancedrules/accounts/${accountId}/lookupFiles/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Get the lookup files for a company + * + * Swagger Name: AvaTaxClient + * * * @param int accountId The account ID for the company - * @param int companyId The ID of the company for which to retrieve lookup files - * @return FetchResult - */ - getCompanyLookupFiles({ accountId, companyId } = {}) { - var path = this.buildUrl({ - url: `/api/v2/advancedrules/accounts/${accountId}/companies/${companyId}/lookupFiles`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Get a lookup file for an accountId and companyLookupFileId - * - * - * + * @param int companyId The ID of the company for which to retrieve lookup files + * @return FetchResult + */ + getCompanyLookupFiles({ accountId, companyId } = {}) { + var path = this.buildUrl({ + url: `/api/v2/advancedrules/accounts/${accountId}/companies/${companyId}/lookupFiles`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Get a lookup file for an accountId and companyLookupFileId + * + * Swagger Name: AvaTaxClient + * * * @param int accountId The ID of the account for the lookup file - * @param string id The unique ID/GUID of the company lookup file to return - * @return object - */ - getLookupFile({ accountId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/advancedrules/accounts/${accountId}/lookupFiles/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Update a lookup file - * - * - * + * @param string id The unique ID/GUID of the company lookup file to return + * @return object + */ + getLookupFile({ accountId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/advancedrules/accounts/${accountId}/lookupFiles/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Update a lookup file + * + * Swagger Name: AvaTaxClient + * * * @param int accountId The ID of the account for the company the lookup file is for * @param string id The unique ID/GUID of the company lookup file to be updated - * @param object model The new values to update the lookup file - * @return object - */ - updateLookupFile({ accountId, id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/advancedrules/accounts/${accountId}/lookupFiles/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Create a new AvaFileForm - * + * @param object model The new values to update the lookup file + * @return object + */ + updateLookupFile({ accountId, id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/advancedrules/accounts/${accountId}/lookupFiles/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Create a new AvaFileForm * Create one or more AvaFileForms * A 'AvaFileForm' represents a form supported by our returns team * * ### Security Policies * * * This API requires the user role Compliance Root User. - * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - * - * - * @param object[] model The AvaFileForm you wish to create. - * @return object[] - */ - createAvaFileForms({ model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/avafileforms`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Delete a single AvaFileForm - * + * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + * Swagger Name: AvaTaxClient + * + * + * @param object[] model The AvaFileForm you wish to create. + * @return object[] + */ + createAvaFileForms({ model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/avafileforms`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Delete a single AvaFileForm * Marks the existing AvaFileForm object at this URL as deleted. * * ### Security Policies * * * This API requires one of the following user roles: Compliance Root User, ComplianceUser, FirmAdmin. - * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - * - * - * @param int id The ID of the AvaFileForm you wish to delete. - * @return object[] - */ - deleteAvaFileForm({ id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/avafileforms/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Retrieve a single AvaFileForm - * + * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + * Swagger Name: AvaTaxClient + * + * + * @param int id The ID of the AvaFileForm you wish to delete. + * @return object[] + */ + deleteAvaFileForm({ id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/avafileforms/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single AvaFileForm * Get the AvaFileForm object identified by this URL. * * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CompanyUser, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, FirmAdmin, FirmUser, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin. - * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - * - * - * @param int id The primary key of this AvaFileForm - * @return object - */ - getAvaFileForm({ id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/avafileforms/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all AvaFileForms - * + * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + * Swagger Name: AvaTaxClient + * + * + * @param int id The primary key of this AvaFileForm + * @return object + */ + getAvaFileForm({ id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/avafileforms/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all AvaFileForms * Search for specific objects using the criteria in the `$filter` parameter; 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, AccountOperator, CompanyAdmin, CompanyUser, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, FirmAdmin, FirmUser, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin. - * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - * + * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + * 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:* outletTypeId * @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. * @param int 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 - */ - queryAvaFileForms({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/avafileforms`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + queryAvaFileForms({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/avafileforms`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Update a AvaFileForm - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Update a AvaFileForm * All data from the existing object will be replaced with data in the object you PUT. * To set a field's value to null, you may either set its value to null or omit that field from the object you post. * * ### Security Policies * * * This API requires the user role Compliance Root User. - * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - * + * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + * Swagger Name: AvaTaxClient + * * * @param int id The ID of the AvaFileForm you wish to update - * @param object model The AvaFileForm model you wish to update. - * @return object - */ - updateAvaFileForm({ id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/avafileforms/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Cancel an in progress batch - * + * @param object model The AvaFileForm model you wish to update. + * @return object + */ + updateAvaFileForm({ id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/avafileforms/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Cancel an in progress batch * Marks the in progress batch identified by this URL as cancelled. * * Only JSON batches can be cancelled. If you attempt to cancel a file batch, you will receive an error message. @@ -779,24 +925,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this batch. - * @param int id The ID of the batch to cancel. - * @return object - */ - cancelBatch({ companyId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/batches/${id}/cancel`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: null }); - } - - /** - * Create a new batch - * + * @param int id The ID of the batch to cancel. + * @return object + */ + cancelBatch({ companyId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/batches/${id}/cancel`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: null, clientId: strClientId }); + } + + /** + * Create a new batch * Create one or more new batch objects attached to this company. * * Each batch object may have one or more file objects (currently only one file is supported). @@ -819,24 +971,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this batch. - * @param object[] model The batch you wish to create. - * @return object[] - */ - createBatches({ companyId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/batches`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Create a new transaction batch - * + * @param object[] model The batch you wish to create. + * @return object[] + */ + createBatches({ companyId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/batches`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Create a new transaction batch * Create a new transaction batch objects attached to this company. * * When a transaction batch is created, it is added to the AvaTax Batch v2 Queue and will be @@ -857,24 +1015,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this batch. - * @param object model The transaction batch you wish to create. - * @return object - */ - createTransactionBatch({ companyId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/batches/transactions`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Delete a single batch - * + * @param object model The transaction batch you wish to create. + * @return object + */ + createTransactionBatch({ companyId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/batches/transactions`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Delete a single batch * Marks the batch identified by this URL as deleted. * * If you attempt to delete a batch that is being processed, you will receive an error message. @@ -888,47 +1052,59 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: CSPAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: CSPAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this batch. - * @param int id The ID of the batch to delete. - * @return object[] - */ - deleteBatch({ companyId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/batches/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Download a single batch file - * + * @param int id The ID of the batch to delete. + * @return object[] + */ + deleteBatch({ companyId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/batches/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Download a single batch file * Download a single batch file identified by this URL. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this batch * @param int batchId The ID of the batch object - * @param int id The primary key of this batch file object - * @return object - */ - downloadBatch({ companyId, batchId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/batches/${batchId}/files/${id}/attachment`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve a single batch - * + * @param int id The primary key of this batch file object + * @return object + */ + downloadBatch({ companyId, batchId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/batches/${batchId}/files/${id}/attachment`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single batch * Get the batch object identified by this URL. A batch object is a large * collection of API calls stored in a compact file. * @@ -947,24 +1123,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this batch - * @param int id The primary key of this batch - * @return object - */ - getBatch({ companyId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/batches/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all batches for this company - * + * @param int id The primary key of this batch + * @return object + */ + getBatch({ companyId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/batches/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all batches for this company * List all batch objects attached to the specified company. * * A batch object is a large collection of API calls stored in a compact file. @@ -989,20 +1171,21 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns these batches * @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:* files * @param string include A comma separated list of additional data to retrieve. * @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. * @param int 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 - */ - listBatchesByCompany({ companyId, filter, include, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/batches`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listBatchesByCompany({ companyId, filter, include, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/batches`, parameters: { $filter: filter, $include: include, @@ -1010,13 +1193,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all batches - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all batches * Get multiple batch objects across all companies. * * A batch object is a large collection of API calls stored in a compact file. @@ -1038,19 +1226,20 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser. + * 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:* files * @param string include A comma separated list of additional data to retrieve. * @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. * @param int 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 - */ - queryBatches({ filter, include, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/batches`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + queryBatches({ filter, include, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/batches`, parameters: { $filter: filter, $include: include, @@ -1058,13 +1247,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Create a CertExpress invitation - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Create a CertExpress invitation * Creates an invitation for a customer to self-report certificates using the CertExpress website. * * This invitation is delivered by your choice of method, or you can present a hyperlink to the user @@ -1084,25 +1278,31 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that will record certificates * @param string customerCode The number of the customer where the request is sent to - * @param object[] model the requests to send out to customers - * @return object[] - */ - createCertExpressInvitation({ companyId, customerCode, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers/${customerCode}/certexpressinvites`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Retrieve a single CertExpress invitation - * + * @param object[] model the requests to send out to customers + * @return object[] + */ + createCertExpressInvitation({ companyId, customerCode, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/${customerCode}/certexpressinvites`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Retrieve a single CertExpress invitation * Retrieve an existing CertExpress invitation sent to a customer. * * A CertExpression invitation allows a customer to follow a helpful step-by-step guide to provide information @@ -1122,28 +1322,34 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that issued this invitation * @param string customerCode The number of the customer where the request is sent to * @param int id The unique ID number of this CertExpress invitation - * @param string include OPTIONAL: A comma separated list of special fetch options. No options are defined at this time. - * @return object - */ - getCertExpressInvitation({ companyId, customerCode, id, include } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers/${customerCode}/certexpressinvites/${id}`, + * @param string include OPTIONAL: A comma separated list of special fetch options. No options are defined at this time. + * @return object + */ + getCertExpressInvitation({ companyId, customerCode, id, include } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/${customerCode}/certexpressinvites/${id}`, parameters: { $include: include } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List CertExpress invitations - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List CertExpress invitations * Retrieve CertExpress invitations sent by this company. * * A CertExpression invitation allows a customer to follow a helpful step-by-step guide to provide information @@ -1163,20 +1369,21 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that issued this invitation * @param string include OPTIONAL: A comma separated list of special fetch options. No options are defined at this time. * @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, customer, coverLetter, exposureZones, exemptReasons, requestLink * @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. * @param int 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 - */ - listCertExpressInvitations({ companyId, include, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certexpressinvites`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listCertExpressInvitations({ companyId, include, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certexpressinvites`, parameters: { $include: include, $filter: filter, @@ -1184,13 +1391,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Create certificates for this company - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Create certificates for this company * Record one or more certificates document for this company. * * A certificate is a document stored in either AvaTax Exemptions or CertCapture. The certificate document @@ -1216,27 +1428,33 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID number of the company recording this certificate * @param boolean preValidatedExemptionReason If set to true, the certificate will bypass the human verification process. - * @param object[] model Certificates to be created - * @return object[] - */ - createCertificates({ companyId, preValidatedExemptionReason, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates`, + * @param object[] model Certificates to be created + * @return object[] + */ + createCertificates({ companyId, preValidatedExemptionReason, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates`, parameters: { $preValidatedExemptionReason: preValidatedExemptionReason } - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Revoke and delete a certificate - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Revoke and delete a certificate * Revoke the certificate identified by this URL, then delete it. * * A certificate is a document stored in either AvaTax Exemptions or CertCapture. The certificate document @@ -1254,24 +1472,30 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that recorded this certificate - * @param int id The unique ID number of this certificate - * @return object[] - */ - deleteCertificate({ companyId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Download an image for this certificate - * + * @param int id The unique ID number of this certificate + * @return object[] + */ + deleteCertificate({ companyId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Download an image for this certificate * Download an image or PDF file for this certificate. * * This API can be used to download either a single-page preview of the certificate or a full PDF document. @@ -1290,29 +1514,35 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that recorded this certificate * @param int id The unique ID number of this certificate * @param int page If you choose `$type`=`Jpeg`, you must specify which page number to retrieve. - * @param string type The data format in which to retrieve the certificate image (See CertificatePreviewType::* for a list of allowable values) - * @return object - */ - downloadCertificateImage({ companyId, id, page, type } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates/${id}/attachment`, + * @param string type The data format in which to retrieve the certificate image (See CertificatePreviewType::* for a list of allowable values) + * @return object + */ + downloadCertificateImage({ companyId, id, page, type } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/${id}/attachment`, parameters: { $page: page, $type: type } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve a single certificate - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single certificate * Get the current certificate identified by this URL. * * A certificate is a document stored in either AvaTax Exemptions or CertCapture. The certificate document @@ -1334,27 +1564,33 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID number of the company that recorded this certificate * @param int id The unique ID number of this certificate - * @param string include OPTIONAL: A comma separated list of special fetch options. You can specify one or more of the following: * customers - Retrieves the list of customers linked to the certificate. * po_numbers - Retrieves all PO numbers tied to the certificate. * attributes - Retrieves all attributes applied to the certificate. - * @return object - */ - getCertificate({ companyId, id, include } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates/${id}`, + * @param string include OPTIONAL: A comma separated list of special fetch options. You can specify one or more of the following: * customers - Retrieves the list of customers linked to the certificate. * po_numbers - Retrieves all PO numbers tied to the certificate. * attributes - Retrieves all attributes applied to the certificate. + * @return object + */ + getCertificate({ companyId, id, include } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/${id}`, parameters: { $include: include } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Check a company's exemption certificate status. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Check a company's exemption certificate status. * Checks whether this company is configured to use exemption certificates in AvaTax. * * Exemption certificates are tracked through a different auditable data store than the one that @@ -1366,23 +1602,29 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * - * - * @param int companyId The company ID to check - * @return object - */ - getCertificateSetup({ companyId } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates/setup`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Link attributes to a certificate - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * + * + * @param int companyId The company ID to check + * @return object + */ + getCertificateSetup({ companyId } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/setup`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Link attributes to a certificate * Link one or many attributes to a certificate. * * A certificate may have multiple attributes that control its behavior. You may link or unlink attributes to a @@ -1401,25 +1643,31 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that recorded this certificate * @param int id The unique ID number of this certificate - * @param object[] model The list of attributes to link to this certificate. - * @return FetchResult - */ - linkAttributesToCertificate({ companyId, id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates/${id}/attributes/link`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Link customers to a certificate - * + * @param object[] model The list of attributes to link to this certificate. + * @return FetchResult + */ + linkAttributesToCertificate({ companyId, id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/${id}/attributes/link`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Link customers to a certificate * Link one or more customers to an existing certificate. * * Customers and certificates must be linked before a customer can make use of a certificate to obtain @@ -1439,25 +1687,31 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that recorded this certificate * @param int id The unique ID number of this certificate - * @param object model The list of customers needed be added to the Certificate for exemption - * @return FetchResult - */ - linkCustomersToCertificate({ companyId, id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates/${id}/customers/link`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * List all attributes applied to this certificate - * + * @param object model The list of customers needed be added to the Certificate for exemption + * @return FetchResult + */ + linkCustomersToCertificate({ companyId, id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/${id}/customers/link`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * List all attributes applied to this certificate * Retrieve the list of attributes that are linked to this certificate. * * A certificate may have multiple attributes that control its behavior. You may link or unlink attributes to a @@ -1476,24 +1730,30 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that recorded this certificate - * @param int id The unique ID number of this certificate - * @return FetchResult - */ - listAttributesForCertificate({ companyId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates/${id}/attributes`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List customers linked to this certificate - * + * @param int id The unique ID number of this certificate + * @return FetchResult + */ + listAttributesForCertificate({ companyId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/${id}/attributes`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List customers linked to this certificate * List all customers linked to this certificate. * * Customers must be linked to a certificate in order to make use of its tax exemption features. You @@ -1512,27 +1772,33 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that recorded this certificate * @param int id The unique ID number of this certificate - * @param string include OPTIONAL: A comma separated list of special fetch options. No options are currently available when fetching customers. - * @return FetchResult - */ - listCustomersForCertificate({ companyId, id, include } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates/${id}/customers`, + * @param string include OPTIONAL: A comma separated list of special fetch options. No options are currently available when fetching customers. + * @return FetchResult + */ + listCustomersForCertificate({ companyId, id, include } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/${id}/customers`, parameters: { $include: include } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List all certificates for a company - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List all certificates for a company * List all certificates recorded by a company * * A certificate is a document stored in either AvaTax Exemptions or CertCapture. The certificate document @@ -1554,20 +1820,21 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID number of the company to search * @param string include OPTIONAL: A comma separated list of special fetch options. You can specify one or more of the following: * customers - Retrieves the list of customers linked to the certificate. * po_numbers - Retrieves all PO numbers tied to the certificate. * attributes - Retrieves all attributes applied to the certificate. * @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:* exemptionNumber, status, ecmsId, ecmsStatus, pdf, pages * @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. * @param int 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 - */ - queryCertificates({ companyId, include, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + queryCertificates({ companyId, include, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates`, parameters: { $include: include, $filter: filter, @@ -1575,13 +1842,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Request setup of exemption certificates for this company. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Request setup of exemption certificates for this company. * Requests the setup of exemption certificates for this company. * * Exemption certificates are tracked through a different auditable data store than the one that @@ -1595,23 +1867,29 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * - * - * @param int companyId - * @return object - */ - requestCertificateSetup({ companyId } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates/setup`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: null }); - } - - /** - * Unlink attributes from a certificate - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * + * + * @param int companyId + * @return object + */ + requestCertificateSetup({ companyId } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/setup`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: null, clientId: strClientId }); + } + + /** + * Unlink attributes from a certificate * Unlink one or many attributes from a certificate. * * A certificate may have multiple attributes that control its behavior. You may link or unlink attributes to a @@ -1630,25 +1908,31 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that recorded this certificate * @param int id The unique ID number of this certificate - * @param object[] model The list of attributes to unlink from this certificate. - * @return FetchResult - */ - unlinkAttributesFromCertificate({ companyId, id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates/${id}/attributes/unlink`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Unlink customers from a certificate - * + * @param object[] model The list of attributes to unlink from this certificate. + * @return FetchResult + */ + unlinkAttributesFromCertificate({ companyId, id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/${id}/attributes/unlink`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Unlink customers from a certificate * Unlinks one or more customers from a certificate. * * Unlinking a certificate from a customer will prevent the certificate from being used to generate @@ -1669,25 +1953,31 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that recorded this certificate * @param int id The unique ID number of this certificate - * @param object model The list of customers to unlink from this certificate - * @return FetchResult - */ - unlinkCustomersFromCertificate({ companyId, id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates/${id}/customers/unlink`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Update a single certificate - * + * @param object model The list of customers to unlink from this certificate + * @return FetchResult + */ + unlinkCustomersFromCertificate({ companyId, id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/${id}/customers/unlink`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Update a single certificate * Replace the certificate identified by this URL with a new one. * * A certificate is a document stored in either AvaTax Exemptions or CertCapture. The certificate document @@ -1703,25 +1993,31 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID number of the company that recorded this certificate * @param int id The unique ID number of this certificate - * @param object model The new certificate object that will replace the existing one - * @return object - */ - updateCertificate({ companyId, id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Upload an image or PDF attachment for this certificate - * + * @param object model The new certificate object that will replace the existing one + * @return object + */ + updateCertificate({ companyId, id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Upload an image or PDF attachment for this certificate * Upload an image or PDF attachment for this certificate. * * Image attachments can be of the format `PDF`, `JPEG`, `TIFF`, or `PNG`. To upload a multi-page image, please @@ -1740,25 +2036,31 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that recorded this certificate * @param int id The unique ID number of this certificate - * @param object file The exemption certificate file you wanted to upload. Accepted formats are: PDF, JPEG, TIFF, PNG. - * @return string - */ - uploadCertificateImage({ companyId, id, file } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/certificates/${id}/attachment`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: null }); - } - - /** - * Checks whether the integration being used to set up this company and run transactions onto this company is compliant to all requirements. - * + * @param object file The exemption certificate file you wanted to upload. Accepted formats are: PDF, JPEG, TIFF, PNG. + * @return string + */ + uploadCertificateImage({ companyId, id, file } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/certificates/${id}/attachment`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: null, clientId: strClientId }); + } + + /** + * Checks whether the integration being used to set up this company and run transactions onto this company is compliant to all requirements. * Examines the most recent 100 transactions or data from the last month when verifying transaction-related integrations. * For partners who write integrations against AvaTax for many clients, this API is a way to do a quick self testing to verify whether the * written integrations for a company are sufficient enough to be delivered to the respective customers to start using it. @@ -1785,23 +2087,29 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * - * - * @param int id The ID of the company to check if its integration is certified. - * @return string - */ - certifyIntegration({ id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${id}/certify`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Change the filing status of this company - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * + * + * @param int id The ID of the company to check if its integration is certified. + * @return string + */ + certifyIntegration({ id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${id}/certify`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Change the filing status of this company * Changes the current filing status of this company. * * For customers using Avalara's Managed Returns Service, each company within their account can request @@ -1818,24 +2126,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int id - * @param object model - * @return string - */ - changeFilingStatus({ id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${id}/filingstatus`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Quick setup for a company with a single physical address - * + * @param object model + * @return string + */ + changeFilingStatus({ id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${id}/filingstatus`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Quick setup for a company with a single physical address * Shortcut to quickly setup a single-physical-location company with critical information and activate it. * This API provides quick and simple company setup functionality and does the following things: * @@ -1851,23 +2165,29 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * - * - * @param object model Information about the company you wish to create. - * @return object - */ - companyInitialize({ model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/initialize`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Create new companies - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * + * + * @param object model Information about the company you wish to create. + * @return object + */ + companyInitialize({ model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/initialize`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Create new companies * Create one or more new company objects. * A 'company' represents a single corporation or individual that is registered to handle transactional taxes. * You may attach nested data objects such as contacts, locations, and nexus with this CREATE call, and those objects will be created with the company. @@ -1876,23 +2196,29 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * - * - * @param object[] model Either a single company object or an array of companies to create - * @return object[] - */ - createCompanies({ model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Add parameters to a company. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * + * + * @param object[] model Either a single company object or an array of companies to create + * @return object[] + */ + createCompanies({ model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Add parameters to a company. * Add parameters to a company. * * Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters". @@ -1907,24 +2233,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this company parameter. - * @param object[] model The company parameters you wish to create. - * @return object[] - */ - createCompanyParameters({ companyId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/parameters`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Request managed returns funding setup for a company - * + * @param object[] model The company parameters you wish to create. + * @return object[] + */ + createCompanyParameters({ companyId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/parameters`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Request managed returns funding setup for a company * This API is available by invitation only. * Companies that use the Avalara Managed Returns or the SST Certified Service Provider services are * required to setup their funding configuration before Avalara can begin filing tax returns on their @@ -1939,45 +2271,57 @@ export default class AvaTaxClient { * ### Security Policies * * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp. - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int id The unique identifier of the company - * @param object model The funding initialization request - * @return object - */ - createFundingRequest({ id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${id}/funding/setup`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Delete a single company - * + * @param object model The funding initialization request + * @return object + */ + createFundingRequest({ id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${id}/funding/setup`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Delete a single company * Deleting a company will delete all child companies, and all users attached to this company. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin. - * - * - * @param int id The ID of the company you wish to delete. - * @return object[] - */ - deleteCompany({ id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Delete a single company parameter - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * + * + * @param int id The ID of the company you wish to delete. + * @return object[] + */ + deleteCompany({ id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Delete a single company parameter * Delete a parameter of a company. * Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters". * @@ -1987,24 +2331,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The company id - * @param int id The parameter id - * @return object[] - */ - deleteCompanyParameter({ companyId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/parameters/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Check the funding configuration of a company - * + * @param int id The parameter id + * @return object[] + */ + deleteCompanyParameter({ companyId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/parameters/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Check the funding configuration of a company * This API is available by invitation only. * Requires a subscription to Avalara Managed Returns or SST Certified Service Provider. * Returns the funding configuration of the requested company. @@ -2013,23 +2363,29 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - * - * - * @param int companyId The unique identifier of the company - * @return object - */ - fundingConfigurationByCompany({ companyId } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/funding/configuration`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Check the funding configuration of a company - * + * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + * Swagger Name: AvaTaxClient + * + * + * @param int companyId The unique identifier of the company + * @return object + */ + fundingConfigurationByCompany({ companyId } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/funding/configuration`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Check the funding configuration of a company * This API is available by invitation only. * Requires a subscription to Avalara Managed Returns or SST Certified Service Provider. * Returns the funding configuration of the requested company. @@ -2038,26 +2394,32 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - * + * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique identifier of the company - * @param string currency The currency of the funding. USD and CAD are the only valid currencies - * @return object[] - */ - fundingConfigurationsByCompanyAndCurrency({ companyId, currency } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/funding/configurations`, + * @param string currency The currency of the funding. USD and CAD are the only valid currencies + * @return object[] + */ + fundingConfigurationsByCompanyAndCurrency({ companyId, currency } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/funding/configurations`, parameters: { currency: currency } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve a single company - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single company * Get the company object identified by this URL. * A 'company' represents a single corporation or individual that is registered to handle transactional taxes. * 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: @@ -2074,26 +2436,32 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int id The ID of the company to retrieve. - * @param string include OPTIONAL: A comma separated list of special fetch options. * Child objects - Specify one or more of the following to retrieve objects related to each company: "Contacts", "FilingCalendars", "Items", "Locations", "Nexus", "TaxCodes", "NonReportingChildren" or "TaxRules". * Deleted objects - Specify "FetchDeleted" to retrieve information about previously deleted objects. - * @return object - */ - getCompany({ id, include } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${id}`, + * @param string include OPTIONAL: A comma separated list of special fetch options. * Child objects - Specify one or more of the following to retrieve objects related to each company: "Contacts", "FilingCalendars", "Items", "Locations", "Nexus", "TaxCodes", "NonReportingChildren" or "TaxRules". * Deleted objects - Specify "FetchDeleted" to retrieve information about previously deleted objects. + * @return object + */ + getCompany({ id, include } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${id}`, parameters: { $include: include } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Get configuration settings for this company - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Get configuration settings for this company * Retrieve a list of all configuration settings tied to this company. * * Configuration settings provide you with the ability to control features of your account and of your @@ -2109,23 +2477,29 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * - * - * @param int id - * @return object[] - */ - getCompanyConfiguration({ id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${id}/configuration`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve a single company parameter - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * + * + * @param int id + * @return object[] + */ + getCompanyConfiguration({ id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${id}/configuration`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single company parameter * Retrieves a single parameter of a company. * * Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters". @@ -2136,24 +2510,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId - * @param int id - * @return object - */ - getCompanyParameterDetail({ companyId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/parameters/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Get this company's filing status - * + * @param int id + * @return object + */ + getCompanyParameterDetail({ companyId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/parameters/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Get this company's filing status * Retrieve the current filing status of this company. * * For customers using Avalara's Managed Returns Service, each company within their account can request @@ -2171,23 +2551,29 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * - * - * @param int id - * @return string - */ - getFilingStatus({ id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${id}/filingstatus`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve parameters for a company - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * + * + * @param int id + * @return string + */ + getFilingStatus({ id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${id}/filingstatus`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve parameters for a company * Retrieve all parameters of a company. * * Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters". @@ -2201,32 +2587,38 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The company 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/).
*Not filterable:* name, unit * @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. * @param int 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 - */ - listCompanyParameterDetails({ companyId, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/parameters`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listCompanyParameterDetails({ companyId, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/parameters`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Check managed returns funding status for a company - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Check managed returns funding status for a company * This API is available by invitation only. * Requires a subscription to Avalara Managed Returns or SST Certified Service Provider. * Returns a list of funding setup requests and their current status. @@ -2235,45 +2627,57 @@ export default class AvaTaxClient { * ### Security Policies * * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp. - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * - * - * @param int id The unique identifier of the company - * @return object[] - */ - listFundingRequestsByCompany({ id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${id}/funding`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve a list of MRS Companies with account - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * + * + * @param int id The unique identifier of the company + * @return object[] + */ + listFundingRequestsByCompany({ id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${id}/funding`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a list of MRS Companies with account * This API is available by invitation only. * * Get a list of companies with an active MRS service. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * - * - * @return FetchResult - */ - listMrsCompanies({ } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/mrs`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all companies - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * + * + * @return FetchResult + */ + listMrsCompanies({ } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/mrs`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all companies * Get multiple company objects. * * A `company` represents a single corporation or individual that is registered to handle transactional taxes. @@ -2294,19 +2698,20 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @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 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:* IsFein, contacts, items, locations, nexus, settings, taxCodes, taxRules, upcs, nonReportingChildCompanies, exemptCerts, parameters, supplierandcustomers * @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. * @param int 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 - */ - queryCompanies({ include, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + queryCompanies({ include, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies`, parameters: { $include: include, $filter: filter, @@ -2314,13 +2719,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Change configuration settings for this company - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Change configuration settings for this company * Update configuration settings tied to this company. * * Configuration settings provide you with the ability to control features of your account and of your @@ -2336,24 +2746,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int id - * @param object[] model - * @return object[] - */ - setCompanyConfiguration({ id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${id}/configuration`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Update a single company - * + * @param object[] model + * @return object[] + */ + setCompanyConfiguration({ id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${id}/configuration`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Update a single company * Replace the existing company object at this URL with an updated object. * * A `CompanyModel` represents a single corporation or individual that is registered to handle transactional taxes. @@ -2368,24 +2784,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int id The ID of the company you wish to update. - * @param object model The company object you wish to update. - * @return object - */ - updateCompany({ id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Update a company parameter - * + * @param object model The company object you wish to update. + * @return object + */ + updateCompany({ id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Update a company parameter * Update a parameter of a company. * * Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters". @@ -2396,95 +2818,162 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The company id. * @param int id The company parameter id - * @param object model The company parameter object you wish to update. - * @return object - */ - updateCompanyParameterDetail({ companyId, id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/parameters/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Create a new contact - * + * @param object model The company parameter object you wish to update. + * @return object + */ + updateCompanyParameterDetail({ companyId, id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/parameters/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Retrieve jurisdiction rate information for tax authority + * This API is available by invitation only. + * + * ### Security Policies + * + * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + * Swagger Name: AvaTaxClient + * + * + * @param int taxAuthorityId Used to limit the jurisdictions returned. + * @param string effectiveDate Used to limit the jurisdictions returned. + * @param string endDate Used to limit the jurisdictions returned. + * @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 string include A comma separated list of objects to fetch underneath this jurisdiction. + * @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. + * @param int 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 object + */ + queryTaxAuthorityJurisdictionRates({ taxAuthorityId, effectiveDate, endDate, filter, include, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/compliance/taxauthorityjurisdictionrates`, + parameters: { + taxAuthorityId: taxAuthorityId, + effectiveDate: effectiveDate, + endDate: endDate, + $filter: filter, + $include: include, + $top: top, + $skip: skip, + $orderBy: orderBy + } + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Create a new contact * Create one or more new contact objects. * A 'contact' is a person associated with a company who is designated to handle certain responsibilities of * a tax collecting and filing entity. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this contact. - * @param object[] model The contacts you wish to create. - * @return object[] - */ - createContacts({ companyId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/contacts`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Delete a single contact - * + * @param object[] model The contacts you wish to create. + * @return object[] + */ + createContacts({ companyId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/contacts`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Delete a single contact * Mark the existing contact object at this URL as deleted. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this contact. - * @param int id The ID of the contact you wish to delete. - * @return object[] - */ - deleteContact({ companyId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/contacts/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Retrieve a single contact - * + * @param int id The ID of the contact you wish to delete. + * @return object[] + */ + deleteContact({ companyId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/contacts/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single contact * Get the contact object identified by this URL. * A 'contact' is a person associated with a company who is designated to handle certain responsibilities of * a tax collecting and filing entity. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company for this contact - * @param int id The primary key of this contact - * @return object - */ - getContact({ companyId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/contacts/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve contacts for this company - * + * @param int id The primary key of this contact + * @return object + */ + getContact({ companyId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/contacts/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve contacts for this company * List all contact objects assigned to this company. * * Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) . @@ -2492,32 +2981,38 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns these contacts * @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 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. * @param int 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 - */ - listContactsByCompany({ companyId, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/contacts`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listContactsByCompany({ companyId, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/contacts`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all contacts - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all contacts * Get multiple contact objects across all companies. * A 'contact' is a person associated with a company who is designated to handle certain responsibilities of * a tax collecting and filing entity. @@ -2527,31 +3022,37 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * 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 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. * @param int 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 - */ - queryContacts({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/contacts`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + queryContacts({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/contacts`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Update a single contact - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Update a single contact * Replace the existing contact object at this URL with an updated object. * A 'contact' is a person associated with a company who is designated to handle certain responsibilities of * a tax collecting and filing entity. @@ -2560,25 +3061,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that this contact belongs to. * @param int id The ID of the contact you wish to update - * @param object model The contact you wish to update. - * @return object - */ - updateContact({ companyId, id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/contacts/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Create customers for this company - * + * @param object model The contact you wish to update. + * @return object + */ + updateContact({ companyId, id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/contacts/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Create customers for this company * Create one or more customers for this company. * * A customer object defines information about a person or business that purchases products from your @@ -2598,24 +3105,30 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that recorded this customer - * @param object[] model The list of customer objects to be created - * @return object[] - */ - createCustomers({ companyId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Delete a customer record - * + * @param object[] model The list of customer objects to be created + * @return object[] + */ + createCustomers({ companyId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Delete a customer record * Deletes the customer object referenced by this URL. * * A customer object defines information about a person or business that purchases products from your @@ -2632,24 +3145,30 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that recorded this customer - * @param string customerCode The unique code representing this customer - * @return object - */ - deleteCustomer({ companyId, customerCode } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers/${customerCode}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Retrieve a single customer - * + * @param string customerCode The unique code representing this customer + * @return object + */ + deleteCustomer({ companyId, customerCode } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/${customerCode}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single customer * Retrieve the customer identified by this URL. * * A customer object defines information about a person or business that purchases products from your @@ -2672,27 +3191,33 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that recorded this customer * @param string customerCode The unique code representing this customer - * @param string include Specify optional additional objects to include in this fetch request - * @return object - */ - getCustomer({ companyId, customerCode, include } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers/${customerCode}`, + * @param string include Specify optional additional objects to include in this fetch request + * @return object + */ + getCustomer({ companyId, customerCode, include } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/${customerCode}`, parameters: { $include: include } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Link attributes to a customer - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Link attributes to a customer * Link one or many attributes to a customer. * * A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a @@ -2712,25 +3237,31 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that recorded the provided customer * @param string customerCode The unique code representing the current customer - * @param object[] model The list of attributes to link to the customer. - * @return FetchResult - */ - linkAttributesToCustomer({ companyId, customerCode, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers/${customerCode}/attributes/link`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Link certificates to a customer - * + * @param object[] model The list of attributes to link to the customer. + * @return FetchResult + */ + linkAttributesToCustomer({ companyId, customerCode, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/${customerCode}/attributes/link`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Link certificates to a customer * Link one or more certificates to a customer. * * A customer object defines information about a person or business that purchases products from your @@ -2747,25 +3278,31 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that recorded this customer * @param string customerCode The unique code representing this customer - * @param object model The list of certificates to link to this customer - * @return FetchResult - */ - linkCertificatesToCustomer({ companyId, customerCode, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers/${customerCode}/certificates/link`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Link two customer records together - * + * @param object model The list of certificates to link to this customer + * @return FetchResult + */ + linkCertificatesToCustomer({ companyId, customerCode, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/${customerCode}/certificates/link`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Link two customer records together * Links a Ship-To customer record with a Bill-To customer record. * * Customer records represent businesses or individuals who can provide exemption certificates. Some customers @@ -2783,25 +3320,31 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company defining customers. * @param string code The code of the bill-to customer to link. - * @param object model A list of information about ship-to customers to link to this bill-to customer. - * @return object - */ - linkShipToCustomersToBillCustomer({ companyId, code, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers/billto/${code}/shipto/link`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Retrieve a customer's attributes - * + * @param object model A list of information about ship-to customers to link to this bill-to customer. + * @return object + */ + linkShipToCustomersToBillCustomer({ companyId, code, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/billto/${code}/shipto/link`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Retrieve a customer's attributes * Retrieve the attributes linked to the customer identified by this URL. * * A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a @@ -2821,24 +3364,30 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that recorded the provided customer - * @param string customerCode The unique code representing the current customer - * @return FetchResult - */ - listAttributesForCustomer({ companyId, customerCode } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers/${customerCode}/attributes`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List certificates linked to a customer - * + * @param string customerCode The unique code representing the current customer + * @return FetchResult + */ + listAttributesForCustomer({ companyId, customerCode } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/${customerCode}/attributes`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List certificates linked to a customer * List all certificates linked to a customer. * * A customer object defines information about a person or business that purchases products from your @@ -2855,8 +3404,9 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that recorded this customer * @param string customerCode The unique code representing this customer @@ -2864,12 +3414,12 @@ export default class 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:* exemptionNumber, status, ecmsId, ecmsStatus, pdf, pages * @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. * @param int 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 - */ - listCertificatesForCustomer({ companyId, customerCode, include, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers/${customerCode}/certificates`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listCertificatesForCustomer({ companyId, customerCode, include, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/${customerCode}/certificates`, parameters: { $include: include, $filter: filter, @@ -2877,13 +3427,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List valid certificates for a location - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List valid certificates for a location * List valid certificates linked to a customer in a particular country and region. * * This API is intended to help identify whether a customer has already provided a certificate that @@ -2903,26 +3458,32 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that recorded this customer * @param string customerCode The unique code representing this customer * @param string country Search for certificates matching this country. Uses the ISO 3166 two character country code. - * @param string region Search for certificates matching this region. Uses the ISO 3166 two or three character state, region, or province code. - * @return object - */ - listValidCertificatesForCustomer({ companyId, customerCode, country, region } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers/${customerCode}/certificates/${country}/${region}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List all customers for this company - * + * @param string region Search for certificates matching this region. Uses the ISO 3166 two or three character state, region, or province code. + * @return object + */ + listValidCertificatesForCustomer({ companyId, customerCode, country, region } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/${customerCode}/certificates/${country}/${region}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List all customers for this company * List all customers recorded by this company matching the specified criteria. * * A customer object defines information about a person or business that purchases products from your @@ -2944,20 +3505,21 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that recorded this customer * @param string include OPTIONAL - You can specify the value `certificates` to fetch information about certificates linked to the customer. * @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:* shipTos * @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. * @param int 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 - */ - queryCustomers({ companyId, include, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + queryCustomers({ companyId, include, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers`, parameters: { $include: include, $filter: filter, @@ -2965,13 +3527,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Unlink attributes from a customer - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Unlink attributes from a customer * Unlink one or many attributes from a customer. * * A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a @@ -2991,25 +3558,31 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that recorded the customer * @param string customerCode The unique code representing the current customer - * @param object[] model The list of attributes to unlink from the customer. - * @return FetchResult - */ - unlinkAttributesFromCustomer({ companyId, customerCode, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers/${customerCode}/attributes/unlink`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Unlink certificates from a customer - * + * @param object[] model The list of attributes to unlink from the customer. + * @return FetchResult + */ + unlinkAttributesFromCustomer({ companyId, customerCode, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/${customerCode}/attributes/unlink`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Unlink certificates from a customer * Remove one or more certificates to a customer. * * A customer object defines information about a person or business that purchases products from your @@ -3026,25 +3599,31 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that recorded this customer * @param string customerCode The unique code representing this customer - * @param object model The list of certificates to link to this customer - * @return FetchResult - */ - unlinkCertificatesFromCustomer({ companyId, customerCode, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers/${customerCode}/certificates/unlink`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Update a single customer - * + * @param object model The list of certificates to link to this customer + * @return FetchResult + */ + unlinkCertificatesFromCustomer({ companyId, customerCode, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/${customerCode}/certificates/unlink`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Update a single customer * Replace the customer object at this URL with a new record. * * A customer object defines information about a person or business that purchases products from your @@ -3061,125 +3640,155 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that recorded this customer * @param string customerCode The unique code representing this customer - * @param object model The new customer model that will replace the existing record at this URL - * @return object - */ - updateCustomer({ companyId, customerCode, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/customers/${customerCode}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Create and store new datasources for the respective companies. - * + * @param object model The new customer model that will replace the existing record at this URL + * @return object + */ + updateCustomer({ companyId, customerCode, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/customers/${customerCode}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Create and store new datasources for the respective companies. * Create one or more datasource objects. * * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param int companyId The id of the company you which to create the datasources - * @param object[] model - * @return object[] - */ - createDataSources({ companyId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/datasources`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Delete a datasource by datasource id for a company. - * + * @param object[] model + * @return object[] + */ + createDataSources({ companyId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/datasources`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Delete a datasource by datasource id for a company. * Marks the existing datasource for a company as deleted. * * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param int companyId The id of the company the datasource belongs to. - * @param int id The id of the datasource you wish to delete. - * @return object[] - */ - deleteDataSource({ companyId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/datasources/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Get data source by data source id - * + * @param int id The id of the datasource you wish to delete. + * @return object[] + */ + deleteDataSource({ companyId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/datasources/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Get data source by data source id * Retrieve the data source by its unique ID number. * * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param int companyId - * @param int id data source id - * @return object - */ - getDataSourceById({ companyId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/datasources/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all datasources for this company - * + * @param int id data source id + * @return object + */ + getDataSourceById({ companyId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/datasources/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all datasources for this company * Gets multiple datasource objects for a given company. * * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param int companyId The id of the company you wish to retrieve the datasources. * @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:* isEnabled, isSynced, isAuthorized, name, externalState * @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. * @param int 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 - */ - listDataSources({ companyId, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/datasources`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listDataSources({ companyId, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/datasources`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all datasources - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all datasources * Get multiple datasource objects across all companies. * * Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) . @@ -3188,55 +3797,67 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * 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:* isEnabled, isSynced, isAuthorized, name, externalState * @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. * @param int 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 - */ - queryDataSources({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/datasources`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + queryDataSources({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/datasources`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Update a datasource identified by id for a company - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Update a datasource identified by id for a company * Updates a datasource for a company. * * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param int companyId The id of the company the datasource belongs to. * @param int id The id of the datasource you wish to delete. - * @param object model - * @return object - */ - updateDataSource({ companyId, id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/datasources/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Lists all parents of an HS Code. - * + * @param object model + * @return object + */ + updateDataSource({ companyId, id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/datasources/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Lists all parents of an HS Code. * Retrieves the specified HS code and all of its parents, reflecting all sections, chapters, headings, and subheadings * * a list of HS Codes that are the parents and information branches of the HS Code for the given @@ -3250,125 +3871,150 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API depends on the following active services:*Required* (all): AvaTaxGlobal. - * + * * This API depends on the following active services:*Required* (all): AvaTaxGlobal. + * Swagger Name: AvaTaxClient + * * * @param string country The name or code of the destination country. - * @param string hsCode The partial or full HS Code for which you would like to view all of the parents. - * @return FetchResult - */ - getCrossBorderCode({ country, hsCode } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/crossborder/${country}/${hsCode}/hierarchy`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Test whether a form supports online login verification - * + * @param string hsCode The partial or full HS Code for which you would like to view all of the parents. + * @return FetchResult + */ + getCrossBorderCode({ country, hsCode } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/crossborder/${country}/${hsCode}/hierarchy`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Test whether a form supports online login verification * This API is intended to be useful to identify whether the user should be allowed - * to automatically verify their login and password. This API will provide a result only if the form supports automatic online login verification. - * + * to automatically verify their login and password. This API will provide a result only if the form supports automatic online login verification. + * Swagger Name: AvaTaxClient + * * * @param string form The name of the form you would like to verify. This is the tax form 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:* taxFormCodes, scraperType, expectedResponseTime, requiredFilingCalendarDataFields * @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. * @param int 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 - */ - getLoginVerifierByForm({ form, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/filingcalendars/loginverifiers/${form}`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + getLoginVerifierByForm({ form, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/filingcalendars/loginverifiers/${form}`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List all market place locations. - * - * List all market place locations. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List all market place locations. + * List all market place locations. + * 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 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. * @param int 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 - */ - listAllMarketplaceLocations({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/listallmarketplacelocations`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listAllMarketplaceLocations({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/listallmarketplacelocations`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of the AvaFile Forms available - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of the AvaFile Forms available * This API is deprecated. * * Please use the ListTaxForms API. * * Returns the full list of Avalara-supported AvaFile Forms - * This API is intended to be useful to identify all the different AvaFile Forms - * + * This API is intended to be useful to identify all the different AvaFile Forms + * 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:* outletTypeId * @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. * @param int 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 - */ - listAvaFileForms({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/avafileforms`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listAvaFileForms({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/avafileforms`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List certificate attributes used by a company - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List certificate attributes used by a company * List the certificate attributes defined by a company either specified by the user or the user's default company. * * A certificate may have multiple attributes that control its behavior. You may apply or remove attributes to a * certificate at any time. * * If you see the 'CertCaptureNotConfiguredError', please use CheckProvision and RequestProvision endpoints to - * check and provision account. - * + * check and provision account. + * Swagger Name: AvaTaxClient + * * * @param int companyid Id of the company the user wish to fetch the certificates' attributes from. If not specified the API will use user's default company. * @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 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. * @param int 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 - */ - listCertificateAttributes({ companyid, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/certificateattributes`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listCertificateAttributes({ companyid, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/certificateattributes`, parameters: { companyid: companyid, $filter: filter, @@ -3376,207 +4022,254 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List the certificate exempt reasons defined by a company - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List the certificate exempt reasons defined by a company * List the certificate exempt reasons defined by a company. * * An exemption reason defines why a certificate allows a customer to be exempt * for purposes of tax calculation. * * If you see the 'CertCaptureNotConfiguredError', please use CheckProvision and RequestProvision endpoints to - * check and provision account. - * + * check and provision account. + * 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 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. * @param int 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 - */ - listCertificateExemptReasons({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/certificateexemptreasons`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listCertificateExemptReasons({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/certificateexemptreasons`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List certificate exposure zones used by a company - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List certificate exposure zones used by a company * List the certificate exposure zones defined by a company. * * An exposure zone is a location where a certificate can be valid. Exposure zones may indicate a taxing * authority or other legal entity to which a certificate may apply. * * If you see the 'CertCaptureNotConfiguredError', please use CheckProvision and RequestProvision endpoints to - * check and provision account. - * + * check and provision account. + * 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:* id, companyId, name, tag, description, created, modified, region, country * @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. * @param int 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 - */ - listCertificateExposureZones({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/certificateexposurezones`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listCertificateExposureZones({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/certificateexposurezones`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported usage of extra parameters for classification of a item. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported usage of extra parameters for classification of a item. * Returns the full list of Avalara-supported usage of extra parameters for item classification. * The list of parameters is available for use with Item Classification. - * Some parameters are only available for use if you have subscribed to certain features of AvaTax. - * + * Some parameters are only available for use if you have subscribed to certain features of AvaTax. + * 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 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. * @param int 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 - */ - listClassificationParametersUsage({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/classification/parametersusage`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listClassificationParametersUsage({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/classification/parametersusage`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of communications service types - * - * Returns full list of service types for a given transaction type ID. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of communications service types + * Returns full list of service types for a given transaction type ID. + * Swagger Name: AvaTaxClient + * * * @param int id The transaction type ID to examine * @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:* requiredParameters * @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. * @param int 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 - */ - listCommunicationsServiceTypes({ id, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/communications/transactiontypes/${id}/servicetypes`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listCommunicationsServiceTypes({ id, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/communications/transactiontypes/${id}/servicetypes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of communications transactiontypes - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of communications transactiontypes * Returns full list of communications transaction types which - * are accepted in communication tax calculation requests. - * + * are accepted in communication tax calculation requests. + * 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 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. * @param int 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 - */ - listCommunicationsTransactionTypes({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/communications/transactiontypes`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listCommunicationsTransactionTypes({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/communications/transactiontypes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of communications transaction/service type pairs - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of communications transaction/service type pairs * Returns full list of communications transaction/service type pairs which - * are accepted in communication tax calculation requests. - * + * are accepted in communication tax calculation requests. + * 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:* requiredParameters * @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. * @param int 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 - */ - listCommunicationsTSPairs({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/communications/tspairs`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listCommunicationsTSPairs({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/communications/tspairs`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List all ISO 3166 countries - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List all ISO 3166 countries * Returns a list of all ISO 3166 country codes, and their US English friendly names. * This API is intended to be useful when presenting a dropdown box in your website to allow customers to select a country for - * a shipping address. - * + * a shipping address. + * 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:* alpha3Code, isEuropeanUnion, localizedNames, addressesRequireRegion * @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. * @param int 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 - */ - listCountries({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/countries`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listCountries({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/countries`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List certificate exposure zones used by a company - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List certificate exposure zones used by a company * List available cover letters that can be used when sending invitation to use CertExpress to upload certificates. * * The CoverLetter model represents a message sent along with an invitation to use CertExpress to @@ -3584,31 +4277,37 @@ export default class AvaTaxClient { * certificates directly; this cover letter explains why the invitation was sent. * * If you see the 'CertCaptureNotConfiguredError', please use CheckProvision and RequestProvision endpoints to - * check and provision account. - * + * check and provision account. + * 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:* id, companyId, subject, description, createdDate, modifiedDate, pageCount, templateFilename, version * @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. * @param int 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 - */ - listCoverLetters({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/coverletters`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listCoverLetters({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/coverletters`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Lists the next level of HS Codes given a destination country and HS Code prefix. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Lists the next level of HS Codes given a destination country and HS Code prefix. * Retrieves a list of HS Codes that are the children of the prefix for the given destination country, if * additional children are available. * @@ -3620,33 +4319,39 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API depends on the following active services:*Required* (all): AvaTaxGlobal. - * + * * This API depends on the following active services:*Required* (all): AvaTaxGlobal. + * Swagger Name: AvaTaxClient + * * * @param string country The name or code of the destination country. * @param string hsCode The Section or partial HS Code for which you would like to view the next level of HS Code detail, if more detail is available. * @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:* hsCodeSource, system, destinationCountry, isDecisionNode, zeroPaddingCount, isSystemDefined, isTaxable, effDate, endDate, hsCodeSourceLength * @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. * @param int 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 - */ - listCrossBorderCodes({ country, hsCode, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/crossborder/${country}/${hsCode}`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listCrossBorderCodes({ country, hsCode, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/crossborder/${country}/${hsCode}`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List top level HS Code Sections. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List top level HS Code Sections. * Returns the full list of top level HS Code Sections. Sections are the broadest level of detail for * classifying tariff codes and the items to which they apply. HS Codes are organized * by Section/Chapter/Heading/Subheading/Classification. @@ -3656,143 +4361,174 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API depends on the following active services:*Required* (all): AvaTaxGlobal. - * - * - * @return FetchResult - */ - listCrossBorderSections({ } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/crossborder/sections`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List all ISO 4217 currencies supported by AvaTax. - * + * * This API depends on the following active services:*Required* (all): AvaTaxGlobal. + * Swagger Name: AvaTaxClient + * + * + * @return FetchResult + */ + listCrossBorderSections({ } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/crossborder/sections`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List all ISO 4217 currencies supported by AvaTax. * Lists all ISO 4217 currencies supported by AvaTax. * * This API produces a list of currency codes that can be used when calling AvaTax. The values from this API can be used to fill out the - * `currencyCode` field in a `CreateTransactionModel`. - * + * `currencyCode` field in a `CreateTransactionModel`. + * 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 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. * @param int 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 - */ - listCurrencies({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/currencies`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listCurrencies({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/currencies`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported entity use codes - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported entity use codes * Returns the full list of Avalara-supported entity use codes. * Entity/Use Codes are definitions of the entity who is purchasing something, or the purpose for which the transaction * is occurring. This information is generally used to determine taxability of the product. * In order to facilitate correct reporting of your taxes, you are encouraged to select the proper entity use codes for - * all transactions that are exempt. - * + * all transactions that are exempt. + * 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:* validCountries * @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. * @param int 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 - */ - listEntityUseCodes({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/entityusecodes`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listEntityUseCodes({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/entityusecodes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported filing frequencies. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported filing frequencies. * Returns the full list of Avalara-supported filing frequencies. - * This API is intended to be useful to identify all the different filing frequencies that can be used in notices. - * + * This API is intended to be useful to identify all the different filing frequencies that can be used in notices. + * 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 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. * @param int 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 - */ - listFilingFrequencies({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/filingfrequencies`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listFilingFrequencies({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/filingfrequencies`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List jurisdictions based on the filter provided - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List jurisdictions based on the filter provided * Returns a list of all Avalara-supported taxing jurisdictions. * * This API allows you to examine all Avalara-supported jurisdictions. You can filter your search by supplying * SQL-like query for fetching only the ones you concerned about. For example: effectiveDate > '2016-01-01' * - * The rate, salesRate, and useRate fields are not available on the JurisdictionModels returned by this API. - * + * The rate, salesRate, and useRate fields are not available on the JurisdictionModels returned by this API. + * 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:* rate, salesRate, signatureCode, useRate * @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. * @param int 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 - */ - listJurisdictions({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/jurisdictions`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listJurisdictions({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/jurisdictions`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List jurisdictions near a specific address - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List jurisdictions near a specific address * Returns a list of all Avalara-supported taxing jurisdictions that apply to this address. * * This API allows you to identify which jurisdictions are nearby a specific address according to the best available geocoding information. * It is intended to allow you to create a "Jurisdiction Override", which allows an address to be configured as belonging to a nearby * jurisdiction in AvaTax. * - * The results of this API call can be passed to the `CreateJurisdictionOverride` API call. - * + * The results of this API call can be passed to the `CreateJurisdictionOverride` API call. + * Swagger Name: AvaTaxClient + * * * @param string line1 The first address line portion of this address. * @param string line2 The second address line portion of this address. @@ -3804,12 +4540,12 @@ export default class 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:* country, Jurisdictions * @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. * @param int 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 - */ - listJurisdictionsByAddress({ line1, line2, line3, city, region, postalCode, country, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/jurisdictionsnearaddress`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listJurisdictionsByAddress({ line1, line2, line3, city, region, postalCode, country, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/jurisdictionsnearaddress`, parameters: { line1: line1, line2: line2, @@ -3823,20 +4559,26 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List jurisdictions based on the TaxType, TaxSubType and RateType provided - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List jurisdictions based on the TaxType, TaxSubType and RateType provided * Returns a list of all Avalara-supported taxing jurisdictions filtered by TaxType, TaxSubType and RateType. * * This API allows you to examine all Avalara-supported jurisdictions. You can filter your search by supplying * SQL-like query for fetching only the ones you concerned about. For example: effectiveDate > '2016-01-01' * - * The jurisdictionType, effectiveDate, and endDate are filterable fields available on the JurisdictionRateTypeTaxTypeMappingModels returned by this API. - * + * The jurisdictionType, effectiveDate, and endDate are filterable fields available on the JurisdictionRateTypeTaxTypeMappingModels returned by this API. + * Swagger Name: AvaTaxClient + * * * @param string country The country for which you want to retrieve the jurisdiction information * @param string region The region for which you want to retrieve the jurisdiction information @@ -3846,12 +4588,12 @@ export default class 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:* id, country, state, jurisdictionCode, longName, taxTypeId, taxSubTypeId, taxTypeGroupId, rateTypeId * @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. * @param int 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 - */ - listJurisdictionsByRateTypeTaxTypeMapping({ country, region, taxTypeId, taxSubTypeId, rateTypeId, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/jurisdictions/countries/${country}/regions/${region}/taxtypes/${taxTypeId}/taxsubtypes/${taxSubTypeId}`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listJurisdictionsByRateTypeTaxTypeMapping({ country, region, taxTypeId, taxSubTypeId, rateTypeId, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/jurisdictions/countries/${country}/regions/${region}/taxtypes/${taxTypeId}/taxsubtypes/${taxSubTypeId}`, parameters: { rateTypeId: rateTypeId, $filter: filter, @@ -3859,20 +4601,26 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the list of questions that are required for a tax location - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the list of questions that are required for a tax location * Returns the list of additional questions you must answer when declaring a location in certain taxing jurisdictions. * Some tax jurisdictions require that you register or provide additional information to configure each physical place where * your company does business. * This information is not usually required in order to calculate tax correctly, but is almost always required to file your tax correctly. * You can call this API call for any address and obtain information about what questions must be answered in order to properly - * file tax in that location. - * + * file tax in that location. + * Swagger Name: AvaTaxClient + * * * @param string line1 The first line of this location's address. * @param string line2 The second line of this location's address. @@ -3886,12 +4634,12 @@ export default class 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 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. * @param int 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 - */ - listLocationQuestionsByAddress({ line1, line2, line3, city, region, postalCode, country, latitude, longitude, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/locationquestions`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listLocationQuestionsByAddress({ line1, line2, line3, city, region, postalCode, country, latitude, longitude, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/locationquestions`, parameters: { line1: line1, line2: line2, @@ -3907,98 +4655,122 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List all forms where logins can be verified automatically - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List all forms where logins can be verified automatically * List all forms where logins can be verified automatically. * This API is intended to be useful to identify whether the user should be allowed - * to automatically verify their login and password. - * + * to automatically verify their login and password. + * 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:* taxFormCodes, scraperType, expectedResponseTime, requiredFilingCalendarDataFields * @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. * @param int 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 - */ - listLoginVerifiers({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/filingcalendars/loginverifiers`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listLoginVerifiers({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/filingcalendars/loginverifiers`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the list of locations for a marketplace. - * - * Retrieves the list of suggested locations for a marketplace. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the list of locations for a marketplace. + * Retrieves the list of suggested locations for a marketplace. + * Swagger Name: AvaTaxClient + * * * @param string marketplaceId MarketplaceId of a marketplace * @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. * @param int 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 - */ - listMarketplaceLocations({ marketplaceId, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/marketplacelocations`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listMarketplaceLocations({ marketplaceId, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/marketplacelocations`, parameters: { marketplaceId: marketplaceId, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported nexus for all countries and regions. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported nexus for all countries and regions. * Returns the full list of all Avalara-supported nexus for all countries and regions. * - * This API is intended to be useful if your user interface needs to display a selectable list of nexus. - * + * This API is intended to be useful if your user interface needs to display a selectable list of nexus. + * 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:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters, taxableNexus * @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. * @param int 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 - */ - listNexus({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/nexus`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listNexus({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/nexus`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List all nexus that apply to a specific address. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List all nexus that apply to a specific address. * Returns a list of all Avalara-supported taxing jurisdictions that apply to this address. * This API allows you to identify which tax authorities apply to a physical location, salesperson address, or point of sale. * In general, it is usually expected that a company will declare nexus in all the jurisdictions that apply to each physical address * where the company does business. - * The results of this API call can be passed to the 'Create Nexus' API call to declare nexus for this address. - * + * The results of this API call can be passed to the 'Create Nexus' API call to declare nexus for this address. + * Swagger Name: AvaTaxClient + * * * @param string line1 The first address line portion of this address. * @param string line2 The first address line portion of this address. @@ -4010,12 +4782,12 @@ export default class 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:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters, taxableNexus * @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. * @param int 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 - */ - listNexusByAddress({ line1, line2, line3, city, region, postalCode, country, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/nexus/byaddress`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listNexusByAddress({ line1, line2, line3, city, region, postalCode, country, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/nexus/byaddress`, parameters: { line1: line1, line2: line2, @@ -4029,70 +4801,87 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported nexus for a country. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported nexus for a country. * Returns all Avalara-supported nexus for the specified country. * - * This API is intended to be useful if your user interface needs to display a selectable list of nexus filtered by country. - * + * This API is intended to be useful if your user interface needs to display a selectable list of nexus filtered by country. + * Swagger Name: AvaTaxClient + * * * @param string country The country in which you want to fetch the system nexus * @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:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters, taxableNexus * @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. * @param int 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 - */ - listNexusByCountry({ country, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/nexus/${country}`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listNexusByCountry({ country, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/nexus/${country}`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported nexus for a country and region. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported nexus for a country and region. * Returns all Avalara-supported nexus for the specified country and region. * - * This API is intended to be useful if your user interface needs to display a selectable list of nexus filtered by country and region. - * + * This API is intended to be useful if your user interface needs to display a selectable list of nexus filtered by country and region. + * Swagger Name: AvaTaxClient + * * * @param string country The two-character ISO-3166 code for the country. * @param string region The two or three character region code for the region. * @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:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters, taxableNexus * @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. * @param int 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 - */ - listNexusByCountryAndRegion({ country, region, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/nexus/${country}/${region}`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listNexusByCountryAndRegion({ country, region, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/nexus/${country}/${region}`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List nexus related to a tax form - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List nexus related to a tax form * Retrieves a list of nexus related to a tax form. * * The concept of `Nexus` indicates a place where your company has sufficient physical presence and is obligated @@ -4107,338 +4896,416 @@ export default class AvaTaxClient { * * ### Security Policies * - * * 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. - * - * - * @param string formCode The form code that we are looking up the nexus for - * @return object - */ - listNexusByFormCode({ formCode } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/nexus/byform/${formCode}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported nexus for a tax type group. - * + * * 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. + * Swagger Name: AvaTaxClient + * + * + * @param string formCode The form code that we are looking up the nexus for + * @return object + */ + listNexusByFormCode({ formCode } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/nexus/byform/${formCode}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported nexus for a tax type group. * Returns all Avalara-supported nexus for the specified specified tax type group. * - * This API is intended to be useful if your user interface needs to display a selectable list of nexus filtered by tax type group. - * + * This API is intended to be useful if your user interface needs to display a selectable list of nexus filtered by tax type group. + * Swagger Name: AvaTaxClient + * * * @param string taxTypeGroup The tax type group to fetch the supporting system nexus for. * @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:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters, taxableNexus * @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. * @param int 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 - */ - listNexusByTaxTypeGroup({ taxTypeGroup, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/nexus/bytaxtypegroup/${taxTypeGroup}`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listNexusByTaxTypeGroup({ taxTypeGroup, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/nexus/bytaxtypegroup/${taxTypeGroup}`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of nexus tax type groups - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of nexus tax type groups * Returns the full list of Avalara-supported nexus tax type groups - * This API is intended to be useful to identify all the different tax sub-types. - * + * This API is intended to be useful to identify all the different tax sub-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/).
*Not filterable:* subscriptionTypeId, subscriptionDescription, tabName, showColumn * @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. * @param int 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 - */ - listNexusTaxTypeGroups({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/nexustaxtypegroups`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listNexusTaxTypeGroups({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/nexustaxtypegroups`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported tax notice customer funding options. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported tax notice customer funding options. * Returns the full list of Avalara-supported tax notice customer funding options. - * This API is intended to be useful to identify all the different notice customer funding options that can be used in notices. - * + * This API is intended to be useful to identify all the different notice customer funding options that can be used in notices. + * 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:* activeFlag, sortOrder * @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. * @param int 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 - */ - listNoticeCustomerFundingOptions({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/noticecustomerfundingoptions`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listNoticeCustomerFundingOptions({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/noticecustomerfundingoptions`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported tax notice customer types. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported tax notice customer types. * Returns the full list of Avalara-supported tax notice customer types. - * This API is intended to be useful to identify all the different notice customer types. - * + * This API is intended to be useful to identify all the different notice customer 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/).
*Not filterable:* activeFlag, sortOrder * @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. * @param int 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 - */ - listNoticeCustomerTypes({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/noticecustomertypes`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listNoticeCustomerTypes({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/noticecustomertypes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported tax notice filing types. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported tax notice filing types. * Returns the full list of Avalara-supported tax notice filing types. - * This API is intended to be useful to identify all the different notice filing types that can be used in notices. - * + * This API is intended to be useful to identify all the different notice filing types that can be used in notices. + * 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:* description, activeFlag, sortOrder * @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. * @param int 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 - */ - listNoticeFilingtypes({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/noticefilingtypes`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listNoticeFilingtypes({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/noticefilingtypes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported tax notice priorities. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported tax notice priorities. * Returns the full list of Avalara-supported tax notice priorities. - * This API is intended to be useful to identify all the different notice priorities that can be used in notices. - * + * This API is intended to be useful to identify all the different notice priorities that can be used in notices. + * 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:* activeFlag, sortOrder * @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. * @param int 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 - */ - listNoticePriorities({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/noticepriorities`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listNoticePriorities({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/noticepriorities`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported tax notice reasons. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported tax notice reasons. * Returns the full list of Avalara-supported tax notice reasons. - * This API is intended to be useful to identify all the different tax notice reasons. - * + * This API is intended to be useful to identify all the different tax notice reasons. + * 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:* description, activeFlag, sortOrder * @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. * @param int 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 - */ - listNoticeReasons({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/noticereasons`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listNoticeReasons({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/noticereasons`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported tax notice responsibility ids - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported tax notice responsibility ids * Returns the full list of Avalara-supported tax notice responsibility ids - * This API is intended to be useful to identify all the different tax notice responsibilities. - * + * This API is intended to be useful to identify all the different tax notice responsibilities. + * 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:* sortOrder * @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. * @param int 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 - */ - listNoticeResponsibilities({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/noticeresponsibilities`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listNoticeResponsibilities({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/noticeresponsibilities`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported tax notice root causes - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported tax notice root causes * Returns the full list of Avalara-supported tax notice root causes - * This API is intended to be useful to identify all the different tax notice root causes. - * + * This API is intended to be useful to identify all the different tax notice root causes. + * 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:* sortOrder * @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. * @param int 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 - */ - listNoticeRootCauses({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/noticerootcauses`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listNoticeRootCauses({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/noticerootcauses`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported tax notice statuses. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported tax notice statuses. * Returns the full list of Avalara-supported tax notice statuses. - * This API is intended to be useful to identify all the different tax notice statuses. - * + * This API is intended to be useful to identify all the different tax notice statuses. + * 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:* isOpen, sortOrder * @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. * @param int 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 - */ - listNoticeStatuses({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/noticestatuses`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listNoticeStatuses({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/noticestatuses`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported tax notice types. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported tax notice types. * Returns the full list of Avalara-supported tax notice types. - * This API is intended to be useful to identify all the different notice types that can be used in notices. - * + * This API is intended to be useful to identify all the different notice types that can be used in notices. + * 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:* activeFlag, sortOrder * @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. * @param int 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 - */ - listNoticeTypes({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/noticetypes`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listNoticeTypes({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/noticetypes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported extra parameters for creating transactions. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported extra parameters for creating transactions. * Returns the full list of Avalara-supported extra parameters for the 'Create Transaction' API call. * This list of parameters is available for use when configuring your transaction. - * Some parameters are only available for use if you have subscribed to certain features of AvaTax. - * + * Some parameters are only available for use if you have subscribed to certain features of AvaTax. + * 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 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. * @param int 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 - */ - listParameters({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/parameters`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listParameters({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/parameters`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the parameters by companyCode and itemCode. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the parameters by companyCode and itemCode. * Returns the list of parameters based on the company's service types and the item code. * Ignores nexus if a service type is configured in the 'IgnoreNexusForServiceTypes' configuration section. * Ignores nexus for the AvaAlcohol service type. @@ -4452,107 +5319,131 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: 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 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. * @param int 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 - */ - listParametersByItem({ companyCode, itemCode, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/parameters/byitem/${companyCode}/${itemCode}`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listParametersByItem({ companyCode, itemCode, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/parameters/byitem/${companyCode}/${itemCode}`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported usage of extra parameters for creating transactions. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported usage of extra parameters for creating transactions. * Returns the full list of Avalara-supported usage of extra parameters for the 'Create Transaction' API call. * This list of parameters is available for use when configuring your transaction. - * Some parameters are only available for use if you have subscribed to certain features of AvaTax. - * + * Some parameters are only available for use if you have subscribed to certain features of AvaTax. + * 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 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. * @param int 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 - */ - listParametersUsage({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/parametersusage`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listParametersUsage({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/parametersusage`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported permissions - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported permissions * Returns the full list of Avalara-supported permission types. - * This API is intended to be useful to identify the capabilities of a particular user logon. - * + * This API is intended to be useful to identify the capabilities of a particular user logon. + * Swagger Name: AvaTaxClient + * * * @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. - * @param int skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @return FetchResult - */ - listPermissions({ top, skip } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/permissions`, + * @param int skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. + * @return FetchResult + */ + listPermissions({ top, skip } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/permissions`, parameters: { $top: top, $skip: skip } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported postal codes. - * - * Retrieves the list of Avalara-supported postal codes. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported postal codes. + * Retrieves the list of Avalara-supported postal codes. + * 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 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. * @param int 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 - */ - listPostalCodes({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/postalcodes`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listPostalCodes({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/postalcodes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List all customs duty programs recognized by AvaTax - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List all customs duty programs recognized by AvaTax * List all preferred customs duty programs recognized by AvaTax. * * A customs duty program is an optional program you can use to obtain favorable treatment from customs and duty agents. @@ -4561,47 +5452,54 @@ export default class AvaTaxClient { * * To select a preferred program for calculating customs and duty rates, call this API to find the appropriate code for your * preferred program. Next, set the parameter `AvaTax.LC.PreferredProgram` in your `CreateTransaction` call to the code of - * the program. - * + * the program. + * 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:* effectiveDate, endDate * @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. * @param int 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 - */ - listPreferredPrograms({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/preferredprograms`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listPreferredPrograms({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/preferredprograms`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List all available product classification systems. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List all available product classification systems. * List all available product classification systems. * * Tax authorities use product classification systems as a way to identify products and associate them with a tax rate. - * More than one tax authority might use the same product classification system, but they might charge different tax rates for products. - * + * More than one tax authority might use the same product classification system, but they might charge different tax rates for products. + * 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:* countries * @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. * @param int 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 countryCode If not null, return all records with this code. - * @return FetchResult - */ - listProductClassificationSystems({ filter, top, skip, orderBy, countryCode } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/productclassificationsystems`, + * @param string countryCode If not null, return all records with this code. + * @return FetchResult + */ + listProductClassificationSystems({ filter, top, skip, orderBy, countryCode } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/productclassificationsystems`, parameters: { $filter: filter, $top: top, @@ -4609,13 +5507,18 @@ export default class AvaTaxClient { $orderBy: orderBy, $countryCode: countryCode } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List all product classification systems available to a company based on its nexus. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List all product classification systems available to a company based on its nexus. * Lists all product classification systems available to a company based on its nexus. * * Tax authorities use product classification systems as a way to identify products and associate them with a tax rate. @@ -4627,20 +5530,21 @@ export default class AvaTaxClient { * * Replace '+' with '\_-ava2b-\_' For example: 'Company+Code' becomes 'Company_-ava2b-_Code' * * Replace '?' with '\_-ava3f-\_' For example: 'Company?Code' becomes 'Company_-ava3f-_Code' * * Replace '%' with '\_-ava25-\_' For example: 'Company%Code' becomes 'Company_-ava25-_Code' - * * Replace '#' with '\_-ava23-\_' For example: 'Company#Code' becomes 'Company_-ava23-_Code' - * + * * Replace '#' with '\_-ava23-\_' For example: 'Company#Code' becomes 'Company_-ava23-_Code' + * Swagger Name: AvaTaxClient + * * * @param string companyCode The company 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:* countries * @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. * @param int 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 countryCode If not null, return all records with this code. - * @return FetchResult - */ - listProductClassificationSystemsByCompany({ companyCode, filter, top, skip, orderBy, countryCode } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/productclassificationsystems/bycompany/${companyCode}`, + * @param string countryCode If not null, return all records with this code. + * @return FetchResult + */ + listProductClassificationSystemsByCompany({ companyCode, filter, top, skip, orderBy, countryCode } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/productclassificationsystems/bycompany/${companyCode}`, parameters: { $filter: filter, $top: top, @@ -4648,43 +5552,55 @@ export default class AvaTaxClient { $orderBy: orderBy, $countryCode: countryCode } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of rate types for each country - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of rate types for each country * Returns the full list of Avalara-supported rate type file types - * This API is intended to be useful to identify all the different rate types. - * + * This API is intended to be useful to identify all the different rate types. + * Swagger Name: AvaTaxClient + * * * @param string country The country to examine for rate types * @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 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. * @param int 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 - */ - listRateTypesByCountry({ country, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/countries/${country}/ratetypes`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listRateTypesByCountry({ country, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/countries/${country}/ratetypes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the list of rate types by country, TaxType and by TaxSubType - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the list of rate types by country, TaxType and by TaxSubType * Returns the list of Avalara-supported rate type file types - * This API is intended to be useful to identify all the different rate types. - * + * This API is intended to be useful to identify all the different rate types. + * Swagger Name: AvaTaxClient + * * * @param string country The country to examine for rate types * @param string taxTypeId The taxType for the country to examine for rate types @@ -4692,293 +5608,358 @@ export default class 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:* id, rateType, description * @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. * @param int 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 - */ - listRateTypesByCountryTaxTypeTaxSubType({ country, taxTypeId, taxSubTypeId, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/countries/${country}/taxtypes/${taxTypeId}/taxsubtypes/${taxSubTypeId}/ratetypes`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listRateTypesByCountryTaxTypeTaxSubType({ country, taxTypeId, taxSubTypeId, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/countries/${country}/taxtypes/${taxTypeId}/taxsubtypes/${taxSubTypeId}/ratetypes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List all ISO 3166 regions - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List all ISO 3166 regions * Returns a list of all ISO 3166 region codes and their US English friendly names. * This API is intended to be useful when presenting a dropdown box in your website to allow customers to select a region - * within the country for a shipping addresses. - * + * within the country for a shipping addresses. + * 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:* localizedNames * @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. * @param int 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 - */ - listRegions({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/regions`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listRegions({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/regions`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List all ISO 3166 regions for a country - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List all ISO 3166 regions for a country * Returns a list of all ISO 3166 region codes for a specific country code, and their US English friendly names. * This API is intended to be useful when presenting a dropdown box in your website to allow customers to select a region - * within the country for a shipping addresses. - * + * within the country for a shipping addresses. + * Swagger Name: AvaTaxClient + * * * @param string country The country of which you want to fetch ISO 3166 regions * @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:* localizedNames * @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. * @param int 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 - */ - listRegionsByCountry({ country, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/countries/${country}/regions`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listRegionsByCountry({ country, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/countries/${country}/regions`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported resource file types - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * 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. - * + * 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 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. * @param int 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 } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/resourcefiletypes`, + * @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 } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/resourcefiletypes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported usage of parameters used for returns. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * 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. * This list of parameters is available for use with Returns. - * Some parameters are only available for use if you have subscribed to certain features of AvaTax. - * + * Some parameters are only available for use if you have subscribed to certain features of AvaTax. + * 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 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. * @param int 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 - */ - listReturnsParametersUsage({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/returns/parametersusage`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listReturnsParametersUsage({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/returns/parametersusage`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported permissions - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported permissions * Returns the full list of Avalara-supported permission types. * This API is intended to be useful when designing a user interface for selecting the security role of a user account. - * Some security roles are restricted for Avalara internal use. - * + * Some security roles are restricted for Avalara internal use. + * 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 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. * @param int 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 - */ - listSecurityRoles({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/securityroles`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listSecurityRoles({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/securityroles`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported subscription types - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported subscription types * Returns the full list of Avalara-supported subscription types. * This API is intended to be useful for identifying which features you have added to your account. * You may always contact Avalara's sales department for information on available products or services. - * You cannot change your subscriptions directly through the API. - * + * You cannot change your subscriptions directly through the API. + * 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 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. * @param int 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 - */ - listSubscriptionTypes({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/subscriptiontypes`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listSubscriptionTypes({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/subscriptiontypes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the list all tags supported by avalara - * - * Retrieves the list of suggested locations for a marketplace. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the list all tags supported by avalara + * Retrieves the list of suggested locations for a marketplace. + * 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 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. * @param int 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 - */ - listTags({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/tags`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listTags({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/tags`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported tax authorities. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported tax authorities. * Returns the full list of Avalara-supported tax authorities. - * This API is intended to be useful to identify all the different authorities that receive tax. - * + * This API is intended to be useful to identify all the different authorities that receive tax. + * 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 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. * @param int 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 - */ - listTaxAuthorities({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/taxauthorities`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listTaxAuthorities({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/taxauthorities`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported forms for each tax authority. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported forms for each tax authority. * Returns the full list of Avalara-supported forms for each tax authority. * This list represents tax forms that Avalara recognizes. * Customers who subscribe to Avalara Managed Returns Service can request these forms to be filed automatically - * based on the customer's AvaTax data. - * + * based on the customer's AvaTax data. + * 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 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. * @param int 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 - */ - listTaxAuthorityForms({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/taxauthorityforms`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listTaxAuthorityForms({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/taxauthorityforms`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported tax authority types. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported tax authority types. * Returns the full list of Avalara-supported tax authority types. - * This API is intended to be useful to identify all the different authority types. - * + * This API is intended to be useful to identify all the different authority 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 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. * @param int 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 - */ - listTaxAuthorityTypes({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/taxauthoritytypes`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listTaxAuthorityTypes({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/taxauthoritytypes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported tax codes. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported tax codes. * Retrieves the list of Avalara-supported system tax codes. * A 'TaxCode' represents a uniquely identified type of product, good, or service. * Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions. @@ -4987,216 +5968,265 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * 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 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. * @param int 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 - */ - listTaxCodes({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/taxcodes`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listTaxCodes({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/taxcodes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of Avalara-supported tax code types. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of Avalara-supported tax code types. * Returns the full list of recognized tax code types. * A 'Tax Code Type' represents a broad category of tax codes, and is less detailed than a single TaxCode. - * This API is intended to be useful for broadly searching for tax codes by tax code type. - * + * This API is intended to be useful for broadly searching for tax codes by tax code type. + * Swagger Name: AvaTaxClient + * * * @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. - * @param int skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @return object - */ - listTaxCodeTypes({ top, skip } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/taxcodetypes`, + * @param int skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. + * @return object + */ + listTaxCodeTypes({ top, skip } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/taxcodetypes`, parameters: { $top: top, $skip: skip } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of the Tax Forms available - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of the Tax Forms available * Returns the full list of Avalara-supported Tax Forms - * This API is intended to be useful to identify all the different Tax Forms - * + * This API is intended to be useful to identify all the different Tax Forms + * 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 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. * @param int 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 - */ - listTaxForms({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/taxforms`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listTaxForms({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/taxforms`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of tax sub types - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of tax sub types * Returns the full list of Avalara-supported tax sub-types - * This API is intended to be useful to identify all the different tax sub-types. - * + * This API is intended to be useful to identify all the different tax sub-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 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. * @param int 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 - */ - listTaxSubTypes({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/taxsubtypes`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listTaxSubTypes({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/taxsubtypes`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of tax sub types by Country and TaxType - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of tax sub types by Country and TaxType * Returns the full list of Avalara-supported tax sub-types - * This API is intended to be useful to identify all the different tax sub-types for given country and TaxType. - * + * This API is intended to be useful to identify all the different tax sub-types for given country and TaxType. + * Swagger Name: AvaTaxClient + * * * @param string country The country to examine for taxsubtype * @param string taxTypeId The taxType for the country to examine for taxsubtype * @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 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. * @param int 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 - */ - listTaxSubTypesByCountryAndTaxType({ country, taxTypeId, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/taxsubtypes/countries/${country}/taxtypes/${taxTypeId}`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listTaxSubTypesByCountryAndTaxType({ country, taxTypeId, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/taxsubtypes/countries/${country}/taxtypes/${taxTypeId}`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of tax sub types by jurisdiction code and region - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of tax sub types by jurisdiction code and region * Returns the full list of Avalara-supported tax sub-types by jurisdiction and region - * This API is intended to be useful to identify all the different tax sub-types. - * + * This API is intended to be useful to identify all the different tax sub-types. + * Swagger Name: AvaTaxClient + * * * @param string jurisdictionCode The jurisdiction code of the tax sub type. * @param string region The region of the tax sub type. * @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 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. * @param int 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 - */ - listTaxSubTypesByJurisdictionAndRegion({ jurisdictionCode, region, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/taxsubtypes/${jurisdictionCode}/${region}`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listTaxSubTypesByJurisdictionAndRegion({ jurisdictionCode, region, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/taxsubtypes/${jurisdictionCode}/${region}`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the full list of tax type groups - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the full list of tax type groups * Returns the full list of Avalara-supported tax type groups - * This API is intended to be useful to identify all the different tax type groups. - * + * This API is intended to be useful to identify all the different tax type groups. + * 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:* subscriptionTypeId, subscriptionDescription, tabName, showColumn, displaySequence * @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. * @param int 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 - */ - listTaxTypeGroups({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/taxtypegroups`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listTaxTypeGroups({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/taxtypegroups`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the list of applicable TaxTypes - * - * Retrieves the list of applicable TaxTypes based on Nexus of the company. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the list of applicable TaxTypes + * Retrieves the list of applicable TaxTypes based on Nexus of the company. + * Swagger Name: AvaTaxClient + * * * @param string country The country for which you want to retrieve the unitofbasis information * @param int companyId Your companyId to retrieve the applicable taxtypes * @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. * @param int 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 - */ - listTaxTypesByNexusAndCountry({ country, companyId, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/taxtypes/countries/${country}`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listTaxTypesByNexusAndCountry({ country, companyId, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/taxtypes/countries/${country}`, parameters: { companyId: companyId, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve the list of applicable UnitOfBasis - * - * Retrieves the list of applicable UnitOfBasis - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve the list of applicable UnitOfBasis + * Retrieves the list of applicable UnitOfBasis + * Swagger Name: AvaTaxClient + * * * @param string country The country for which you want to retrieve the unitofbasis information * @param string taxTypeId The taxtype for which you want to retrieve the unitofbasis information @@ -5204,52 +6234,63 @@ export default class AvaTaxClient { * @param string rateTypeId The ratetype for which you want to retrieve the unitofbasis information * @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. * @param int 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 - */ - listUnitOfBasisByCountryAndTaxTypeAndTaxSubTypeAndRateType({ country, taxTypeId, taxSubTypeId, rateTypeId, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/unitofbasis/countries/${country}/taxtypes/${taxTypeId}/taxsubtypes/${taxSubTypeId}`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listUnitOfBasisByCountryAndTaxTypeAndTaxSubTypeAndRateType({ country, taxTypeId, taxSubTypeId, rateTypeId, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/unitofbasis/countries/${country}/taxtypes/${taxTypeId}/taxsubtypes/${taxSubTypeId}`, parameters: { rateTypeId: rateTypeId, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List all defined units of measurement - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List all defined units of measurement * List all units of measurement systems defined by Avalara. * - * A unit of measurement system is a method of measuring a quantity, such as distance, mass, or others. - * + * A unit of measurement system is a method of measuring a quantity, such as distance, mass, or others. + * 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:* id * @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. * @param int 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 - */ - listUnitOfMeasurement({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/definitions/unitofmeasurements`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listUnitOfMeasurement({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/definitions/unitofmeasurements`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Create one or more DistanceThreshold objects - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Create one or more DistanceThreshold objects * Create one or more DistanceThreshold objects for this company. * * A company-distance-threshold model indicates the distance between a company @@ -5258,24 +6299,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that owns this DistanceThreshold - * @param object[] model The DistanceThreshold object or objects you wish to create. - * @return object[] - */ - createDistanceThreshold({ companyId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/distancethresholds`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Delete a single DistanceThreshold object - * + * @param object[] model The DistanceThreshold object or objects you wish to create. + * @return object[] + */ + createDistanceThreshold({ companyId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/distancethresholds`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Delete a single DistanceThreshold object * Marks the DistanceThreshold object identified by this URL as deleted. * * A company-distance-threshold model indicates the distance between a company @@ -5284,24 +6331,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that owns this DistanceThreshold - * @param int id The unique ID number of the DistanceThreshold object you wish to delete. - * @return object[] - */ - deleteDistanceThreshold({ companyId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/distancethresholds/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Retrieve a single DistanceThreshold - * + * @param int id The unique ID number of the DistanceThreshold object you wish to delete. + * @return object[] + */ + deleteDistanceThreshold({ companyId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/distancethresholds/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single DistanceThreshold * Retrieves a single DistanceThreshold object defined by this URL. * * A company-distance-threshold model indicates the distance between a company @@ -5310,24 +6363,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this DistanceThreshold object - * @param int id The unique ID number referring to this DistanceThreshold object - * @return object - */ - getDistanceThreshold({ companyId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/distancethresholds/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all DistanceThresholds for this company. - * + * @param int id The unique ID number referring to this DistanceThreshold object + * @return object + */ + getDistanceThreshold({ companyId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/distancethresholds/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all DistanceThresholds for this company. * Lists all DistanceThreshold objects that belong to this company. * * A company-distance-threshold model indicates the distance between a company @@ -5336,20 +6395,21 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company whose DistanceThreshold objects you wish to list. * @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 string include A comma separated list of additional data to retrieve. * @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. * @param int 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 - */ - listDistanceThresholds({ companyId, filter, include, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/distancethresholds`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listDistanceThresholds({ companyId, filter, include, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/distancethresholds`, parameters: { $filter: filter, $include: include, @@ -5357,13 +6417,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all DistanceThreshold objects - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all DistanceThreshold objects * Lists all DistanceThreshold objects that belong to this account. * * A company-distance-threshold model indicates the distance between a company @@ -5375,19 +6440,20 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * 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 string include A comma separated list of additional data to retrieve. * @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. * @param int 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 - */ - queryDistanceThresholds({ filter, include, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/distancethresholds`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + queryDistanceThresholds({ filter, include, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/distancethresholds`, parameters: { $filter: filter, $include: include, @@ -5395,13 +6461,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Update a DistanceThreshold object - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Update a DistanceThreshold object * Replace the existing DistanceThreshold object at this URL with an updated object. * * A company-distance-threshold model indicates the distance between a company @@ -5413,73 +6484,91 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company that owns this DistanceThreshold object. * @param int id The unique ID number of the DistanceThreshold object to replace. - * @param object model The new DistanceThreshold object to store. - * @return object - */ - updateDistanceThreshold({ companyId, id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/distancethresholds/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Create a new eCommerce token. - * + * @param object model The new DistanceThreshold object to store. + * @return object + */ + updateDistanceThreshold({ companyId, id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/distancethresholds/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Create a new eCommerce token. * Creates a new eCommerce token. * * This API is used to create a new eCommerce token. An eCommerce token is required in order to launch the CertCapture eCommerce plugin. Create a token for each of your CertCapture customers. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The company ID that will be issued this certificate. - * @param object model - * @return object - */ - createECommerceToken({ companyId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/ecommercetokens`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Refresh an eCommerce token. - * + * @param object model + * @return object + */ + createECommerceToken({ companyId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/ecommercetokens`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Refresh an eCommerce token. * Refresh an eCommerce token. * * CertCapture eCommerce tokens expire after one hour. This API is used to refresh an eCommerce token that is about to expire. This API can only be used with active tokens. If your token has expired, you must generate a new one. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The company ID that the refreshed certificate belongs to. - * @param object model - * @return FetchResult - */ - refreshECommerceToken({ companyId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/ecommercetokens`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Add or Edit options - * + * @param object model + * @return FetchResult + */ + refreshECommerceToken({ companyId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/ecommercetokens`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Add or Edit options * Returns a list of options for adding tax forms for the company and tax form code specified. * Returns edit options when modifying a filing calendar. * This API is available by invitation only. @@ -5487,68 +6576,81 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires openId bearer token for authentication - * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - * + * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID of the company that owns the filing calendar object - * @param object model Cycle Safe Options Request - * @return object - */ - cycleSafeOptions({ companyId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/filingcalendars/edit/cycleSafeOptions`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Delete a company return setting - * + * @param object model Cycle Safe Options Request + * @return object + */ + cycleSafeOptions({ companyId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/filingcalendars/edit/cycleSafeOptions`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Delete a company return setting * This API is available by invitation only and only available for users with Compliance access * * ### Security Policies * * * This API requires openId bearer token for authentication - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID of the company * @param int filingCalendarId The unique ID of the filing calendar that will remove setting - * @param int companyReturnSettingId The unique ID of the company return setting that will be deleted from the filing calendar - * @return object[] - */ - deleteCompanyReturnSettings({ companyId, filingCalendarId, companyReturnSettingId } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/filingcalendars/${filingCalendarId}/setting/${companyReturnSettingId}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Retrieve all legacy filing calendars for this company - * + * @param int companyReturnSettingId The unique ID of the company return setting that will be deleted from the filing calendar + * @return object[] + */ + deleteCompanyReturnSettings({ companyId, filingCalendarId, companyReturnSettingId } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/filingcalendars/${filingCalendarId}/setting/${companyReturnSettingId}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all legacy filing calendars for this company * This API is available by invitation only. * * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - * + * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns these batches - * @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:* taxAuthorityId, taxAuthorityName, taxAuthorityType, settings + * @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:* taxTypes, taxAuthorityId, taxAuthorityName, taxAuthorityType, settings * @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. * @param int 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 returnCountry A comma separated list of countries - * @param string returnRegion A comma separated list of regions - * @return FetchResult - */ - legacyFilingCalendars({ companyId, filter, top, skip, orderBy, returnCountry, returnRegion } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/filingcalendars/Legacy`, + * @param string returnRegion A comma separated list of regions + * @return FetchResult + */ + legacyFilingCalendars({ companyId, filter, top, skip, orderBy, returnCountry, returnRegion } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/filingcalendars/Legacy`, parameters: { $filter: filter, $top: top, @@ -5557,41 +6659,53 @@ export default class AvaTaxClient { returnCountry: returnCountry, returnRegion: returnRegion } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve a filing containing the return and all its accrual returns. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a filing containing the return and all its accrual returns. * ### Security Policies * * * This API requires openId bearer token for authentication - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns these returns - * @param int filingReturnId The ID of the filing return - * @return FetchResult - */ - getAccrualFilings({ companyId, filingReturnId } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/filings/accrual/${filingReturnId}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve a list of filed returns for the specified company in the year and month of a given filing period. - * + * @param int filingReturnId The ID of the filing return + * @return FetchResult + */ + getAccrualFilings({ companyId, filingReturnId } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/filings/accrual/${filingReturnId}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a list of filed returns for the specified company in the year and month of a given filing period. * ### Security Policies * * * This API requires openId bearer token for authentication * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. * * This API is available by invitation only.*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser, CompanyUser, AccountUser, CompanyAdmin, AccountAdmin. - * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - * + * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns these batches * @param int endPeriodMonth The month of the period you are trying to retrieve @@ -5601,12 +6715,12 @@ export default class AvaTaxClient { * @param string country The country of the return(s) you are trying to retrieve * @param string region The region of the return(s) you are trying to retrieve * @param int filingCalendarId The filing calendar id of the return you are trying to retrieve - * @param string taxformCode The unique tax form code of the form. - * @return FetchResult - */ - getFiledReturns({ companyId, endPeriodMonth, endPeriodYear, frequency, status, country, region, filingCalendarId, taxformCode } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/filings/returns/filed`, + * @param string taxformCode The unique tax form code of the form. + * @return FetchResult + */ + getFiledReturns({ companyId, endPeriodMonth, endPeriodYear, frequency, status, country, region, filingCalendarId, taxformCode } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/filings/returns/filed`, parameters: { endPeriodMonth: endPeriodMonth, endPeriodYear: endPeriodYear, @@ -5617,34 +6731,45 @@ export default class AvaTaxClient { filingCalendarId: filingCalendarId, taxformCode: taxformCode } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Approves linkage to a firm for a client account - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Approves linkage to a firm for a client account * This API enables the account admin of a client account to approve linkage request by a firm. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * - * - * @param int id - * @return object - */ - approveFirmClientLinkage({ id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/firmclientlinkages/${id}/approve`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: null }); - } - - /** - * Request a new FirmClient account and create an approved linkage to it - * + * * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * + * + * @param int id + * @return object + */ + approveFirmClientLinkage({ id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/firmclientlinkages/${id}/approve`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: null, clientId: strClientId }); + } + + /** + * Request a new FirmClient account and create an approved linkage to it * This API is for use by Firms only. * * Avalara allows firms to manage returns for clients without the clients needing to use AvaTax service. @@ -5658,172 +6783,220 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SystemAdmin. - * - * - * @param object model Information about the account you wish to create. - * @return object - */ - createAndLinkNewFirmClientAccount({ model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/firmclientlinkages/createandlinkclient`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Links a firm account with the client account - * + * * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SystemAdmin. + * Swagger Name: AvaTaxClient + * + * + * @param object model Information about the account you wish to create. + * @return object + */ + createAndLinkNewFirmClientAccount({ model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/firmclientlinkages/createandlinkclient`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Links a firm account with the client account * This API enables the firm admins/firm users to request the linkage of a firm account and a client account. * * ### Security Policies * - * * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * - * - * @param object model FirmClientLinkageInputModel - * @return object - */ - createFirmClientLinkage({ model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/firmclientlinkages`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Delete a linkage - * + * * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * + * + * @param object model FirmClientLinkageInputModel + * @return object + */ + createFirmClientLinkage({ model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/firmclientlinkages`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Delete a linkage * This API marks a linkage between a firm and client as deleted. * * ### Security Policies * - * * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * - * - * @param int id - * @return object[] - */ - deleteFirmClientLinkage({ id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/firmclientlinkages/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Get linkage between a firm and client by id - * + * * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * + * + * @param int id + * @return object[] + */ + deleteFirmClientLinkage({ id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/firmclientlinkages/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Get linkage between a firm and client by id * This API enables the firm admins/firm users to request the linkage of a firm account and a client account. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * - * - * @param int id - * @return object - */ - getFirmClientLinkage({ id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/firmclientlinkages/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List client linkages for a firm or client - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * + * + * @param int id + * @return object + */ + getFirmClientLinkage({ id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/firmclientlinkages/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List client linkages for a firm or client * This API enables the firm or account users to request the associated linkages to the account. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * 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:* firmAccountName, clientAccountName - * @return FetchResult - */ - listFirmClientLinkage({ filter } = {}) { - var path = this.buildUrl({ - url: `/api/v2/firmclientlinkages`, + * @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:* firmAccountName, clientAccountName + * @return FetchResult + */ + listFirmClientLinkage({ filter } = {}) { + var path = this.buildUrl({ + url: `/api/v2/firmclientlinkages`, parameters: { $filter: filter } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Rejects linkage to a firm for a client account - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Rejects linkage to a firm for a client account * This API enables the account admin of a client account to reject linkage request by a firm. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * - * - * @param int id - * @return object - */ - rejectFirmClientLinkage({ id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/firmclientlinkages/${id}/reject`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: null }); - } - - /** - * Reset linkage status between a client and firm back to requested - * + * * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * + * + * @param int id + * @return object + */ + rejectFirmClientLinkage({ id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/firmclientlinkages/${id}/reject`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: null, clientId: strClientId }); + } + + /** + * Reset linkage status between a client and firm back to requested * This API enables the firm admin of a client account to reset a previously created linkage request by a firm. * * ### Security Policies * - * * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * - * - * @param int id - * @return object - */ - resetFirmClientLinkage({ id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/firmclientlinkages/${id}/reset`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: null }); - } - - /** - * Revokes previously approved linkage to a firm for a client account - * + * * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * + * + * @param int id + * @return object + */ + resetFirmClientLinkage({ id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/firmclientlinkages/${id}/reset`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: null, clientId: strClientId }); + } + + /** + * Revokes previously approved linkage to a firm for a client account * This API enables the account admin of a client account to revoke a previously approved linkage request by a firm. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * - * - * @param int id - * @return object - */ - revokeFirmClientLinkage({ id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/firmclientlinkages/${id}/revoke`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: null }); - } - - /** - * FREE API - Request a free trial of AvaTax - * + * * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * + * + * @param int id + * @return object + */ + revokeFirmClientLinkage({ id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/firmclientlinkages/${id}/revoke`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: null, clientId: strClientId }); + } + + /** + * FREE API - Request a free trial of AvaTax * Call this API to obtain a free AvaTax account. * * This API is free to use. No authentication credentials are required to call this API. You must read and @@ -5837,23 +7010,29 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API may be called without providing authentication credentials. - * - * - * @param object model Required information to provision a free trial account. - * @return object - */ - requestFreeTrial({ model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/freetrials/request`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Request the javascript for a funding setup widget - * + * * This API may be called without providing authentication credentials. + * Swagger Name: AvaTaxClient + * + * + * @param object model Required information to provision a free trial account. + * @return object + */ + requestFreeTrial({ model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/freetrials/request`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Request the javascript for a funding setup widget * This API is available by invitation only. * Companies that use the Avalara Managed Returns or the SST Certified Service Provider services are * required to setup their funding configuration before Avalara can begin filing tax returns on their @@ -5870,23 +7049,29 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - * - * - * @param int id The unique ID number of this funding request - * @return object - */ - activateFundingRequest({ id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/fundingrequests/${id}/widget`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve status about a funding setup request - * + * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + * Swagger Name: AvaTaxClient + * + * + * @param int id The unique ID number of this funding request + * @return object + */ + activateFundingRequest({ id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/fundingrequests/${id}/widget`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve status about a funding setup request * This API is available by invitation only. * Companies that use the Avalara Managed Returns or the SST Certified Service Provider services are * required to setup their funding configuration before Avalara can begin filing tax returns on their @@ -5901,23 +7086,29 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - * - * - * @param int id The unique ID number of this funding request - * @return object - */ - fundingRequestStatus({ id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/fundingrequests/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Delete all classifications for an item - * + * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + * Swagger Name: AvaTaxClient + * + * + * @param int id The unique ID number of this funding request + * @return object + */ + fundingRequestStatus({ id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/fundingrequests/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Delete all classifications for an item * Delete all the classifications for a given item. * * A classification is the code for a product in a particular tax system. Classifications enable an item to be used in multiple tax systems which may have different tax rates for a product. @@ -5926,24 +7117,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this item. - * @param int itemId The ID of the item you wish to delete the classifications. - * @return object[] - */ - batchDeleteItemClassifications({ companyId, itemId } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/classifications`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Delete all parameters for an item - * + * @param int itemId The ID of the item you wish to delete the classifications. + * @return object[] + */ + batchDeleteItemClassifications({ companyId, itemId } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/classifications`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Delete all parameters for an item * Delete all the parameters for a given item. * * Some items can be taxed differently depending on the properties of that item, such as the item grade or by a particular measurement of that item. In AvaTax, these tax-affecting properties are called "parameters". @@ -5954,24 +7151,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this item. - * @param int itemId The ID of the item you wish to delete the parameters. - * @return object[] - */ - batchDeleteItemParameters({ companyId, itemId } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/parameters`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Bulk upload items from a product catalog - * + * @param int itemId The ID of the item you wish to delete the parameters. + * @return object[] + */ + batchDeleteItemParameters({ companyId, itemId } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/parameters`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Bulk upload items from a product catalog * Create/Update one or more item objects attached to this company. * * Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you @@ -5984,24 +7187,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this items. - * @param object model The items you wish to upload. - * @return object - */ - bulkUploadItems({ companyId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/upload`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Add classifications to an item. - * + * @param object model The items you wish to upload. + * @return object + */ + bulkUploadItems({ companyId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/upload`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Add classifications to an item. * Add classifications to an item. * * A classification is the code for a product in a particular tax system. Classifications enable an item to be used in multiple tax systems which may have different tax rates for a product. @@ -6012,25 +7221,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The company id. * @param int itemId The item id. - * @param object[] model The item classifications you wish to create. - * @return object[] - */ - createItemClassifications({ companyId, itemId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/classifications`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Add parameters to an item. - * + * @param object[] model The item classifications you wish to create. + * @return object[] + */ + createItemClassifications({ companyId, itemId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/classifications`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Add parameters to an item. * Add parameters to an item. * * Some items can be taxed differently depending on the properties of that item, such as the item grade or by a particular measurement of that item. In AvaTax, these tax-affecting properties are called "parameters". @@ -6045,25 +7260,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this item parameter. * @param int itemId The item id. - * @param object[] model The item parameters you wish to create. - * @return object[] - */ - createItemParameters({ companyId, itemId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/parameters`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Create a new item - * + * @param object[] model The item parameters you wish to create. + * @return object[] + */ + createItemParameters({ companyId, itemId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/parameters`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Create a new item * Creates one or more new item objects attached to this company. * * Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you @@ -6076,49 +7297,61 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this item. - * @param object[] model The item you wish to create. - * @return object[] - */ - createItems({ companyId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Create tags for a item - * + * @param object[] model The item you wish to create. + * @return object[] + */ + createItems({ companyId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Create tags for a item * Creates one or more new `Tag` objects attached to this Item. * * Item tags puts multiple labels for an item. So that item can be easily grouped by these tags. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that defined these items * @param int itemId The ID of the item as defined by the company that owns this tag. - * @param object[] model Tags you wish to associate with the Item - * @return object[] - */ - createItemTags({ companyId, itemId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/tags`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Delete a single item - * + * @param object[] model Tags you wish to associate with the Item + * @return object[] + */ + createItemTags({ companyId, itemId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/tags`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Delete a single item * Deletes the item object at this URL. * * Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you @@ -6131,24 +7364,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this item. - * @param int id The ID of the item you wish to delete. - * @return object[] - */ - deleteItem({ companyId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Delete a single item classification. - * + * @param int id The ID of the item you wish to delete. + * @return object[] + */ + deleteItem({ companyId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Delete a single item classification. * Delete a single item classification. * * A classification is the code for a product in a particular tax system. Classifications enable an item to be used in multiple tax systems which may have different tax rates for a product. @@ -6157,25 +7396,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The company id. * @param int itemId The item id. - * @param int id The item classification id. - * @return object[] - */ - deleteItemClassification({ companyId, itemId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/classifications/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Delete a single item parameter - * + * @param int id The item classification id. + * @return object[] + */ + deleteItemClassification({ companyId, itemId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/classifications/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Delete a single item parameter * Delete a single item parameter. * * Some items can be taxed differently depending on the properties of that item, such as the item grade or by a particular measurement of that item. In AvaTax, these tax-affecting properties are called "parameters". @@ -6186,74 +7431,92 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The company id * @param int itemId The item id - * @param int id The parameter id - * @return object[] - */ - deleteItemParameter({ companyId, itemId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/parameters/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Delete item tag by id - * + * @param int id The parameter id + * @return object[] + */ + deleteItemParameter({ companyId, itemId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/parameters/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Delete item tag by id * Deletes the `Tag` object of an Item at this URL. * * Item tags puts multiple labels for an item. So that item can be easily grouped by these tags. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that defined these items * @param int itemId The ID of the item as defined by the company that owns this tag. - * @param int itemTagDetailId The ID of the item tag detail you wish to delete. - * @return object[] - */ - deleteItemTag({ companyId, itemId, itemTagDetailId } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/tags/${itemTagDetailId}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Delete all item tags - * + * @param int itemTagDetailId The ID of the item tag detail you wish to delete. + * @return object[] + */ + deleteItemTag({ companyId, itemId, itemTagDetailId } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/tags/${itemTagDetailId}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Delete all item tags * Deletes all `Tags` objects of an Item at this URL. * * Item tags puts multiple labels for an item. So that item can be easily grouped by these tags. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that defined these items. - * @param int itemId The ID of the item as defined by the company that owns this tag. - * @return object[] - */ - deleteItemTags({ companyId, itemId } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/tags`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Retrieve a single item - * + * @param int itemId The ID of the item as defined by the company that owns this tag. + * @return object[] + */ + deleteItemTags({ companyId, itemId } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/tags`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single item * Get the `Item` object identified by this URL. * * Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you @@ -6264,27 +7527,33 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this item object * @param int id The primary key of this item - * @param string include A comma separated list of additional data to retrieve. - * @return object - */ - getItem({ companyId, id, include } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${id}`, + * @param string include A comma separated list of additional data to retrieve. + * @return object + */ + getItem({ companyId, id, include } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${id}`, parameters: { $include: include } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve a single item classification. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single item classification. * Retrieve a single item classification. * * A classification is the code for a product in a particular tax system. Classifications enable an item to be used in multiple tax systems which may have different tax rates for a product. @@ -6293,25 +7562,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The company id. * @param int itemId The item id. - * @param int id The item classification id. - * @return object - */ - getItemClassification({ companyId, itemId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/classifications/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve a single item parameter - * + * @param int id The item classification id. + * @return object + */ + getItemClassification({ companyId, itemId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/classifications/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single item parameter * Retrieve a single item parameter. * * Some items can be taxed differently depending on the properties of that item, such as the item grade or by a particular measurement of that item. In AvaTax, these tax-affecting properties are called "parameters". @@ -6322,56 +7597,68 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The company id * @param int itemId The item id - * @param int id The parameter id - * @return object - */ - getItemParameter({ companyId, itemId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/parameters/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve tags for an item - * + * @param int id The parameter id + * @return object + */ + getItemParameter({ companyId, itemId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/parameters/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve tags for an item * Get the `Tag` objects of an Item identified by this URL. * * Item tags puts multiple labels for an item. So that item can be easily grouped by these tags. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that defined these items * @param int itemId The ID of the item as defined by the company that owns this tag. * @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:* tagName * @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. - * @param int skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @return FetchResult - */ - getItemTags({ companyId, itemId, filter, top, skip } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/tags`, + * @param int skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. + * @return FetchResult + */ + getItemTags({ companyId, itemId, filter, top, skip } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/tags`, parameters: { $filter: filter, $top: top, $skip: skip } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve classifications for an item. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve classifications for an item. * List classifications for an item. * * A classification is the code for a product in a particular tax system. Classifications enable an item to be used in multiple tax systems which may have different tax rates for a product. @@ -6383,33 +7670,39 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The company id. * @param int 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/).
*Not filterable:* productCode, systemCode * @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. * @param int 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 - */ - listItemClassifications({ companyId, itemId, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/classifications`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listItemClassifications({ companyId, itemId, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/classifications`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve parameters for an item - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve parameters for an item * List parameters for an item. * * Some items can be taxed differently depending on the properties of that item, such as the item grade or by a particular measurement of that item. In AvaTax, these tax-affecting properties are called "parameters". @@ -6423,33 +7716,39 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The company id * @param int 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/).
*Not filterable:* name, unit, isNeededForCalculation, isNeededForReturns, isNeededForClassification * @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. * @param int 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 - */ - listItemParameters({ companyId, itemId, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/parameters`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listItemParameters({ companyId, itemId, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/parameters`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve items for this company - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve items for this company * List all items defined for the current company. * * Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you @@ -6472,8 +7771,9 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param int 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, classifications, parameters, tags @@ -6481,12 +7781,12 @@ export default class AvaTaxClient { * @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. * @param int 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 - * @return FetchResult - */ - listItemsByCompany({ companyId, filter, include, top, skip, orderBy, tagName } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items`, + * @param string tagName Tag Name on the basis of which you want to filter Items + * @return FetchResult + */ + listItemsByCompany({ companyId, filter, include, top, skip, orderBy, tagName } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items`, parameters: { $filter: filter, $include: include, @@ -6495,13 +7795,18 @@ export default class AvaTaxClient { $orderBy: orderBy, tagName: tagName } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all items - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all items * Get multiple item objects across all companies. * * Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you @@ -6516,19 +7821,20 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * 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, classifications, parameters, tags * @param string include A comma separated list of additional data to retrieve. * @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. * @param int 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 - */ - queryItems({ filter, include, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/items`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + queryItems({ filter, include, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/items`, parameters: { $filter: filter, $include: include, @@ -6536,13 +7842,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all items associated with given tag - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all items associated with given tag * Get multiple item objects associated with given tag. * * Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you @@ -6557,8 +7868,9 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that defined these items. * @param string tag The master tag to be associated with item. @@ -6566,12 +7878,12 @@ export default class AvaTaxClient { * @param string include A comma separated list of additional data to retrieve. * @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. * @param int 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 - */ - queryItemsByTag({ companyId, tag, filter, include, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/bytags/${tag}`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + queryItemsByTag({ companyId, tag, filter, include, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/bytags/${tag}`, parameters: { $filter: filter, $include: include, @@ -6579,13 +7891,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Sync items from a product catalog - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Sync items from a product catalog * Syncs a list of items with AvaTax without waiting for them to be created. It is ideal for syncing large product catalogs * with AvaTax. * @@ -6601,24 +7918,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this item. - * @param object model The request object. - * @return object - */ - syncItems({ companyId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/sync`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Update a single item - * + * @param object model The request object. + * @return object + */ + syncItems({ companyId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/sync`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Update a single item * Replace the existing `Item` object at this URL with an updated object. * * Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you @@ -6634,25 +7957,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that this item belongs to. * @param int id The ID of the item you wish to update - * @param object model The item object you wish to update. - * @return object - */ - updateItem({ companyId, id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Update an item classification. - * + * @param object model The item object you wish to update. + * @return object + */ + updateItem({ companyId, id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Update an item classification. * Update an item classification. * * A classification is the code for a product in a particular tax system. Classifications enable an item to be used in multiple tax systems which may have different tax rates for a product. @@ -6663,26 +7992,32 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The company id. * @param int itemId The item id. * @param int id The item classification id. - * @param object model The item object you wish to update. - * @return object - */ - updateItemClassification({ companyId, itemId, id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/classifications/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Update an item parameter - * + * @param object model The item object you wish to update. + * @return object + */ + updateItemClassification({ companyId, itemId, id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/classifications/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Update an item parameter * Update an item parameter. * * Some items can be taxed differently depending on the properties of that item, such as the item grade or by a particular measurement of that item. In AvaTax, these tax-affecting properties are called "parameters". @@ -6693,26 +8028,32 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The company id. * @param int itemId The item id * @param int id The item parameter id - * @param object model The item object you wish to update. - * @return object - */ - updateItemParameter({ companyId, itemId, id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/items/${itemId}/parameters/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Create one or more overrides - * + * @param object model The item object you wish to update. + * @return object + */ + updateItemParameter({ companyId, itemId, id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/items/${itemId}/parameters/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Create one or more overrides * Creates one or more jurisdiction override objects for this account. * * A Jurisdiction Override is a configuration setting that allows you to select the taxing @@ -6722,46 +8063,58 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int accountId The ID of the account that owns this override - * @param object[] model The jurisdiction override objects to create - * @return object[] - */ - createJurisdictionOverrides({ accountId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/jurisdictionoverrides`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Delete a single override - * + * @param object[] model The jurisdiction override objects to create + * @return object[] + */ + createJurisdictionOverrides({ accountId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/jurisdictionoverrides`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Delete a single override * Marks the item object at this URL as deleted. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int accountId The ID of the account that owns this override - * @param int id The ID of the override you wish to delete - * @return object[] - */ - deleteJurisdictionOverride({ accountId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/jurisdictionoverrides/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Retrieve a single override - * + * @param int id The ID of the override you wish to delete + * @return object[] + */ + deleteJurisdictionOverride({ accountId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/jurisdictionoverrides/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single override * Get the item object identified by this URL. * * A Jurisdiction Override is a configuration setting that allows you to select the taxing @@ -6771,24 +8124,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param int accountId The ID of the account that owns this override - * @param int id The primary key of this override - * @return object - */ - getJurisdictionOverride({ accountId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/jurisdictionoverrides/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve overrides for this account - * + * @param int id The primary key of this override + * @return object + */ + getJurisdictionOverride({ accountId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/jurisdictionoverrides/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve overrides for this account * List all jurisdiction override objects defined for this account. * * A Jurisdiction Override is a configuration setting that allows you to select the taxing @@ -6801,20 +8160,21 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param int accountId The ID of the account that owns this override * @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:* country, Jurisdictions * @param string include A comma separated list of additional data to retrieve. * @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. * @param int 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 - */ - listJurisdictionOverridesByAccount({ accountId, filter, include, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/jurisdictionoverrides`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listJurisdictionOverridesByAccount({ accountId, filter, include, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/jurisdictionoverrides`, parameters: { $filter: filter, $include: include, @@ -6822,13 +8182,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all overrides - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all overrides * Get multiple jurisdiction override objects across all companies. * * A Jurisdiction Override is a configuration setting that allows you to select the taxing @@ -6841,19 +8206,20 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * 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:* country, Jurisdictions * @param string include A comma separated list of additional data to retrieve. * @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. * @param int 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 - */ - queryJurisdictionOverrides({ filter, include, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/jurisdictionoverrides`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + queryJurisdictionOverrides({ filter, include, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/jurisdictionoverrides`, parameters: { $filter: filter, $include: include, @@ -6861,36 +8227,47 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Update a single jurisdictionoverride - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Update a single jurisdictionoverride * Replace the existing jurisdictionoverride object at this URL with an updated object. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int accountId The ID of the account that this jurisdictionoverride belongs to. * @param int id The ID of the jurisdictionoverride you wish to update - * @param object model The jurisdictionoverride object you wish to update. - * @return object - */ - updateJurisdictionOverride({ accountId, id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/jurisdictionoverrides/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Add parameters to a location. - * + * @param object model The jurisdictionoverride object you wish to update. + * @return object + */ + updateJurisdictionOverride({ accountId, id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/jurisdictionoverrides/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Add parameters to a location. * Add parameters to a location. * * Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters". @@ -6905,69 +8282,87 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this location parameter. * @param int locationId The location id. - * @param object[] model The location parameters you wish to create. - * @return object[] - */ - createLocationParameters({ companyId, locationId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/locations/${locationId}/parameters`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Create a new location - * + * @param object[] model The location parameters you wish to create. + * @return object[] + */ + createLocationParameters({ companyId, locationId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/locations/${locationId}/parameters`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Create a new location * Create one or more new location objects attached to this company. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this location. - * @param object[] model The location you wish to create. - * @return object[] - */ - createLocations({ companyId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/locations`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Delete a single location - * + * @param object[] model The location you wish to create. + * @return object[] + */ + createLocations({ companyId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/locations`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Delete a single location * Mark the location object at this URL as deleted. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this location. - * @param int id The ID of the location you wish to delete. - * @return object[] - */ - deleteLocation({ companyId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/locations/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Delete a single location parameter - * + * @param int id The ID of the location you wish to delete. + * @return object[] + */ + deleteLocation({ companyId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/locations/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Delete a single location parameter * Delete a single location parameter. * * Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters". @@ -6978,25 +8373,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The company id * @param int locationId The location id - * @param int id The parameter id - * @return object[] - */ - deleteLocationParameter({ companyId, locationId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/locations/${locationId}/parameters/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Retrieve a single location - * + * @param int id The parameter id + * @return object[] + */ + deleteLocationParameter({ companyId, locationId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/locations/${locationId}/parameters/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single location * Get the location object identified by this URL. * An 'Location' represents a physical address where a company does business. * Many taxing authorities require that you define a list of all locations where your company does business. @@ -7010,27 +8411,33 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this location * @param int id The primary key of this location - * @param string include A comma separated list of additional data to retrieve. - * @return object - */ - getLocation({ companyId, id, include } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/locations/${id}`, + * @param string include A comma separated list of additional data to retrieve. + * @return object + */ + getLocation({ companyId, id, include } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/locations/${id}`, parameters: { $include: include } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve a single company location parameter - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single company location parameter * Retrieve a single location parameter. * * Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters". @@ -7041,25 +8448,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The company id * @param int locationId The location id - * @param int id The parameter id - * @return object - */ - getLocationParameter({ companyId, locationId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/locations/${locationId}/parameters/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve parameters for a location - * + * @param int id The parameter id + * @return object + */ + getLocationParameter({ companyId, locationId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/locations/${locationId}/parameters/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve parameters for a location * List parameters for a location. * * Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters". @@ -7073,33 +8486,39 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The company id * @param int locationId The ID of the location * @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:* name, unit * @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. * @param int 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 - */ - listLocationParameters({ companyId, locationId, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/locations/${locationId}/parameters`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listLocationParameters({ companyId, locationId, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/locations/${locationId}/parameters`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve locations for this company - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve locations for this company * List all location objects defined for this company. * An 'Location' represents a physical address where a company does business. * Many taxing authorities require that you define a list of all locations where your company does business. @@ -7115,20 +8534,21 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns these locations * @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:* isMarketplaceOutsideUsa, settings, parameters * @param string include A comma separated list of additional data to retrieve. * @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. * @param int 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 - */ - listLocationsByCompany({ companyId, filter, include, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/locations`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listLocationsByCompany({ companyId, filter, include, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/locations`, parameters: { $filter: filter, $include: include, @@ -7136,13 +8556,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all locations - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all locations * Get multiple location objects across all companies. * An 'Location' represents a physical address where a company does business. * Many taxing authorities require that you define a list of all locations where your company does business. @@ -7159,19 +8584,20 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * 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:* isMarketplaceOutsideUsa, settings, parameters * @param string include A comma separated list of additional data to retrieve. You may specify `LocationSettings` to retrieve location settings. * @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. * @param int 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 - */ - queryLocations({ filter, include, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/locations`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + queryLocations({ filter, include, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/locations`, parameters: { $filter: filter, $include: include, @@ -7179,38 +8605,49 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Update a single location - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Update a single location * Replace the existing location object at this URL with an updated object. * All data from the existing object will be replaced with data in the object you PUT. * To set a field's value to null, you may either set its value to null or omit that field from the object you post. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that this location belongs to. * @param int id The ID of the location you wish to update - * @param object model The location you wish to update. - * @return object - */ - updateLocation({ companyId, id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/locations/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Update a location parameter - * + * @param object model The location you wish to update. + * @return object + */ + updateLocation({ companyId, id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/locations/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Update a location parameter * Update a location parameter. * * Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters". @@ -7221,50 +8658,62 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The company id. * @param int locationId The location id * @param int id The location parameter id - * @param object model The location parameter object you wish to update. - * @return object - */ - updateLocationParameter({ companyId, locationId, id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/locations/${locationId}/parameters/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Validate the location against local requirements - * + * @param object model The location parameter object you wish to update. + * @return object + */ + updateLocationParameter({ companyId, locationId, id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/locations/${locationId}/parameters/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Validate the location against local requirements * Returns validation information for this location. * This API call is intended to compare this location against the currently known taxing authority rules and regulations, * and provide information about what additional work is required to completely setup this location. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this location - * @param int id The primary key of this location - * @return object - */ - validateLocation({ companyId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/locations/${id}/validate`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Adjust a MultiDocument transaction - * + * @param int id The primary key of this location + * @return object + */ + validateLocation({ companyId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/locations/${id}/validate`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Adjust a MultiDocument transaction * Adjusts the current MultiDocument transaction uniquely identified by this URL. * * A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like @@ -7287,28 +8736,34 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param string code The transaction code for this MultiDocument transaction * @param string type The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values) * @param string include Specifies objects to include in this fetch call - * @param object model The adjust request you wish to execute - * @return object - */ - adjustMultiDocumentTransaction({ code, type, include, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/transactions/multidocument/${code}/type/${type}/adjust`, + * @param object model The adjust request you wish to execute + * @return object + */ + adjustMultiDocumentTransaction({ code, type, include, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/transactions/multidocument/${code}/type/${type}/adjust`, parameters: { include: include } - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Get audit information about a MultiDocument transaction - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Get audit information about a MultiDocument transaction * Retrieve audit information about a MultiDocument transaction stored in AvaTax. * * The audit API retrieves audit information related to a specific MultiDocument transaction. This audit @@ -7335,24 +8790,30 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param string code The transaction code for this MultiDocument transaction - * @param string type The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values) - * @return object - */ - auditMultiDocumentTransaction({ code, type } = {}) { - var path = this.buildUrl({ - url: `/api/v2/transactions/multidocument/${code}/type/${type}/audit`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Commit a MultiDocument transaction - * + * @param string type The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values) + * @return object + */ + auditMultiDocumentTransaction({ code, type } = {}) { + var path = this.buildUrl({ + url: `/api/v2/transactions/multidocument/${code}/type/${type}/audit`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Commit a MultiDocument transaction * Marks a list of transactions by changing its status to `Committed`. * * Transactions that are committed are available to be reported to a tax authority by Avalara Managed Returns. @@ -7373,23 +8834,29 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * - * - * @param object model The commit request you wish to execute - * @return object - */ - commitMultiDocumentTransaction({ model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/transactions/multidocument/commit`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Create a new MultiDocument transaction - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * + * + * @param object model The commit request you wish to execute + * @return object + */ + commitMultiDocumentTransaction({ model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/transactions/multidocument/commit`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Create a new MultiDocument transaction * Records a new MultiDocument transaction in AvaTax. * * A traditional transaction requires exactly two parties: a seller and a buyer. MultiDocument transactions can @@ -7434,26 +8901,32 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param string include Specifies objects to include in the response after transaction is created - * @param object model the multi document transaction model - * @return object - */ - createMultiDocumentTransaction({ include, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/transactions/multidocument`, + * @param object model the multi document transaction model + * @return object + */ + createMultiDocumentTransaction({ include, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/transactions/multidocument`, parameters: { $include: include } - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Retrieve a MultiDocument transaction - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Retrieve a MultiDocument transaction * Get the current MultiDocument transaction identified by this URL. * * If this transaction was adjusted, the return value of this API will be the current transaction with this code. @@ -7478,27 +8951,33 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param string code The multidocument code to retrieve * @param string type The transaction type to retrieve (See DocumentType::* for a list of allowable values) - * @param string include Specifies objects to include in the response after transaction is created - * @return object - */ - getMultiDocumentTransactionByCodeAndType({ code, type, include } = {}) { - var path = this.buildUrl({ - url: `/api/v2/transactions/multidocument/${code}/type/${type}`, + * @param string include Specifies objects to include in the response after transaction is created + * @return object + */ + getMultiDocumentTransactionByCodeAndType({ code, type, include } = {}) { + var path = this.buildUrl({ + url: `/api/v2/transactions/multidocument/${code}/type/${type}`, parameters: { $include: include } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve a MultiDocument transaction by ID - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a MultiDocument transaction by ID * Get the unique MultiDocument transaction identified by this URL. * * A traditional transaction requires exactly two parties: a seller and a buyer. MultiDocument transactions can @@ -7532,26 +9011,32 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int id The unique ID number of the MultiDocument transaction to retrieve - * @param string include Specifies objects to include in the response after transaction is created - * @return object - */ - getMultiDocumentTransactionById({ id, include } = {}) { - var path = this.buildUrl({ - url: `/api/v2/transactions/multidocument/${id}`, + * @param string include Specifies objects to include in the response after transaction is created + * @return object + */ + getMultiDocumentTransactionById({ id, include } = {}) { + var path = this.buildUrl({ + url: `/api/v2/transactions/multidocument/${id}`, parameters: { $include: include } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all MultiDocument transactions - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all MultiDocument transactions * List all MultiDocument transactions within this account. * * This endpoint is limited to returning 1,000 MultiDocument transactions at a time. To retrieve more than 1,000 MultiDocument @@ -7583,19 +9068,20 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * 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:* documents * @param string include Specifies objects to include in the response after transaction is created * @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. * @param int 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 - */ - listMultiDocumentTransactions({ filter, include, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/transactions/multidocument`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listMultiDocumentTransactions({ filter, include, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/transactions/multidocument`, parameters: { $filter: filter, $include: include, @@ -7603,13 +9089,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Create a refund for a MultiDocument transaction - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Create a refund for a MultiDocument transaction * Create a refund for a MultiDocument transaction. * * A traditional transaction requires exactly two parties: a seller and a buyer. MultiDocument transactions can @@ -7658,28 +9149,34 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param string code The code of this MultiDocument transaction * @param string type The type of this MultiDocument transaction (See DocumentType::* for a list of allowable values) * @param string include Specifies objects to include in the response after transaction is created - * @param object model Information about the refund to create - * @return object - */ - refundMultiDocumentTransaction({ code, type, include, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/transactions/multidocument/${code}/type/${type}/refund`, + * @param object model Information about the refund to create + * @return object + */ + refundMultiDocumentTransaction({ code, type, include, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/transactions/multidocument/${code}/type/${type}/refund`, parameters: { $include: include } - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Verify a MultiDocument transaction - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Verify a MultiDocument transaction * Verifies that the MultiDocument transaction uniquely identified by this URL matches certain expected values. * * If the transaction does not match these expected values, this API will return an error code indicating which value did not match. @@ -7698,23 +9195,29 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * - * - * @param object model Information from your accounting system to verify against this MultiDocument transaction as it is stored in AvaTax - * @return object - */ - verifyMultiDocumentTransaction({ model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/transactions/multidocument/verify`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Void a MultiDocument transaction - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * + * + * @param object model Information from your accounting system to verify against this MultiDocument transaction as it is stored in AvaTax + * @return object + */ + verifyMultiDocumentTransaction({ model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/transactions/multidocument/verify`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Void a MultiDocument transaction * Voids the current transaction uniquely identified by this URL. * * A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like @@ -7736,25 +9239,31 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param string code The transaction code for this MultiDocument transaction * @param string type The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values) - * @param object model The void request you wish to execute - * @return object - */ - voidMultiDocumentTransaction({ code, type, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/transactions/multidocument/${code}/type/${type}/void`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Create a new nexus - * + * @param object model The void request you wish to execute + * @return object + */ + voidMultiDocumentTransaction({ code, type, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/transactions/multidocument/${code}/type/${type}/void`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Create a new nexus * Creates one or more new nexus declarations attached to this company. * * The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional @@ -7777,24 +9286,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this nexus. - * @param object[] model The nexus you wish to create. - * @return object[] - */ - createNexus({ companyId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/nexus`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Add parameters to a nexus. - * + * @param object[] model The nexus you wish to create. + * @return object[] + */ + createNexus({ companyId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Add parameters to a nexus. * Add parameters to the nexus. * Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller. In AvaTax, these tax-affecting properties are called "parameters". * @@ -7808,25 +9323,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this nexus parameter. * @param int nexusId The nexus id. - * @param object[] model The nexus parameters you wish to create. - * @return object[] - */ - createNexusParameters({ companyId, nexusId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/nexus/${nexusId}/parameters`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Creates nexus for a list of addresses. - * + * @param object[] model The nexus parameters you wish to create. + * @return object[] + */ + createNexusParameters({ companyId, nexusId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus/${nexusId}/parameters`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Creates nexus for a list of addresses. * This call is intended to simplify adding all applicable nexus to a company, for an address or addresses. Calling this * API declares nexus for this company, for the list of addresses provided, * for the date range provided. You may also use this API to extend effective date on an already-declared nexus. @@ -7845,24 +9366,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that will own this nexus. - * @param object[] model The nexus you wish to create. - * @return object[] - */ - declareNexusByAddress({ companyId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/nexus/byaddress`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Delete a single nexus - * + * @param object[] model The nexus you wish to create. + * @return object[] + */ + declareNexusByAddress({ companyId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus/byaddress`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Delete a single nexus * Marks the existing nexus object at this URL as deleted. * * The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional @@ -7874,27 +9401,33 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this nexus. * @param int id The ID of the nexus you wish to delete. - * @param boolean cascadeDelete If true, deletes all the child nexus if they exist along with parent nexus - * @return object[] - */ - deleteNexus({ companyId, id, cascadeDelete } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/nexus/${id}`, + * @param boolean cascadeDelete If true, deletes all the child nexus if they exist along with parent nexus + * @return object[] + */ + deleteNexus({ companyId, id, cascadeDelete } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus/${id}`, parameters: { cascadeDelete: cascadeDelete } - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Delete a single nexus parameter - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Delete a single nexus parameter * Delete a single nexus parameter. * Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller. In AvaTax, these tax-affecting properties are called "parameters". * @@ -7904,25 +9437,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The company id * @param int nexusId The nexus id - * @param int id The parameter id - * @return object[] - */ - deleteNexusParameter({ companyId, nexusId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/nexus/${nexusId}/parameters/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Delete all parameters for an nexus - * + * @param int id The parameter id + * @return object[] + */ + deleteNexusParameter({ companyId, nexusId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus/${nexusId}/parameters/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Delete all parameters for an nexus * Delete all the parameters for a given nexus. * Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller. In AvaTax, these tax-affecting properties are called "parameters". * @@ -7932,24 +9471,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this nexus. - * @param int nexusId The ID of the nexus you wish to delete the parameters. - * @return object[] - */ - deleteNexusParameters({ companyId, nexusId } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/nexus/${nexusId}/parameters`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Retrieve a single nexus - * + * @param int nexusId The ID of the nexus you wish to delete the parameters. + * @return object[] + */ + deleteNexusParameters({ companyId, nexusId } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus/${nexusId}/parameters`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single nexus * Get the nexus object identified by this URL. * * The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional @@ -7961,27 +9506,33 @@ export default class AvaTaxClient { * * ### Security Policies * - * * 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. - * + * * 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. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this nexus object * @param int id The primary key of this nexus - * @param string include - * @return object - */ - getNexus({ companyId, id, include } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/nexus/${id}`, + * @param string include + * @return object + */ + getNexus({ companyId, id, include } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus/${id}`, parameters: { $include: include } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List company nexus related to a tax form - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List company nexus related to a tax form * Retrieves a list of nexus related to a tax form. * * The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional @@ -7997,27 +9548,33 @@ export default class AvaTaxClient { * * ### Security Policies * - * * 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. - * + * * 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. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this nexus object * @param string formCode The form code that we are looking up the nexus for - * @param string include - * @return object - */ - getNexusByFormCode({ companyId, formCode, include } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/nexus/byform/${formCode}`, + * @param string include + * @return object + */ + getNexusByFormCode({ companyId, formCode, include } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus/byform/${formCode}`, parameters: { $include: include } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve a single nexus parameter - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single nexus parameter * Retrieve a single nexus parameter. * Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller.In AvaTax, these tax-affecting properties are called "parameters". * @@ -8027,25 +9584,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * 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. - * + * * 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. + * Swagger Name: AvaTaxClient + * * * @param int companyId The company id * @param int nexusId The nexus id - * @param int id The parameter id - * @return object - */ - getNexusParameter({ companyId, nexusId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/nexus/${nexusId}/parameters/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve nexus for this company - * + * @param int id The parameter id + * @return object + */ + getNexusParameter({ companyId, nexusId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus/${nexusId}/parameters/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve nexus for this company * List all nexus objects defined for this company. * * The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional @@ -8060,20 +9623,21 @@ export default class AvaTaxClient { * * ### Security Policies * - * * 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. - * + * * 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. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns these nexus objects * @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:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters, taxableNexus * @param string include A comma separated list of additional data to retrieve. * @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. * @param int 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 - */ - listNexusByCompany({ companyId, filter, include, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/nexus`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listNexusByCompany({ companyId, filter, include, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus`, parameters: { $filter: filter, $include: include, @@ -8081,13 +9645,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve nexus for this company By TaxTypeGroup - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve nexus for this company By TaxTypeGroup * List all nexus objects defined for this company filtered by TaxTypeGroup. * * The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional @@ -8102,8 +9671,9 @@ export default class AvaTaxClient { * * ### Security Policies * - * * 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. - * + * * 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. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns these nexus objects * @param string taxTypeGroup Name of TaxTypeGroup to filter by @@ -8111,12 +9681,12 @@ export default class AvaTaxClient { * @param string include A comma separated list of additional data to retrieve. * @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. * @param int 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 - */ - listNexusByCompanyAndTaxTypeGroup({ companyId, taxTypeGroup, filter, include, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/nexus/byTaxTypeGroup/${taxTypeGroup}`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listNexusByCompanyAndTaxTypeGroup({ companyId, taxTypeGroup, filter, include, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus/byTaxTypeGroup/${taxTypeGroup}`, parameters: { $filter: filter, $include: include, @@ -8124,13 +9694,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve parameters for a nexus - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve parameters for a nexus * List parameters for a nexus. * Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller. In AvaTax, these tax-affecting properties are called "parameters". * @@ -8143,33 +9718,39 @@ export default class AvaTaxClient { * * ### Security Policies * - * * 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. - * + * * 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. + * Swagger Name: AvaTaxClient + * * * @param int companyId The company id * @param int nexusId The nexus 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/).
*Not filterable:* name, unit * @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. * @param int 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 - */ - listNexusParameters({ companyId, nexusId, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/nexus/${nexusId}/parameters`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listNexusParameters({ companyId, nexusId, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus/${nexusId}/parameters`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all nexus - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all nexus * Get multiple nexus objects across all companies. * * The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional @@ -8184,19 +9765,20 @@ export default class AvaTaxClient { * * ### Security Policies * - * * 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. - * + * * 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. + * 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:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters, taxableNexus * @param string include A comma separated list of additional data to retrieve. * @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. * @param int 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 - */ - queryNexus({ filter, include, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/nexus`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + queryNexus({ filter, include, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/nexus`, parameters: { $filter: filter, $include: include, @@ -8204,13 +9786,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Update a single nexus - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Update a single nexus * Replace the existing nexus declaration object at this URL with an updated object. * * The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional @@ -8233,25 +9820,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that this nexus belongs to. * @param int id The ID of the nexus you wish to update - * @param object model The nexus object you wish to update. - * @return object - */ - updateNexus({ companyId, id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/nexus/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Update an nexus parameter - * + * @param object model The nexus object you wish to update. + * @return object + */ + updateNexus({ companyId, id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Update an nexus parameter * Update an nexus parameter. * * Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller. In AvaTax, these tax-affecting properties are called "parameters". @@ -8262,112 +9855,142 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The company id. * @param int nexusId The nexus id * @param int id The nexus parameter id - * @param object model The nexus object you wish to update. - * @return object - */ - updateNexusParameter({ companyId, nexusId, id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/nexus/${nexusId}/parameters/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Creates a new tax notice responsibility type. - * + * @param object model The nexus object you wish to update. + * @return object + */ + updateNexusParameter({ companyId, nexusId, id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/nexus/${nexusId}/parameters/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Creates a new tax notice responsibility type. * This API is available by invitation only and only available for users with Compliance admin access. * * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - * - * - * @param object model The responsibility type to create - * @return object - */ - createNoticeResponsibilityType({ model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/notices/responsibilities`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Creates a new tax notice root cause type. - * + * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + * Swagger Name: AvaTaxClient + * + * + * @param object model The responsibility type to create + * @return object + */ + createNoticeResponsibilityType({ model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/notices/responsibilities`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Creates a new tax notice root cause type. * This API is available by invitation only and only available for users with Compliance admin access. * * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - * - * - * @param object model The root cause type to create - * @return object - */ - createNoticeRootCauseType({ model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/notices/rootcauses`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Delete a tax notice responsibility type. - * + * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + * Swagger Name: AvaTaxClient + * + * + * @param object model The root cause type to create + * @return object + */ + createNoticeRootCauseType({ model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/notices/rootcauses`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Delete a tax notice responsibility type. * This API is available by invitation only and only available for users with Compliance admin access. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * - * - * @param int responsibilityId The unique ID of the responsibility type - * @return object[] - */ - deleteNoticeResponsibilityType({ responsibilityId } = {}) { - var path = this.buildUrl({ - url: `/api/v2/notices/responsibilities/${responsibilityId}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Delete a tax notice root cause type. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * + * + * @param int responsibilityId The unique ID of the responsibility type + * @return object[] + */ + deleteNoticeResponsibilityType({ responsibilityId } = {}) { + var path = this.buildUrl({ + url: `/api/v2/notices/responsibilities/${responsibilityId}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Delete a tax notice root cause type. * This API is available by invitation only and only available for users with Compliance admin access. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * - * - * @param int rootCauseId The unique ID of the root cause type - * @return object[] - */ - deleteNoticeRootCauseType({ rootCauseId } = {}) { - var path = this.buildUrl({ - url: `/api/v2/notices/rootcauses/${rootCauseId}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Mark a single notification as dismissed. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * + * + * @param int rootCauseId The unique ID of the root cause type + * @return object[] + */ + deleteNoticeRootCauseType({ rootCauseId } = {}) { + var path = this.buildUrl({ + url: `/api/v2/notices/rootcauses/${rootCauseId}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Mark a single notification as dismissed. * Marks the notification identified by this URL as dismissed. * * A notification is a message from Avalara that may have relevance to your business. You may want @@ -8385,23 +10008,29 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * - * - * @param int id The id of the notification you wish to mark as dismissed. - * @return object - */ - dismissNotification({ id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/notifications/${id}/dismiss`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: null }); - } - - /** - * Retrieve a single notification. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * + * + * @param int id The id of the notification you wish to mark as dismissed. + * @return object + */ + dismissNotification({ id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/notifications/${id}/dismiss`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single notification. * Retrieve a single notification by its unique ID number. * * A notification is a message from Avalara that may have relevance to your business. You may want @@ -8413,23 +10042,29 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * - * - * @param int id The id of the notification to retrieve. - * @return object - */ - getNotification({ id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/notifications/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List all notifications. - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * + * + * @param int id The id of the notification to retrieve. + * @return object + */ + getNotification({ id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/notifications/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List all notifications. * List all notifications. * * A notification is a message from Avalara that may have relevance to your business. You may want @@ -8444,31 +10079,37 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * 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 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. * @param int 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 - */ - listNotifications({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/notifications`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listNotifications({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/notifications`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Request a new Avalara account - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Request a new Avalara account * This API is for use by partner provisioning services customers only. * * Avalara invites select partners to refer new customers to the AvaTax service using the onboarding features @@ -8488,23 +10129,29 @@ export default class AvaTaxClient { * * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. * * This API is available by invitation only. - * * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [Provisioning:RequestNewAccount]. - * - * - * @param object model Information about the account you wish to create and the selected product offerings. - * @return object - */ - requestNewAccount({ model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/request`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Request a new entitilement to an existing customer - * + * * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [Provisioning:RequestNewAccount]. + * Swagger Name: AvaTaxClient + * + * + * @param object model Information about the account you wish to create and the selected product offerings. + * @return object + */ + requestNewAccount({ model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/request`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Request a new entitilement to an existing customer * This API is for use by partner provisioning services customers only. This will allow the partners to allow * the add new entitlement to an existing customer * @@ -8512,24 +10159,30 @@ export default class AvaTaxClient { * * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. * * This API is available by invitation only. - * * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [Provisioning:RequestNewAccount]. - * + * * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [Provisioning:RequestNewAccount]. + * Swagger Name: AvaTaxClient + * * * @param int id The avatax account id of the customer - * @param string offer The offer to be added to an already existing customer - * @return object - */ - requestNewEntitlement({ id, offer } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}/entitlements/${offer}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: null }); - } - - /** - * Create a new account - * + * @param string offer The offer to be added to an already existing customer + * @return object + */ + requestNewEntitlement({ id, offer } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}/entitlements/${offer}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: null, clientId: strClientId }); + } + + /** + * Create a new account * # For Registrar Use Only * This API is for use by Avalara Registrar administrative users only. * @@ -8538,23 +10191,29 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * - * - * @param object model The account you wish to create. - * @return object[] - */ - createAccount({ model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Create new notifications. - * + * * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * + * + * @param object model The account you wish to create. + * @return object[] + */ + createAccount({ model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Create new notifications. * This API is available by invitation only. * * Create a single notification. @@ -8572,23 +10231,29 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [NotificationsAPI:Create]. - * - * - * @param object[] model The notifications you wish to create. - * @return object[] - */ - createNotifications({ model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/notifications`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Create a new subscription - * + * * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [NotificationsAPI:Create]. + * Swagger Name: AvaTaxClient + * + * + * @param object[] model The notifications you wish to create. + * @return object[] + */ + createNotifications({ model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/notifications`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Create a new subscription * This API is for use by Avalara Registrar administrative users only. * * Create one or more new subscription objects attached to this account. @@ -8597,24 +10262,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int accountId The ID of the account that owns this subscription. - * @param object[] model The subscription you wish to create. - * @return object[] - */ - createSubscriptions({ accountId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/subscriptions`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Delete a single account - * + * @param object[] model The subscription you wish to create. + * @return object[] + */ + createSubscriptions({ accountId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/subscriptions`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Delete a single account * # For Registrar Use Only * This API is for use by Avalara Registrar administrative users only. * @@ -8623,23 +10294,29 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires the user role SystemAdmin. - * - * - * @param int id The ID of the account you wish to delete. - * @return object[] - */ - deleteAccount({ id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Delete a single notification. - * + * * This API requires the user role SystemAdmin. + * Swagger Name: AvaTaxClient + * + * + * @param int id The ID of the account you wish to delete. + * @return object[] + */ + deleteAccount({ id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Delete a single notification. * This API is available by invitation only. * * Delete the existing notification identified by this URL. @@ -8654,23 +10331,29 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [NotificationsAPI:Create]. - * - * - * @param int id The id of the notification you wish to delete. - * @return object[] - */ - deleteNotification({ id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/notifications/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Delete a single subscription - * + * * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [NotificationsAPI:Create]. + * Swagger Name: AvaTaxClient + * + * + * @param int id The id of the notification you wish to delete. + * @return object[] + */ + deleteNotification({ id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/notifications/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Delete a single subscription * # For Registrar Use Only * This API is for use by Avalara Registrar administrative users only. * @@ -8678,43 +10361,55 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int accountId The ID of the account that owns this subscription. - * @param int id The ID of the subscription you wish to delete. - * @return object[] - */ - deleteSubscription({ accountId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/subscriptions/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Retrieve List of Accounts by Account Migration Status - * + * @param int id The ID of the subscription you wish to delete. + * @return object[] + */ + deleteSubscription({ accountId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/subscriptions/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Retrieve List of Accounts by Account Migration Status * ### Security Policies * - * * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * - * - * @param string writeMode (See TssAccountMigrationId::* for a list of allowable values) - * @return object - */ - listAccountsByTssWriteMode({ writeMode } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/ListAccountsByTssWriteMode/${writeMode}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Reset a user's password programmatically - * + * * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * + * + * @param string writeMode (See TssAccountMigrationId::* for a list of allowable values) + * @return object + */ + listAccountsByTssWriteMode({ writeMode } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/ListAccountsByTssWriteMode/${writeMode}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Reset a user's password programmatically * # For Registrar Use Only * This API is for use by Avalara Registrar administrative users only. * @@ -8725,27 +10420,33 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * * This API is available to Avalara system-level (registrar-level) users only. - * + * * This API is available to Avalara system-level (registrar-level) users only. + * Swagger Name: AvaTaxClient + * * * @param int userId The unique ID of the user whose password will be changed * @param boolean unmigrateFromAi If user's password was migrated to AI, undo this. - * @param object model The new password for this user - * @return string - */ - resetPassword({ userId, unmigrateFromAi, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/passwords/${userId}/reset`, + * @param object model The new password for this user + * @return string + */ + resetPassword({ userId, unmigrateFromAi, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/passwords/${userId}/reset`, parameters: { unmigrateFromAi: unmigrateFromAi } - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Update a single account - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Update a single account * # For Registrar Use Only * This API is for use by Avalara Registrar administrative users only. * @@ -8753,24 +10454,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int id The ID of the account you wish to update. - * @param object model The account object you wish to update. - * @return object - */ - updateAccount({ id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Update a single notification. - * + * @param object model The account object you wish to update. + * @return object + */ + updateAccount({ id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Update a single notification. * This API is available by invitation only. * * Replaces the notification identified by this URL with a new notification. @@ -8785,24 +10492,30 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [NotificationsAPI:Create]. - * + * * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [NotificationsAPI:Create]. + * Swagger Name: AvaTaxClient + * * * @param int id The id of the notification you wish to update. - * @param object model The notification object you wish to update. - * @return object - */ - updateNotification({ id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/notifications/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Update a single subscription - * + * @param object model The notification object you wish to update. + * @return object + */ + updateNotification({ id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/notifications/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Update a single subscription * # For Registrar Use Only * This API is for use by Avalara Registrar administrative users only. * @@ -8814,25 +10527,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int accountId The ID of the account that this subscription belongs to. * @param int id The ID of the subscription you wish to update - * @param object model The subscription you wish to update. - * @return object - */ - updateSubscription({ accountId, id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/subscriptions/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Download a report - * + * @param object model The subscription you wish to update. + * @return object + */ + updateSubscription({ accountId, id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/subscriptions/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Download a report * This API downloads the file associated with a report. * * If the report is not yet complete, you will receive a `ReportNotFinished` error. To check if a report is complete, @@ -8850,23 +10569,29 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * - * - * @param int id The unique ID number of this report - * @return object - */ - downloadReport({ id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/reports/${id}/attachment`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve a single report - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * + * + * @param int id The unique ID number of this report + * @return object + */ + downloadReport({ id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/reports/${id}/attachment`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single report * Retrieve a single report by its unique ID number. * * Reports are run as asynchronous report tasks on the server. When complete, the report file will be available for download @@ -8877,23 +10602,29 @@ export default class AvaTaxClient { * * Check the status of a report by calling `GetReport` and passing in the report's `id` value. * * When a report's status is `Completed`, call `DownloadReport` to retrieve the file. * - * This API call returns information about any report type. - * - * - * @param int id The unique ID number of the report to retrieve - * @return object - */ - getReport({ id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/reports/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Initiate an ExportDocumentLine report task - * + * This API call returns information about any report type. + * Swagger Name: AvaTaxClient + * + * + * @param int id The unique ID number of the report to retrieve + * @return object + */ + getReport({ id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/reports/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Initiate an ExportDocumentLine report task * Begins running an `ExportDocumentLine` report task and returns the identity of the report. * * Reports are run as asynchronous report tasks on the server. When complete, the report file will be available for download @@ -8917,24 +10648,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The unique ID number of the company to report on. - * @param object model Options that may be configured to customize the report. - * @return object[] - */ - initiateExportDocumentLineReport({ companyId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/reports/exportdocumentline/initiate`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * List all report tasks for account - * + * @param object model Options that may be configured to customize the report. + * @return object[] + */ + initiateExportDocumentLineReport({ companyId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/reports/exportdocumentline/initiate`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * List all report tasks for account * List all report tasks for your account. * * Reports are run as asynchronous report tasks on the server. When complete, the report file will be available for download @@ -8949,31 +10686,37 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The id of the company for which to get reports. * @param string pageKey Provide a page key to retrieve the next page of results. * @param int skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @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. - * @return FetchResult - */ - listReports({ companyId, pageKey, skip, top } = {}) { - var path = this.buildUrl({ - url: `/api/v2/reports`, + * @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. + * @return FetchResult + */ + listReports({ companyId, pageKey, skip, top } = {}) { + var path = this.buildUrl({ + url: `/api/v2/reports`, parameters: { companyId: companyId, pageKey: pageKey, $skip: skip, $top: top } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Create a new setting - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Create a new setting * Create one or more new setting objects attached to this company. * * The company settings system is a metadata system that you can use to store extra information @@ -8992,24 +10735,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this setting. - * @param object[] model The setting you wish to create. - * @return object[] - */ - createSettings({ companyId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/settings`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Delete a single setting - * + * @param object[] model The setting you wish to create. + * @return object[] + */ + createSettings({ companyId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/settings`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Delete a single setting * Mark the setting object at this URL as deleted. * * The company settings system is a metadata system that you can use to store extra information @@ -9023,24 +10772,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this setting. - * @param int id The ID of the setting you wish to delete. - * @return object[] - */ - deleteSetting({ companyId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/settings/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Retrieve a single setting - * + * @param int id The ID of the setting you wish to delete. + * @return object[] + */ + deleteSetting({ companyId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/settings/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single setting * Get a single setting object by its unique ID. * * The company settings system is a metadata system that you can use to store extra information @@ -9054,24 +10809,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this setting - * @param int id The primary key of this setting - * @return object - */ - getSetting({ companyId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/settings/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all settings for this company - * + * @param int id The primary key of this setting + * @return object + */ + getSetting({ companyId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/settings/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all settings for this company * List all setting objects attached to this company. * * The company settings system is a metadata system that you can use to store extra information @@ -9088,20 +10849,21 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns these settings * @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:* modifiedDate, ModifiedUserId * @param string include A comma separated list of additional data to retrieve. * @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. * @param int 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 - */ - listSettingsByCompany({ companyId, filter, include, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/settings`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listSettingsByCompany({ companyId, filter, include, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/settings`, parameters: { $filter: filter, $include: include, @@ -9109,13 +10871,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all settings - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all settings * Get multiple setting objects across all companies. * * The company settings system is a metadata system that you can use to store extra information @@ -9132,19 +10899,20 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * 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:* modifiedDate, ModifiedUserId * @param string include A comma separated list of additional data to retrieve. * @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. * @param int 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 - */ - querySettings({ filter, include, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/settings`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + querySettings({ filter, include, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/settings`, parameters: { $filter: filter, $include: include, @@ -9152,13 +10920,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Update a single setting - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Update a single setting * Replace the existing setting object at this URL with an updated object. * * The company settings system is a metadata system that you can use to store extra information @@ -9176,49 +10949,61 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that this setting belongs to. * @param int id The ID of the setting you wish to update - * @param object model The setting you wish to update. - * @return object - */ - updateSetting({ companyId, id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/settings/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Retrieve a single subscription - * + * @param object model The setting you wish to update. + * @return object + */ + updateSetting({ companyId, id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/settings/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Retrieve a single subscription * Get the subscription object identified by this URL. * A 'subscription' indicates a licensed subscription to a named Avalara service. * To request or remove subscriptions, please contact Avalara sales or your customer account manager. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int accountId The ID of the account that owns this subscription - * @param int id The primary key of this subscription - * @return object - */ - getSubscription({ accountId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/subscriptions/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve subscriptions for this account - * + * @param int id The primary key of this subscription + * @return object + */ + getSubscription({ accountId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/subscriptions/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve subscriptions for this account * List all subscription objects attached to this account. * A 'subscription' indicates a licensed subscription to a named Avalara service. * To request or remove subscriptions, please contact Avalara sales or your customer account manager. @@ -9228,32 +11013,38 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int accountId The ID of the account that owns these subscriptions * @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:* subscriptionDescription * @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. * @param int 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 - */ - listSubscriptionsByAccount({ accountId, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/subscriptions`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listSubscriptionsByAccount({ accountId, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/subscriptions`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all subscriptions - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all subscriptions * Get multiple subscription objects across all accounts. * A 'subscription' indicates a licensed subscription to a named Avalara service. * To request or remove subscriptions, please contact Avalara sales or your customer account manager. @@ -9263,31 +11054,37 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * 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:* subscriptionDescription * @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. * @param int 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 - */ - querySubscriptions({ filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/subscriptions`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + querySubscriptions({ filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/subscriptions`, parameters: { $filter: filter, $top: top, $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Create a new tax code - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Create a new tax code * Create one or more new taxcode objects attached to this company. * A 'TaxCode' represents a uniquely identified type of product, good, or service. * Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions. @@ -9296,46 +11093,58 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this tax code. - * @param object[] model The tax code you wish to create. - * @return object[] - */ - createTaxCodes({ companyId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/taxcodes`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Delete a single tax code - * + * @param object[] model The tax code you wish to create. + * @return object[] + */ + createTaxCodes({ companyId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/taxcodes`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Delete a single tax code * Marks the existing TaxCode object at this URL as deleted. * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this tax code. - * @param int id The ID of the tax code you wish to delete. - * @return object[] - */ - deleteTaxCode({ companyId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/taxcodes/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Retrieve a single tax code - * + * @param int id The ID of the tax code you wish to delete. + * @return object[] + */ + deleteTaxCode({ companyId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/taxcodes/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single tax code * Get the taxcode object identified by this URL. * A 'TaxCode' represents a uniquely identified type of product, good, or service. * Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions. @@ -9344,24 +11153,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this tax code - * @param int id The primary key of this tax code - * @return object - */ - getTaxCode({ companyId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/taxcodes/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve tax codes for this company - * + * @param int id The primary key of this tax code + * @return object + */ + getTaxCode({ companyId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/taxcodes/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve tax codes for this company * List all taxcode objects attached to this company. * A 'TaxCode' represents a uniquely identified type of product, good, or service. * Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions. @@ -9373,20 +11188,21 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns these tax codes * @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 string include A comma separated list of additional data to retrieve. * @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. * @param int 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 - */ - listTaxCodesByCompany({ companyId, filter, include, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/taxcodes`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listTaxCodesByCompany({ companyId, filter, include, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/taxcodes`, parameters: { $filter: filter, $include: include, @@ -9394,13 +11210,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all tax codes - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all tax codes * Get multiple taxcode objects across all companies. * A 'TaxCode' represents a uniquely identified type of product, good, or service. * Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions. @@ -9412,19 +11233,20 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * 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 string include A comma separated list of additional data to retrieve. * @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. * @param int 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 - */ - queryTaxCodes({ filter, include, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/taxcodes`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + queryTaxCodes({ filter, include, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/taxcodes`, parameters: { $filter: filter, $include: include, @@ -9432,13 +11254,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Update a single tax code - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Update a single tax code * Replace the existing taxcode object at this URL with an updated object. * A 'TaxCode' represents a uniquely identified type of product, good, or service. * Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions. @@ -9449,25 +11276,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that this tax code belongs to. * @param int id The ID of the tax code you wish to update - * @param object model The tax code you wish to update. - * @return object - */ - updateTaxCode({ companyId, id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/taxcodes/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Build a multi-location tax content file - * + * @param object model The tax code you wish to update. + * @return object + */ + updateTaxCode({ companyId, id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/taxcodes/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Build a multi-location tax content file * Builds a tax content file containing information useful for a retail point-of-sale solution. * * Since tax rates may change based on decisions made by a variety of tax authorities, we recommend @@ -9495,23 +11328,29 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * - * - * @param object model Parameters about the desired file format and report format, specifying which company, locations and TaxCodes to include. - * @return object - */ - buildTaxContentFile({ model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/pointofsaledata/build`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Build a tax content file for a single location - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * + * + * @param object model Parameters about the desired file format and report format, specifying which company, locations and TaxCodes to include. + * @return object + */ + buildTaxContentFile({ model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/pointofsaledata/build`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Build a tax content file for a single location * Builds a tax content file containing information useful for a retail point-of-sale solution. * * Since tax rates may change based on decisions made by a variety of tax authorities, we recommend @@ -9539,33 +11378,39 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID number of the company that owns this location. * @param int id The ID number of the location to retrieve point-of-sale data. * @param string date The date for which point-of-sale data would be calculated (today by default) * @param string format The format of the file (JSON by default) (See PointOfSaleFileType::* for a list of allowable values) * @param string partnerId If specified, requests a custom partner-formatted version of the file. (See PointOfSalePartnerId::* for a list of allowable values) - * @param boolean includeJurisCodes When true, the file will include jurisdiction codes in the result. - * @return object - */ - buildTaxContentFileForLocation({ companyId, id, date, format, partnerId, includeJurisCodes } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/locations/${id}/pointofsaledata`, + * @param boolean includeJurisCodes When true, the file will include jurisdiction codes in the result. + * @return object + */ + buildTaxContentFileForLocation({ companyId, id, date, format, partnerId, includeJurisCodes } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/locations/${id}/pointofsaledata`, parameters: { date: date, format: format, partnerId: partnerId, includeJurisCodes: includeJurisCodes } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Download a file listing tax rates by postal code - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Download a file listing tax rates by postal code * Download a CSV file containing all five digit postal codes in the United States and their sales * and use tax rates for tangible personal property. * @@ -9609,26 +11454,32 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param string date The date for which point-of-sale data would be calculated (today by default). Example input: 2016-12-31 - * @param string region A two character region code which limits results to a specific region. - * @return object - */ - downloadTaxRatesByZipCode({ date, region } = {}) { - var path = this.buildUrl({ - url: `/api/v2/taxratesbyzipcode/download/${date}`, + * @param string region A two character region code which limits results to a specific region. + * @return object + */ + downloadTaxRatesByZipCode({ date, region } = {}) { + var path = this.buildUrl({ + url: `/api/v2/taxratesbyzipcode/download/${date}`, parameters: { region: region } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Sales tax rates for a specified address - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Sales tax rates for a specified address * Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP * response code 429 - `Too Many Requests`. * @@ -9648,8 +11499,9 @@ export default class AvaTaxClient { * * And more! * * Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/) - * for information on how to upgrade to the full AvaTax CreateTransaction API. - * + * for information on how to upgrade to the full AvaTax CreateTransaction API. + * Swagger Name: AvaTaxClient + * * * @param string line1 The street address of the location. * @param string line2 The street address of the location. @@ -9657,12 +11509,12 @@ export default class AvaTaxClient { * @param string city The city name of the location. * @param string region Name or ISO 3166 code identifying the region within the country. 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`. * @param string postalCode The postal code of the location. - * @param string country Name or ISO 3166 code identifying the country. 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`. - * @return object - */ - taxRatesByAddress({ line1, line2, line3, city, region, postalCode, country } = {}) { - var path = this.buildUrl({ - url: `/api/v2/taxrates/byaddress`, + * @param string country Name or ISO 3166 code identifying the country. 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`. + * @return object + */ + taxRatesByAddress({ line1, line2, line3, city, region, postalCode, country } = {}) { + var path = this.buildUrl({ + url: `/api/v2/taxrates/byaddress`, parameters: { line1: line1, line2: line2, @@ -9672,13 +11524,18 @@ export default class AvaTaxClient { postalCode: postalCode, country: country } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Sales tax rates for a specified country and postal code. This API is only available for US postal codes. - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Sales tax rates for a specified country and postal code. This API is only available for US postal codes. * This API is only available for a US postal codes. * * Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP @@ -9700,27 +11557,33 @@ export default class AvaTaxClient { * * And more! * * Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/) - * for information on how to upgrade to the full AvaTax CreateTransaction API. - * + * for information on how to upgrade to the full AvaTax CreateTransaction API. + * Swagger Name: AvaTaxClient + * * * @param string country Name or ISO 3166 code identifying the country. 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`. - * @param string postalCode The postal code of the location. - * @return object - */ - taxRatesByPostalCode({ country, postalCode } = {}) { - var path = this.buildUrl({ - url: `/api/v2/taxrates/bypostalcode`, + * @param string postalCode The postal code of the location. + * @return object + */ + taxRatesByPostalCode({ country, postalCode } = {}) { + var path = this.buildUrl({ + url: `/api/v2/taxrates/bypostalcode`, parameters: { country: country, postalCode: postalCode } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Create a new tax rule - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Create a new tax rule * Create one or more custom tax rules attached to this company. * * A tax rule represents a rule that changes the default AvaTax behavior for a product or jurisdiction. Custom tax rules @@ -9737,24 +11600,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this tax rule. - * @param object[] model The tax rule you wish to create. - * @return object[] - */ - createTaxRules({ companyId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/taxrules`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Delete a single tax rule - * + * @param object[] model The tax rule you wish to create. + * @return object[] + */ + createTaxRules({ companyId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/taxrules`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Delete a single tax rule * Mark the custom tax rule identified by this URL as deleted. * * A tax rule represents a rule that changes the default AvaTax behavior for a product or jurisdiction. Custom tax rules @@ -9771,24 +11640,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this tax rule. - * @param int id The ID of the tax rule you wish to delete. - * @return object[] - */ - deleteTaxRule({ companyId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/taxrules/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Retrieve a single tax rule - * + * @param int id The ID of the tax rule you wish to delete. + * @return object[] + */ + deleteTaxRule({ companyId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/taxrules/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single tax rule * Get the taxrule object identified by this URL. * * A tax rule represents a rule that changes the default AvaTax behavior for a product or jurisdiction. Custom tax rules @@ -9805,24 +11680,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this tax rule - * @param int id The primary key of this tax rule - * @return object - */ - getTaxRule({ companyId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/taxrules/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve tax rules for this company - * + * @param int id The primary key of this tax rule + * @return object + */ + getTaxRule({ companyId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/taxrules/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve tax rules for this company * List all taxrule objects attached to this company. * * A tax rule represents a rule that changes the default AvaTax behavior for a product or jurisdiction. Custom tax rules @@ -9842,20 +11723,21 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns these tax rules * @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, taxTypeCode, taxRuleProductDetail, rateTypeCode, taxTypeGroup, taxSubType, unitOfBasis * @param string include A comma separated list of additional data to retrieve. * @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. * @param int 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 - */ - listTaxRules({ companyId, filter, include, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/taxrules`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listTaxRules({ companyId, filter, include, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/taxrules`, parameters: { $filter: filter, $include: include, @@ -9863,13 +11745,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all tax rules - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all tax rules * Get multiple taxrule objects across all companies. * * A tax rule represents a rule that changes the default AvaTax behavior for a product or jurisdiction. Custom tax rules @@ -9889,19 +11776,20 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * 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, taxTypeCode, taxRuleProductDetail, rateTypeCode, taxTypeGroup, taxSubType, unitOfBasis * @param string include A comma separated list of additional data to retrieve. * @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. * @param int 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 - */ - queryTaxRules({ filter, include, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/taxrules`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + queryTaxRules({ filter, include, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/taxrules`, parameters: { $filter: filter, $include: include, @@ -9909,13 +11797,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Update a single tax rule - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Update a single tax rule * Replace the existing custom tax rule object at this URL with an updated object. * * A tax rule represents a rule that changes the default AvaTax behavior for a product or jurisdiction. Custom tax rules @@ -9932,25 +11825,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that this tax rule belongs to. * @param int id The ID of the tax rule you wish to update - * @param object model The tax rule you wish to update. - * @return object - */ - updateTaxRule({ companyId, id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/taxrules/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Add lines to an existing unlocked transaction - * + * @param object model The tax rule you wish to update. + * @return object + */ + updateTaxRule({ companyId, id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/taxrules/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Add lines to an existing unlocked transaction * Add lines to an existing unlocked transaction. * * The `AddLines` API allows you to add additional transaction lines to existing transaction, so that customer will @@ -9975,26 +11874,32 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param string include Specifies objects to include in the response after transaction is created - * @param object model information about the transaction and lines to be added - * @return object - */ - addLines({ include, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/transactions/lines/add`, + * @param object model information about the transaction and lines to be added + * @return object + */ + addLines({ include, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/transactions/lines/add`, parameters: { $include: include } - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Correct a previously created transaction - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Correct a previously created transaction * Replaces the current transaction uniquely identified by this URL with a new transaction. * * A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like @@ -10028,30 +11933,36 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param string companyCode The company code of the company that recorded this transaction * @param string transactionCode The transaction code to adjust * @param string documentType (Optional): The document type of the transaction to adjust. (See DocumentType::* for a list of allowable values) * @param string include Specifies objects to include in this fetch call - * @param object model The adjustment you wish to make - * @return object - */ - adjustTransaction({ companyCode, transactionCode, documentType, include, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/adjust`, + * @param object model The adjustment you wish to make + * @return object + */ + adjustTransaction({ companyCode, transactionCode, documentType, include, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/adjust`, parameters: { documentType: documentType, $include: include } - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Get audit information about a transaction - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Get audit information about a transaction * Retrieve audit information about a transaction stored in AvaTax. * * The `AuditTransaction` API retrieves audit information related to a specific transaction. This audit @@ -10079,24 +11990,30 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param string companyCode The code identifying the company that owns this transaction - * @param string transactionCode The code identifying the transaction - * @return object - */ - auditTransaction({ companyCode, transactionCode } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/audit`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Get audit information about a transaction - * + * @param string transactionCode The code identifying the transaction + * @return object + */ + auditTransaction({ companyCode, transactionCode } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/audit`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Get audit information about a transaction * Retrieve audit information about a transaction stored in AvaTax. * * The `AuditTransaction` API retrieves audit information related to a specific transaction. This audit @@ -10124,25 +12041,31 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param string companyCode The code identifying the company that owns this transaction * @param string transactionCode The code identifying the transaction - * @param string documentType The document type of the original transaction (See DocumentType::* for a list of allowable values) - * @return object - */ - auditTransactionWithType({ companyCode, transactionCode, documentType } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/types/${documentType}/audit`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Lock a set of documents - * + * @param string documentType The document type of the original transaction (See DocumentType::* for a list of allowable values) + * @return object + */ + auditTransactionWithType({ companyCode, transactionCode, documentType } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/types/${documentType}/audit`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Lock a set of documents * This API is available by invitation only. * * Lock a set of transactions uniquely identified by DocumentIds provided. This API allows locking multiple documents at once. @@ -10154,23 +12077,29 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires the user role Compliance Root User. - * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - * - * - * @param object model bulk lock request - * @return object - */ - bulkLockTransaction({ model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/transactions/lock`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Change a transaction's code - * + * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + * Swagger Name: AvaTaxClient + * + * + * @param object model bulk lock request + * @return object + */ + bulkLockTransaction({ model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/transactions/lock`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Change a transaction's code * Renames a transaction uniquely identified by this URL by changing its `code` value. * * This API is available as long as the transaction is in `saved` or `posted` status. When a transaction @@ -10204,30 +12133,36 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param string companyCode The company code of the company that recorded this transaction * @param string transactionCode The transaction code to change * @param string documentType (Optional): The document type of the transaction to change document code. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values) * @param string include Specifies objects to include in this fetch call - * @param object model The code change request you wish to execute - * @return object - */ - changeTransactionCode({ companyCode, transactionCode, documentType, include, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/changecode`, + * @param object model The code change request you wish to execute + * @return object + */ + changeTransactionCode({ companyCode, transactionCode, documentType, include, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/changecode`, parameters: { documentType: documentType, $include: include } - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Commit a transaction for reporting - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Commit a transaction for reporting * Marks a transaction by changing its status to `Committed`. * * Transactions that are committed are available to be reported to a tax authority by Avalara Managed Returns. @@ -10259,30 +12194,36 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param string companyCode The company code of the company that recorded this transaction * @param string transactionCode The transaction code to commit * @param string documentType (Optional): The document type of the transaction to commit. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values) * @param string include Specifies objects to include in this fetch call - * @param object model The commit request you wish to execute - * @return object - */ - commitTransaction({ companyCode, transactionCode, documentType, include, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/commit`, + * @param object model The commit request you wish to execute + * @return object + */ + commitTransaction({ companyCode, transactionCode, documentType, include, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/commit`, parameters: { documentType: documentType, $include: include } - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Create or adjust a transaction - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Create or adjust a transaction * Records a new transaction or adjust an existing transaction in AvaTax. * * The `CreateOrAdjustTransaction` endpoint is used to create a new transaction or update an existing one. This API @@ -10320,26 +12261,32 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param string include Specifies objects to include in the response after transaction is created - * @param object model The transaction you wish to create or adjust - * @return object - */ - createOrAdjustTransaction({ include, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/transactions/createoradjust`, + * @param object model The transaction you wish to create or adjust + * @return object + */ + createOrAdjustTransaction({ include, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/transactions/createoradjust`, parameters: { $include: include } - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Create a new transaction - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Create a new transaction * Records a new transaction in AvaTax. * * A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like @@ -10384,26 +12331,32 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param string include Specifies objects to include in the response after transaction is created - * @param object model The transaction you wish to create - * @return object - */ - createTransaction({ include, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/transactions/create`, + * @param object model The transaction you wish to create + * @return object + */ + createTransaction({ include, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/transactions/create`, parameters: { $include: include } - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Remove lines from an existing unlocked transaction - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Remove lines from an existing unlocked transaction * Remove lines to an existing unlocked transaction. * * The `DeleteLines` API allows you to remove transaction lines from existing unlocked transaction, so that customer will @@ -10425,26 +12378,32 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param string include Specifies objects to include in the response after transaction is created - * @param object model information about the transaction and lines to be removed - * @return object - */ - deleteLines({ include, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/transactions/lines/delete`, + * @param object model information about the transaction and lines to be removed + * @return object + */ + deleteLines({ include, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/transactions/lines/delete`, parameters: { $include: include } - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Retrieve a single transaction by code - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Retrieve a single transaction by code * Get the current transaction identified by this company code, transaction code, and document type. * * A transaction is uniquely identified by `companyCode`, `code` (often called Transaction Code), and `documentType`. @@ -10475,29 +12434,35 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param string companyCode The company code of the company that recorded this transaction * @param string transactionCode The transaction code to retrieve * @param string documentType (Optional): The document type of the transaction to retrieve (See DocumentType::* for a list of allowable values) - * @param string include Specifies objects to include in this fetch call - * @return object - */ - getTransactionByCode({ companyCode, transactionCode, documentType, include } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}`, + * @param string include Specifies objects to include in this fetch call + * @return object + */ + getTransactionByCode({ companyCode, transactionCode, documentType, include } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}`, parameters: { documentType: documentType, $include: include } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve a single transaction by code - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single transaction by code * DEPRECATED: Please use the `GetTransactionByCode` API instead. * * NOTE: If your companyCode or transactionCode contains any of these characters /, +, ? or a space please use the following encoding before making a request: @@ -10511,28 +12476,34 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param string companyCode The company code of the company that recorded this transaction * @param string transactionCode The transaction code to retrieve * @param string documentType The transaction type to retrieve (See DocumentType::* for a list of allowable values) - * @param string include Specifies objects to include in this fetch call - * @return object - */ - getTransactionByCodeAndType({ companyCode, transactionCode, documentType, include } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/types/${documentType}`, + * @param string include Specifies objects to include in this fetch call + * @return object + */ + getTransactionByCodeAndType({ companyCode, transactionCode, documentType, include } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/types/${documentType}`, parameters: { $include: include } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve a single transaction by ID - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single transaction by ID * Get the unique transaction identified by this URL. * * This endpoint retrieves the exact transaction identified by this ID number even if that transaction was later adjusted @@ -10554,26 +12525,32 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param int id The unique ID number of the transaction to retrieve - * @param string include Specifies objects to include in this fetch call - * @return object - */ - getTransactionById({ id, include } = {}) { - var path = this.buildUrl({ - url: `/api/v2/transactions/${id}`, + * @param string include Specifies objects to include in this fetch call + * @return object + */ + getTransactionById({ id, include } = {}) { + var path = this.buildUrl({ + url: `/api/v2/transactions/${id}`, parameters: { $include: include } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all transactions - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all transactions * List all transactions attached to this company. * * This endpoint is limited to returning 1,000 transactions at a time maximum. @@ -10607,8 +12584,9 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param string companyCode The company code of the company that recorded this transaction * @param int dataSourceId Optionally filter transactions to those from a specific data source. @@ -10616,12 +12594,12 @@ export default class 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:* exchangeRateCurrencyCode, totalDiscount, lines, addresses, locationTypes, summary, taxDetailsByTaxType, parameters, userDefinedFields, messages, invoiceMessages, isFakeTransaction, deliveryTerms * @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. * @param int 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 - */ - listTransactionsByCompany({ companyCode, dataSourceId, include, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listTransactionsByCompany({ companyCode, dataSourceId, include, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions`, parameters: { dataSourceId: dataSourceId, $include: include, @@ -10630,13 +12608,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Lock a single transaction - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Lock a single transaction * Lock a transaction uniquely identified by this URL. * * This API is mainly used for connector developers to simulate what happens when the Returns product locks a document. @@ -10670,30 +12653,36 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. - * + * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + * Swagger Name: AvaTaxClient + * * * @param string companyCode The company code of the company that recorded this transaction * @param string transactionCode The transaction code to lock * @param string documentType (Optional): The document type of the transaction to lock. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values) * @param string include Specifies objects to include in this fetch call - * @param object model The lock request you wish to execute - * @return object - */ - lockTransaction({ companyCode, transactionCode, documentType, include, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/lock`, + * @param object model The lock request you wish to execute + * @return object + */ + lockTransaction({ companyCode, transactionCode, documentType, include, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/lock`, parameters: { documentType: documentType, $include: include } - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Create a refund for a transaction - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Create a refund for a transaction * Create a refund for a transaction. * * The `RefundTransaction` API allows you to quickly and easily create a `ReturnInvoice` representing a refund @@ -10737,32 +12726,38 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param string companyCode The code of the company that made the original sale * @param string transactionCode The transaction code of the original sale * @param string include Specifies objects to include in the response after transaction is created * @param string documentType (Optional): The document type of the transaction to refund. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values) * @param boolean useTaxDateOverride (Optional): If set to true, processes refund using taxDateOverride rather than taxAmountOverride (Note: taxAmountOverride is not allowed for SST states). - * @param object model Information about the refund to create - * @return object - */ - refundTransaction({ companyCode, transactionCode, include, documentType, useTaxDateOverride, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/refund`, + * @param object model Information about the refund to create + * @return object + */ + refundTransaction({ companyCode, transactionCode, include, documentType, useTaxDateOverride, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/refund`, parameters: { $include: include, documentType: documentType, useTaxDateOverride: useTaxDateOverride } - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Perform multiple actions on a transaction - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Perform multiple actions on a transaction * Performs one or more actions against the current transaction uniquely identified by this URL. * * The `SettleTransaction` API call can perform the work of `ChangeCode`, `VerifyTransaction`, and `CommitTransaction`. @@ -10794,30 +12789,36 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin. + * Swagger Name: AvaTaxClient + * * * @param string companyCode The company code of the company that recorded this transaction * @param string transactionCode The transaction code to settle * @param string documentType (Optional): The document type of the transaction to settle. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values) * @param string include Specifies objects to include in this fetch call - * @param object model The data from an external system to reconcile against AvaTax - * @return object - */ - settleTransaction({ companyCode, transactionCode, documentType, include, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/settle`, + * @param object model The data from an external system to reconcile against AvaTax + * @return object + */ + settleTransaction({ companyCode, transactionCode, documentType, include, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/settle`, parameters: { documentType: documentType, $include: include } - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Uncommit a transaction for reporting - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Uncommit a transaction for reporting * Adjusts a transaction by changing it to an uncommitted status. * * Transactions that have been previously reported to a tax authority by Avalara Managed Returns are considered `locked` and are @@ -10844,29 +12845,35 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param string companyCode The company code of the company that recorded this transaction * @param string transactionCode The transaction code to Uncommit * @param string documentType (Optional): The document type of the transaction to Uncommit. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values) - * @param string include Specifies objects to include in this fetch call - * @return object - */ - uncommitTransaction({ companyCode, transactionCode, documentType, include } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/uncommit`, + * @param string include Specifies objects to include in this fetch call + * @return object + */ + uncommitTransaction({ companyCode, transactionCode, documentType, include } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/uncommit`, parameters: { documentType: documentType, $include: include } - }); - return this.restCall({ url: path, verb: 'post', payload: null }); - } - - /** - * Unvoids a transaction - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: null, clientId: strClientId }); + } + + /** + * Unvoids a transaction * Unvoids a voided transaction * * 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: @@ -10890,29 +12897,35 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param string companyCode The company code of the company that recorded this transaction * @param string transactionCode The transaction code to commit * @param string documentType (Optional): The document type of the transaction to commit. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values) - * @param string include Specifies objects to include in this fetch call - * @return object - */ - unvoidTransaction({ companyCode, transactionCode, documentType, include } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/unvoid`, + * @param string include Specifies objects to include in this fetch call + * @return object + */ + unvoidTransaction({ companyCode, transactionCode, documentType, include } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/unvoid`, parameters: { documentType: documentType, $include: include } - }); - return this.restCall({ url: path, verb: 'post', payload: null }); - } - - /** - * Verify a transaction - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: null, clientId: strClientId }); + } + + /** + * Verify a transaction * Verifies that the transaction uniquely identified by this URL matches certain expected values. * * If the transaction does not match these expected values, this API will return an error code indicating which value did not match. @@ -10943,30 +12956,36 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param string companyCode The company code of the company that recorded this transaction * @param string transactionCode The transaction code to settle * @param string documentType (Optional): The document type of the transaction to verify. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values) * @param string include Specifies objects to include in this fetch call - * @param object model The data from an external system to reconcile against AvaTax - * @return object - */ - verifyTransaction({ companyCode, transactionCode, documentType, include, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/verify`, + * @param object model The data from an external system to reconcile against AvaTax + * @return object + */ + verifyTransaction({ companyCode, transactionCode, documentType, include, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/verify`, parameters: { documentType: documentType, $include: include } - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Void a transaction - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Void a transaction * Voids the current transaction uniquely identified by this URL. * * A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like @@ -10999,101 +13018,125 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. - * + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * * * @param string companyCode The company code of the company that recorded this transaction * @param string transactionCode The transaction code to void * @param string documentType (Optional): The document type of the transaction to void. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values) * @param string include Specifies objects to include in this fetch call - * @param object model The void request you wish to execute. To void a transaction the code must be set to 'DocVoided' - * @return object - */ - voidTransaction({ companyCode, transactionCode, documentType, include, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/void`, + * @param object model The void request you wish to execute. To void a transaction the code must be set to 'DocVoided' + * @return object + */ + voidTransaction({ companyCode, transactionCode, documentType, include, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/void`, parameters: { documentType: documentType, $include: include } - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Create a new UPC - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Create a new UPC * Create one or more new UPC objects attached to this company. * A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC. * * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaUpc. - * + * * This API depends on the following active services:*Required* (all): AvaUpc. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this UPC. - * @param object[] model The UPC you wish to create. - * @return object[] - */ - createUPCs({ companyId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/upcs`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Delete a single UPC - * + * @param object[] model The UPC you wish to create. + * @return object[] + */ + createUPCs({ companyId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/upcs`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Delete a single UPC * Marks the UPC object identified by this URL as deleted. * * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaUpc. - * + * * This API depends on the following active services:*Required* (all): AvaUpc. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this UPC. - * @param int id The ID of the UPC you wish to delete. - * @return object[] - */ - deleteUPC({ companyId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/upcs/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Retrieve a single UPC - * + * @param int id The ID of the UPC you wish to delete. + * @return object[] + */ + deleteUPC({ companyId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/upcs/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single UPC * Get the UPC object identified by this URL. * A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC. * * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaUpc. - * + * * This API depends on the following active services:*Required* (all): AvaUpc. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns this UPC - * @param int id The primary key of this UPC - * @return object - */ - getUPC({ companyId, id } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/upcs/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve UPCs for this company - * + * @param int id The primary key of this UPC + * @return object + */ + getUPC({ companyId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/upcs/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve UPCs for this company * List all UPC objects attached to this company. * A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC. * @@ -11103,20 +13146,21 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaUpc. - * + * * This API depends on the following active services:*Required* (all): AvaUpc. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that owns these UPCs * @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 string include A comma separated list of additional data to retrieve. * @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. * @param int 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 - */ - listUPCsByCompany({ companyId, filter, include, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/upcs`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listUPCsByCompany({ companyId, filter, include, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/upcs`, parameters: { $filter: filter, $include: include, @@ -11124,13 +13168,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all UPCs - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all UPCs * Get multiple UPC objects across all companies. * A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC. * @@ -11140,19 +13189,20 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * * This API depends on the following active services:*Required* (all): AvaUpc. - * + * * This API depends on the following active services:*Required* (all): AvaUpc. + * 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 string include A comma separated list of additional data to retrieve. * @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. * @param int 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 - */ - queryUPCs({ filter, include, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/upcs`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + queryUPCs({ filter, include, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/upcs`, parameters: { $filter: filter, $include: include, @@ -11160,13 +13210,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Update a single UPC - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Update a single UPC * Replace the existing UPC object at this URL with an updated object. * A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC. * All data from the existing object will be replaced with data in the object you PUT. @@ -11175,25 +13230,123 @@ export default class AvaTaxClient { * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. - * * This API depends on the following active services:*Required* (all): AvaUpc. - * + * * This API depends on the following active services:*Required* (all): AvaUpc. + * Swagger Name: AvaTaxClient + * * * @param int companyId The ID of the company that this UPC belongs to. * @param int id The ID of the UPC you wish to update - * @param object model The UPC you wish to update. - * @return object - */ - updateUPC({ companyId, id, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/companies/${companyId}/upcs/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Change Password - * + * @param object model The UPC you wish to update. + * @return object + */ + updateUPC({ companyId, id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/upcs/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Delete a User Defined Field by User Defined Field id for a company. + * Marks the existing user defined field for a company as deleted. + * + * ### Security Policies + * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * + * + * @param int companyId The id of the company the User Defined Field belongs to. + * @param int id The id of the User Defined Field you wish to delete. + * @return object[] + */ + deleteUserDefinedField({ companyId, id } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/userdefinedfields/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * + * ### Security Policies + * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * + * + * @param int companyId + * @param string udfType Document or Line level UDF (See UserDefinedFieldType::* for a list of allowable values) + * @param boolean allowDefaults If true this will add defaulted UDFs to the list that are not named yet + * @return FetchResult + */ + listUserDefinedFieldsByCompanyId({ companyId, udfType, allowDefaults } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/userdefinedfields`, + parameters: { + udfType: udfType, + allowDefaults: allowDefaults + } + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Update a User Defined Field identified by id for a company + * Updates a User Defined Field for a company. + * + * ### Security Policies + * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. + * * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns. + * Swagger Name: AvaTaxClient + * + * + * @param int companyId The id of the company the user defined field belongs to. + * @param int id + * @param object model + * @return object + */ + updateUserDefinedField({ companyId, id, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyId}/userdefinedfields`, + parameters: { + id: id + } + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Change Password * Allows a user to change their password via an API call. * * This API allows an authenticated user to change their password via an API call. This feature is only available @@ -11204,23 +13357,29 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * - * - * @param object model An object containing your current password and the new password. - * @return string - */ - changePassword({ model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/passwords`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Create new users - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * + * + * @param object model An object containing your current password and the new password. + * @return string + */ + changePassword({ model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/passwords`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Create new users * Create one or more new user objects attached to this account. * * A user represents one person with access privileges to make API calls and work with a specific account. @@ -11233,24 +13392,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int accountId The unique ID number of the account where these users will be created. - * @param object[] model The user or array of users you wish to create. - * @return object[] - */ - createUsers({ accountId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/users`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'post', payload: model }); - } - - /** - * Delete a single user - * + * @param object[] model The user or array of users you wish to create. + * @return object[] + */ + createUsers({ accountId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/users`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Delete a single user * Mark the user object identified by this URL as deleted. * * This API is available for use by account and company administrators only. @@ -11260,24 +13425,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, CSPTester, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TreasuryAdmin. - * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, CSPTester, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TreasuryAdmin. + * Swagger Name: AvaTaxClient + * * * @param int id The ID of the user you wish to delete. - * @param int accountId The accountID of the user you wish to delete. - * @return object[] - */ - deleteUser({ id, accountId } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/users/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'delete', payload: null }); - } - - /** - * Retrieve a single user - * + * @param int accountId The accountID of the user you wish to delete. + * @return object[] + */ + deleteUser({ id, accountId } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/users/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Retrieve a single user * Get the user object identified by this URL. * A user represents one person with access privileges to make API calls and work with a specific account. * @@ -11287,27 +13458,33 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int id The ID of the user to retrieve. * @param int accountId The accountID of the user you wish to get. - * @param string include Optional fetch commands. - * @return object - */ - getUser({ id, accountId, include } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/users/${id}`, + * @param string include Optional fetch commands. + * @return object + */ + getUser({ id, accountId, include } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/users/${id}`, parameters: { $include: include } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all entitlements for a single user - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all entitlements for a single user * Return a list of all entitlements to which this user has rights to access. * Entitlements are a list of specified API calls the user is permitted to make, a list of identifier numbers for companies the user is * allowed to use, and an access level identifier that indicates what types of access roles the user is allowed to use. @@ -11326,24 +13503,30 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int id The ID of the user to retrieve. - * @param int accountId The accountID of the user you wish to get. - * @return object - */ - getUserEntitlements({ id, accountId } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/users/${id}/entitlements`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve users for this account - * + * @param int accountId The accountID of the user you wish to get. + * @return object + */ + getUserEntitlements({ id, accountId } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/users/${id}/entitlements`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve users for this account * List all user objects attached to this account. * A user represents one person with access privileges to make API calls and work with a specific account. * @@ -11359,20 +13542,21 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int accountId The accountID of the user you wish to list. * @param string include Optional fetch commands. * @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:* SuppressNewUserEmail * @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. * @param int 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 - */ - listUsersByAccount({ accountId, include, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/users`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + listUsersByAccount({ accountId, include, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/users`, parameters: { $include: include, $filter: filter, @@ -11380,13 +13564,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Retrieve all users - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Retrieve all users * Get multiple user objects across all accounts. * * A user represents one person or set of credentials with access privileges to make API calls and work with a specific account. A user can be authenticated @@ -11404,19 +13593,20 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param string include Optional fetch commands. * @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:* SuppressNewUserEmail * @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. * @param int 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 - */ - queryUsers({ include, filter, top, skip, orderBy } = {}) { - var path = this.buildUrl({ - url: `/api/v2/users`, + * @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return FetchResult + */ + queryUsers({ include, filter, top, skip, orderBy } = {}) { + var path = this.buildUrl({ + url: `/api/v2/users`, parameters: { $include: include, $filter: filter, @@ -11424,13 +13614,18 @@ export default class AvaTaxClient { $skip: skip, $orderBy: orderBy } - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Update a single user - * + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Update a single user * Replace the existing user object at this URL with an updated object. * A user represents one person with access privileges to make API calls and work with a specific account. * All data from the existing object will be replaced with data in the object you PUT. @@ -11438,25 +13633,31 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. - * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * Swagger Name: AvaTaxClient + * * * @param int id The ID of the user you wish to update. * @param int accountId The accountID of the user you wish to update. - * @param object model The user object you wish to update. - * @return object - */ - updateUser({ id, accountId, model } = {}) { - var path = this.buildUrl({ - url: `/api/v2/accounts/${accountId}/users/${id}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'put', payload: model }); - } - - /** - * Checks if the current user is subscribed to a specific service - * + * @param object model The user object you wish to update. + * @return object + */ + updateUser({ id, accountId, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/accounts/${accountId}/users/${id}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: model, clientId: strClientId }); + } + + /** + * Checks if the current user is subscribed to a specific service * Returns a subscription object for the current account, or 404 Not Found if this subscription is not enabled for this account. * * This API will return an error if it is called with invalid authentication credentials. @@ -11464,23 +13665,29 @@ export default class AvaTaxClient { * This API is intended to help you determine whether you have the necessary subscription to use certain API calls * within AvaTax. You can examine the subscriptions returned from this API call to look for a particular product * or subscription to provide useful information to the current user as to whether they are entitled to use - * specific features of AvaTax. - * - * - * @param string serviceTypeId The service to check - * @return object - */ - getMySubscription({ serviceTypeId } = {}) { - var path = this.buildUrl({ - url: `/api/v2/utilities/subscriptions/${serviceTypeId}`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * List all services to which the current user is subscribed - * + * specific features of AvaTax. + * Swagger Name: AvaTaxClient + * + * + * @param string serviceTypeId The service to check + * @return object + */ + getMySubscription({ serviceTypeId } = {}) { + var path = this.buildUrl({ + url: `/api/v2/utilities/subscriptions/${serviceTypeId}`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * List all services to which the current user is subscribed * Returns the list of all subscriptions enabled for the currently logged in user. * * This API will return an error if it is called with invalid authentication credentials. @@ -11488,22 +13695,28 @@ export default class AvaTaxClient { * This API is intended to help you determine whether you have the necessary subscription to use certain API calls * within AvaTax. You can examine the subscriptions returned from this API call to look for a particular product * or subscription to provide useful information to the current user as to whether they are entitled to use - * specific features of AvaTax. - * - * - * @return FetchResult - */ - listMySubscriptions({ } = {}) { - var path = this.buildUrl({ - url: `/api/v2/utilities/subscriptions`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } - - /** - * Tests connectivity and version of the service - * + * specific features of AvaTax. + * Swagger Name: AvaTaxClient + * + * + * @return FetchResult + */ + listMySubscriptions({ } = {}) { + var path = this.buildUrl({ + url: `/api/v2/utilities/subscriptions`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Tests connectivity and version of the service * Check connectivity to AvaTax and return information about the AvaTax API server. * * This API is intended to help you verify that your connection is working. This API will always succeed and will @@ -11523,16 +13736,184 @@ export default class AvaTaxClient { * * ### Security Policies * - * * This API may be called without providing authentication credentials. - * - * - * @return object - */ - ping({ } = {}) { - var path = this.buildUrl({ - url: `/api/v2/utilities/ping`, - parameters: {} - }); - return this.restCall({ url: path, verb: 'get', payload: null }); - } -} + * * This API may be called without providing authentication credentials. + * Swagger Name: AvaTaxClient + * + * + * @return object + */ + ping({ } = {}) { + var path = this.buildUrl({ + url: `/api/v2/utilities/ping`, + parameters: {} + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; 21.12.0; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } + + /** + * Determines whether an individual meets or exceeds the minimum legal drinking age. + * The request must meet the following criteria in order to be evaluated: + * * *firstName*, *lastName*, and *address* are required fields. + * * One of the following sets of attributes are required for the *address*: + * * *line1, city, region* + * * *line1, postalCode* + * + * Optionally, the transaction and its lines may use the following parameters: + * * A *DOB* (Date of Birth) field. The value should be ISO-8601 compliant (e.g. 2020-07-21). + * * Beyond the required *address* fields above, a *country* field is permitted + * * The valid values for this attribute are [*US, USA*] + * + * **Security Policies** + * This API depends on the active subscription *AgeVerification* + * Swagger Name: AvaTaxBeverageClient + * + * + * @param string simulatedFailureCode (Optional) The failure code included in the simulated response of the endpoint. Note that this endpoint is only available in Sandbox for testing purposes. + * @param object model Information about the individual whose age is being verified. + * @return object + */ + verifyAge({ simulatedFailureCode, model } = {}) { + var path = this.buildUrl({ + url: `/api/v2/ageverification/verify`, + parameters: { + simulatedFailureCode: simulatedFailureCode + } + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'post', payload: model, clientId: strClientId }); + } + + /** + * Removes the transaction from consideration when evaluating regulations that span multiple transactions. + * + * Swagger Name: AvaTaxBeverageClient + * + * + * @param string companyCode The company code of the company that recorded the transaction + * @param string transactionCode The transaction code to retrieve + * @param string documentType (Optional): The document type of the transaction to operate on. If omitted, defaults to "SalesInvoice" + * @return + */ + deregisterShipment({ companyCode, transactionCode, documentType } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/shipment/registration`, + parameters: { + documentType: documentType + } + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'delete', payload: null, clientId: strClientId }); + } + + /** + * Registers the transaction so that it may be included when evaluating regulations that span multiple transactions. + * + * Swagger Name: AvaTaxBeverageClient + * + * + * @param string companyCode The company code of the company that recorded the transaction + * @param string transactionCode The transaction code to retrieve + * @param string documentType (Optional): The document type of the transaction to operate on. If omitted, defaults to "SalesInvoice" + * @return + */ + registerShipment({ companyCode, transactionCode, documentType } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/shipment/registration`, + parameters: { + documentType: documentType + } + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: null, clientId: strClientId }); + } + + /** + * Evaluates a transaction against a set of direct-to-consumer shipping regulations and, if compliant, registers the transaction so that it may be included when evaluating regulations that span multiple transactions. + * + * Swagger Name: AvaTaxBeverageClient + * + * + * @param string companyCode The company code of the company that recorded the transaction + * @param string transactionCode The transaction code to retrieve + * @param string documentType (Optional): The document type of the transaction to operate on. If omitted, defaults to "SalesInvoice" + * @return object + */ + registerShipmentIfCompliant({ companyCode, transactionCode, documentType } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/shipment/registerIfCompliant`, + parameters: { + documentType: documentType + } + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'put', payload: null, clientId: strClientId }); + } + + /** + * Evaluates a transaction against a set of direct-to-consumer shipping regulations. + * The transaction and its lines must meet the following criteria in order to be evaluated: + * * The transaction must be recorded. Using a type of *SalesInvoice* is recommended. + * * A parameter with the name *AlcoholRouteType* must be specified and the value must be one of the following: '*DTC*', '*Retailer DTC*' + * * A parameter with the name *RecipientName* must be specified and the value must be the name of the recipient. + * * Each alcohol line must include a *ContainerSize* parameter that describes the volume of a single container. Use the *unit* field to specify one of the following units: '*Litre*', '*Millilitre*', '*gallon (US fluid)*', '*quart (US fluid)*', '*ounce (fluid US customary)*' + * * Each alcohol line must include a *PackSize* parameter that describes the number of containers in a pack. Specify *Count* in the *unit* field. + * + * Optionally, the transaction and its lines may use the following parameters: + * * The *ShipDate* parameter may be used if the date of shipment is different than the date of the transaction. The value should be ISO-8601 compliant (e.g. 2020-07-21). + * * The *RecipientDOB* parameter may be used to evaluate age restrictions. The value should be ISO-8601 compliant (e.g. 2020-07-21). + * * The *PurchaserDOB* parameter may be used to evaluate age restrictions. The value should be ISO-8601 compliant (e.g. 2020-07-21). + * * The *SalesLocation* parameter may be used to describe whether the sale was made *OnSite* or *OffSite*. *OffSite* is the default value. + * * The *AlcoholContent* parameter may be used to describe the alcohol percentage by volume of the item. Specify *Percentage* in the *unit* field. + * + * **Security Policies** + * This API depends on all of the following active subscriptions: *AvaAlcohol, AutoAddress, AvaTaxPro* + * Swagger Name: AvaTaxBeverageClient + * + * + * @param string companyCode The company code of the company that recorded the transaction + * @param string transactionCode The transaction code to retrieve + * @param string documentType (Optional): The document type of the transaction to operate on. If omitted, defaults to "SalesInvoice" + * @return object + */ + verifyShipment({ companyCode, transactionCode, documentType } = {}) { + var path = this.buildUrl({ + url: `/api/v2/companies/${companyCode}/transactions/${transactionCode}/shipment/verify`, + parameters: { + documentType: documentType + } + }); + var strClientId = + this.appNM + + '; ' + + this.appVer + + '; JavascriptSdk; ; ' + + this.machineNM; + return this.restCall({ url: path, verb: 'get', payload: null, clientId: strClientId }); + } +} diff --git a/lib/utils/withTimeout.js b/lib/utils/withTimeout.js index 01b150c3..73752c18 100644 --- a/lib/utils/withTimeout.js +++ b/lib/utils/withTimeout.js @@ -1,8 +1,17 @@ export function withTimeout(msecs, promise) { - const timeout = new Promise((resolve, reject) => { - setTimeout(() => { - reject(new Error('timeout')); - }, msecs); - }); - return Promise.race([timeout, promise]); + return new Promise((resolve, reject) => { + const timer = setTimeout(() => { + reject(new Error('timeout')) + }, msecs) + + promise + .then(value => { + clearTimeout(timer); + resolve(value); + }) + .catch(reason => { + clearTimeout(timer); + reject(reason); + }) + }) } \ No newline at end of file diff --git a/package.json b/package.json index e76fc925..5be559be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "avatax", - "version": "21.10.0", + "version": "21.12.0", "description": "AvaTax v2 SDK for languages using JavaScript", "main": "index.js", "homepage": "https://github.com/avadev/AvaTax-REST-V2-JS-SDK",